Home | Trees | Indices | Help |
---|
|
object --+ | Helper.Helper --+ | HttpHelper
Helper class for sending requests of HTTP with GET and POST
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
login_cred =
Auth for HTTP access. |
|||
client_cred =
Auth for client credentials. |
|||
api_url = None
|
|||
api_param = None
|
|||
request_type = None
|
|||
responseFormat = None
|
|||
Inherited from |
|
|||
Inherited from |
|
Args : request_type (str) : Takes POST or GET as type of HTTP requests api_url (str) : The url to the base of the API call (everything but the call itself) login_cred (dict) : Optionally takes a username and password if the HTTP takes authentication Returns : null Raises : null
|
Sends the api call and returns the response Args : constructed_url: (str) url and parameters to send Returns : the_page: (json) response body from the api call code: (int) response code from the HTTP response error: (string) error response if api call returns error Raises : urllib2.HTTPError,urllib2.URLError |
constructs and sends the api call and returns the response Args : call: (str) Name of the api service you are calling data: (list) The parameters you will be providing the api service Returns : null Raises : null |
Helper function to create url in either path or parameter api methods Args : data: (str) values sent to api query theurl: (str) the http path to the api method Returns : null Raises : null |
Creates the authentication for accessing api Args : theurl: (str) the http path to the api method Returns : null Raises :null |
translates html entities into a readable string Args : string: (str) an html entity Returns : unescaped: (str) returns a readable string Raises :null |
|
login_credAuth for HTTP access. type(dict) : {'username':'x','password':'y'}
|
client_credAuth for client credentials. to be added to header.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Nov 05 17:17:48 2013 | http://epydoc.sourceforge.net |