Package biblio :: Package webquery :: Module basewebquery :: Class BaseKeyedWebQuery
[hide private]
[frames] | no frames]

Class BaseKeyedWebQuery

source code

  object --+        
           |        
impl.ReprObj --+    
               |    
    BaseWebquery --+
                   |
                  BaseKeyedWebQuery
Known Subclasses:

A Webquery that requires an access key.
Instance Methods [hide private]
 
__init__(self, root_url, key, timeout=5.0, limits=[])
Ctor, allowing the setting of a webservice access key.
source code
 
_build_request_url(self, sub_url)
Assemble the full url for requesting data.
source code

Inherited from BaseWebquery: request

Inherited from impl.ReprObj: __repr__, __str__, __unicode__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]

Inherited from BaseWebquery (private): _repr_fields

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, root_url, key, timeout=5.0, limits=[])
(Constructor)

source code 
Ctor, allowing the setting of a webservice access key.
Parameters:
  • root_url - See BaseWebquery. Either this or the sub_url passed to request must include a keyword formatting for the access key, i.e. %(key)s.
  • key (string) - The access or PAI key to be passed to the webservice for access.
  • timeout - See BaseWebquery.
  • limits - See BaseWebquery.
Overrides: object.__init__

_build_request_url(self, sub_url)

source code 

Assemble the full url for requesting data.

This builds the url for any request, including the access key. Either the root_url passed to the c'tor or the sub_url passed to the request must include keyword formatting for the access key, i.e. %(key)s.

Parameters:
Returns:
The url to be used for the webservice request, including the access key.
Overrides: BaseWebquery._build_request_url