Class: YADIS

Class | YADIS
In: | lib/yadis/yadis.rb
Parent: | Object

High level class for performing the Yadis protocol on a given URL. The YADIS.discover class method is a good place to get started in determining which services a URL supports.

### Methods

ca_path= discover filter_services new services

### Attributes

uri | [RW] |
xrds | [RW] |
xrds_uri | [RW] |

### Public Class methods

ca_path=(ca_path)

Set the path to a certificate authority pem file, for verifying server certificates of HTTPS pages. If you are interested in verifying certs like the mozilla web browser, have a look at the files here:

curl.haxx.se/docs/caextract.html

discover(uri)

Discover services for a given URI. Please note that no normalization will be done to the passed in URI, it should be a textually valid URI string before calling discover.

Returns nil if no XRDS was found, or a YADIS object on success. This method is essentially the same as YADIS.new, but does not raise any exceptions.

new(uri)

Discover services for a URI using the Yadis protocol. `uri` should be a valid URI represented as a string. This method may raise YADISParseError in the case of an invalid or unparsable XRDS file, or YADISHTTPError is the URI cannot be fetched.

### Public Instance methods

filter_services(filter)

Returns a list of services, ordered by priority, that match the filter. filter is a Proc object that produces ServiceEnpoint objects, subclasses of ServiceEnpoint or nil. This method is useful for extracting several types of services while maintaining priority, for example you may write a filter Proc to extract OpenID and LID ServiceEnpoint objects.

services()

Returns an Array Service objects sorted by priority.

[Validate]