Skip to content

Conversation

@graysonarts
Copy link
Contributor

Cleaning up the Endpoint base object and removing the duplicate ctors across all endpoints.

@graysonarts graysonarts added this to the 0.2 milestone Oct 28, 2016
Copy link
Collaborator

@t8y8 t8y8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Minor requests, I trust a ship it after they're addressed


class Auth(Endpoint):
def __init__(self):
super(Auth, self).__init__(None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keyword argument? I don't know what None means it kinda makes me think it's passing some fake value

def _check_status(server_response):
if server_response.status_code not in Success_codes:
raise ServerResponseError.from_response(server_response.content)
def _make_headers(token, content_type):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_make_tableau_headers or _make_server_headers or something to indicate it's not a totally general purpose function, it really is Tableau REST API specific headers

self._check_status(server_response)

# This check is to determine if the response is a text response (xml or otherwise)
# so that we do not attempt to log bytes and other binary data.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!!

retval['content-type'] = content_type

def get_unauthenticated_request(self, url, request_object=None):
def _make_request(self, method, url, content=None, request_object=None, token=None, content_type=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call it auth_token.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

Copy link
Contributor

@LGraber LGraber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@graysonarts graysonarts merged commit 6a48ddc into tableau:development Oct 28, 2016
@graysonarts graysonarts deleted the cleanup-duplications branch October 28, 2016 21:28
bryceglarsen pushed a commit to bryceglarsen/server-client-python that referenced this pull request Dec 28, 2023
…ableau#89)

When Cross Database Joins were introduced in 10 all connections became "federated" by default, even if they weren't actually joined to anything else. 

In the file format that means they get represented as named-connection/connection elements. Expressed under one top-level connection element with a class of 'federated'.

Except for 'sqlproxy' connections (Published Data Sources) -- they stay in the old connection style as a top level connection element.

We need to, when in a 10.0 or greater workbook, get all federated connections (named-connection) plus go back and find any sqlproxy connections as well.
bryceglarsen pushed a commit to bryceglarsen/server-client-python that referenced this pull request Dec 28, 2023
…ableau#89)

When Cross Database Joins were introduced in 10 all connections became "federated" by default, even if they weren't actually joined to anything else. 

In the file format that means they get represented as named-connection/connection elements. Expressed under one top-level connection element with a class of 'federated'.

Except for 'sqlproxy' connections (Published Data Sources) -- they stay in the old connection style as a top level connection element.

We need to, when in a 10.0 or greater workbook, get all federated connections (named-connection) plus go back and find any sqlproxy connections as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants