Class for making public YQL queries
Gets the @var placeholders
Two legged Auth is simple request which is signed prior to sending
Three-legged Auth is used when it involves private data such as a user’s contacts.
Three-legged auth is most likely to be used in a web-site or web-accessible application. Three-legged auth requires the user to authenticate the request through the Yahoo login.
Three-legged auth requires the implementation to:
For an implementation this will require calling the following methods in order the first time the user needs to authenticate
Once the access token has been provided subsequent requests can re-use it.
Access tokens expire after 1 hour, however they can be refreshed with the refresh_token() method
Get the access token
The verifier (required) should have been provided to the user following login to at the url returned by the get_token_and_auth_url() method.
If not you will need need to extract the auth_verifier parameter from your callback url on the site where you are implementing 3-legged auth in order to pass it to this function.
The access token can be stored and re-used for subsequent calls.
The stored token will also need to be refreshed periodically with refresh_token()
First step is to get the token and then send the request that provides the auth URL
Returns a tuple of token and the authorisation URL.
Access Tokens only last for one hour from the point of being issued.
When a token has expired it needs to be refreshed this method takes an expired token and refreshes it.
token parameter can be either a token object or a token string.
A YQLObject is the object created as the result of a YQL query
Get the list of rows
Results is a dict with one key but that key changes depending on the results This provides a way of getting at the rows list in an arbitrary way
A simple filesystem based token store
Note: this is more intended as an example rather than something for heavy duty production usage.