Package yadis :: Module xrires :: Class ProxyResolver
[hide private]
[frames] | no frames]

Class ProxyResolver

source code

object --+
         |
        ProxyResolver

Python interface to a remote XRI proxy resolver.

Instance Methods [hide private]
  __init__(self, proxy_url=DEFAULT_PROXY)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
str queryURL(self, xri, service_type=None)
Build a URL to query the proxy resolver.
(unicode, list of ElementTree.Elements) query(self, xri, service_types)
Resolve some services for an XRI.

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


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, proxy_url=DEFAULT_PROXY)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

queryURL(self, xri, service_type=None)

source code 

Build a URL to query the proxy resolver.
Parameters:
  • xri (unicode) - An XRI to resolve.
  • service_type (str) - The service type to resolve, if you desire service endpoint selection. A service type is a URI.
Returns: str
a URL

query(self, xri, service_types)

source code 

Resolve some services for an XRI.

Note: I don't implement any service endpoint selection beyond what the resolver I'm querying does, so the Services I return may well include Services that were not of the types you asked for.

May raise fetchers.HTTPFetchingError or etxrd.XRDError if the fetching or parsing don't go so well.
Parameters:
  • xri (unicode) - An XRI to resolve.
  • service_types (list of str) - A list of services types to query for. Service types are URIs.
Returns: (unicode, list of ElementTree.Elements)
tuple of (CanonicalID, Service elements)