Skip to content

Commit

Permalink
Added a .url_filters property to rest_api_base as place for hitting t…
Browse files Browse the repository at this point in the history
…he factory methods
  • Loading branch information
Bryant Howell committed Dec 7, 2019
1 parent 0bccf47 commit 229fb36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tableau_rest_api/methods/rest_api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def __init__(self, server: str, username: str, password: str, site_content_url:
self._request_obj: Optional[RestXmlRequest] = None
self._request_json_obj: Optional[RestJsonRequest] = None

# UrlFilter object for factory methods
self.url_filters = UrlFilter()

# Lookup caches to minimize calls
self.username_luid_cache = {}
self.group_name_luid_cache = {}
Expand Down Expand Up @@ -1158,6 +1161,7 @@ def __init__(self, server: str, username: str, password: str, site_content_url:
TableauRestApiBase.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url)
self.set_tableau_server_version('10.4')
self.url_filters = UrlFilter27()

class TableauRestApiBase28(TableauRestApiBase27):
def __init__(self, server: str, username: str, password: str, site_content_url: Optional[str] = ""):
Expand All @@ -1184,6 +1188,7 @@ def __init__(self, server: str, username: str, password: str, site_content_url:
TableauRestApiBase.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url)
self.set_tableau_server_version('2018.2')
self.url_filters = UrlFilter31()

class TableauRestApiBase32(TableauRestApiBase31):
def __init__(self, server: str, username: str, password: str, site_content_url: Optional[str] = ""):
Expand All @@ -1196,6 +1201,7 @@ def __init__(self, server: str, username: str, password: str, site_content_url:
TableauRestApiBase.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url)
self.set_tableau_server_version('2019.1')
self.url_filters = UrlFilter33()

def get_published_project_object(self, project_name_or_luid: str,
project_xml_obj: Optional[ET.Element] = None) -> Project33:
Expand Down

0 comments on commit 229fb36

Please sign in to comment.