8000 Adding api version tagging by graysonarts · Pull Request #173 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Adding api version tagging #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tableauserverclient/server/endpoint/tasks_endpoint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .endpoint import Endpoint
from .endpoint import Endpoint, api
from .exceptions import MissingRequiredFieldError
from .. import TaskItem, PaginationItem, RequestFactory
import logging
Expand All @@ -12,6 +12,7 @@ def baseurl(self):
return "{0}/sites/{1}/tasks/extractRefreshes".format(self.parent_srv.baseurl,
self.parent_srv.site_id)

@api(version='2.6')
def get(self, req_options=None):
logger.info('Querying all tasks for the site')
url = self.baseurl
Expand All @@ -21,6 +22,7 @@ def get(self, req_options=None):
all_extract_tasks = TaskItem.from_response(server_response.content)
return all_extract_tasks, pagination_item

@api(version='2.6')
def get_by_id(self, task_id):
if not task_id:
error = "No Task ID provided"
Expand All @@ -30,6 +32,7 @@ def get_by_id(self, task_id):
server_response = self.get_request(url)
return TaskItem.from_response(server_response.content)[0]

@api(version='2.6')
def run(self, task_item):
if not task_item.id:
error = "User item missing ID."
Expand Down
0