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

Class ProxyResolver

source code

object --+
         |
        ProxyResolver

Python interface to a remote XRI proxy resolver.

Instance Methods
 
__init__(self, proxy_url='http://proxy.xri.net/')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
str
queryURL(self, xri, service_type=None)
Build a URL to query the proxy resolver.
source code
(unicode, list of ElementTree.Elements)
query(self, xri, service_types)
Resolve some services for an XRI.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, proxy_url='http://proxy.xri.net/')
(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.XRDSError 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)