Home | Trees | Indices | Help |
|
---|
|
object --+ | ApiConnector
The ApiConnector holds all the data necessary to authenticate against the soundcloud-api. You can instantiate several connectors if you like, but usually one should be sufficient.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
LIST_LIMIT = 50 The query-parameter that is used to request results beginning from a certain offset. |
|||
LIST_OFFSET_PARAMETER =
The query-parameter that is used to request results being limited to a certain amount. |
|||
LIST_LIMIT_PARAMETER =
|
|
|||
Inherited from |
|
Constructor for the API-Singleton. Use it once with parameters, and then the subsequent calls internal to the API will work.
|
This method will take a method that has been part of a redirect of some sort and see if it's valid, which means that it's located beneath our base. If yes, we return it normalized without that very base. |
Helper-function for a registered consumer to obtain a request token, as used by oauth. Use it like this: >>> oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER, CONSUMER_SECRET, None, None) >>> sca = scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator) >>> token, secret = sca.fetch_request_token() >>> authorization_url = sca.get_request_token_authorization_url(token) Please note the None passed as token & secret to the authenticator. |
Helper-function for a registered consumer to exchange an access token for a request token. Use it like this: >>> oauth_authenticator = scapi.authentication.OAuthAuthenticator(CONSUMER, CONSUMER_SECRET, request_token, request_token_secret) >>> sca = scapi.ApiConnector(host=API_HOST, authenticator=oauth_authenticator) >>> token, secret = sca.fetch_access_token() Please note the values passed as token & secret to the authenticator. |
Simple helper function to generate the url needed to ask a user for request token authorization. See also fetch_request_token. Possible usage: >>> import webbrowser >>> sca = scapi.ApiConnector() >>> authorization_url = sca.get_request_token_authorization_url(token) >>> webbrowser.open(authorization_url) |
|
LIST_OFFSET_PARAMETERThe query-parameter that is used to request results being limited to a certain amount. Currently this is of no use and just for completeness sake.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Sep 10 00:58:49 2009 | http://epydoc.sourceforge.net |