GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WebService::Google::Reader(3) User Contributed Perl Documentation WebService::Google::Reader(3)

WebService::Google::Reader - Perl interface to the Google Reader API

    use WebService::Google::Reader;
    my $reader = WebService::Google::Reader->new(
        host     => 'www.inoreader.com',
        appid    => $appid,
        appkey   => $appey,
        username => $username,
        password => $password,
    );
    my $feed = $reader->unread(count => 100);
    my @entries = $feed->entries;
    # Fetch past entries.
    while ($reader->more($feed)) {
        my @entries = $feed->entries;
    }

The "WebService::Google::Reader" module provides an interface to webservices using the Google Reader API. The only tested webservice at this time is www.inoreader.com.

$reader = WebService::Google::Reader->new
Creates a new WebService::Google::Reader object. The following named parameters are accepted:
The hostname of the service.
Required for accessing any personalized or account-related functionality (reading-list, editing, etc.).
Inoreader requires users to also obtain an appid and appkey.

See <http://www.inoreader.com/developers/register-app>

Use https scheme for all requests, even when not required.
An optional useragent object.
Enable debugging. Default: 0. This will dump the headers and content for both requests and responses.
Disable compression. Default: 1. This is useful when debugging is enabled and you want to read the response content.
$error = $reader->error
Returns the error string, if any.
$response = $reader->response
Returns an HTTP::Response object for the last submitted request. Can be used to determine the details of an error.

The following methods request an ATOM feed and return a subclass of "XML::Atom::Feed". These methods accept the following optional named parameters:

The sort order of the entries: desc (default) or asc in time. When ordering by asc, Google only returns entries within 30 days, whereas the default order has no limitation.
Request entries only newer than this time (represented as a unix timestamp).
Accepts a hash reference to one or more of feed / tag / state. Each of which is a scalar or array reference.
Accepts a single feed url.
Accepts a single tag name. See "TAGS"
Accepts a single state name. See "STATES".
Shortcut for state('broadcast').
starred
Shortcut for state('starred').
Shortcut for state('reading-list', exclude => { state => 'read' })
Shortcut for state('like').
Accepts a query string and the following named parameters:
One or more (as a array reference) feed / state / tag to search. The default is to search all feed subscriptions.
The total number of search results: defaults to 1000.
The number of entries per fetch: defaults to 40.
The sort order of the entries: desc (default) or asc in time.
A feed generator only returns $count entries. If more are available, calling this method will return a feed with the next $count entries.

The following methods return an object of type "WebService::Google::Reader::ListElement".

Returns a list of subscriptions and a count of unread entries. Also listed are any tags or states which have positive unread counts. The following accessors are provided: id, count. The maximum count reported is 1000.
Returns the list of user subscriptions. The following accessors are provided: id, title, categories, firstitemmsec. categories is a reference to a list of "ListElement"s providing accessors: id, label.
Returns the list of preference settings. The following accessors are provided: id, value.
Returns the list of user-created tags. The following accessors are provided: id, shared.
Returns the list of user information. The following accessors are provided: isBloggerUser, userId, userEmail.

The following methods are used to edit feed subscriptions.

Requires a feed url or Feed object, or a reference to a list of them. The following named parameters are accepted:
Flag indicating whether the target feeds should be added or removed from the user's subscriptions.
Accepts a title to associate with the feed. This probaby wouldn't make sense to use when there are multiple feeds. (Maybe later will consider allowing a list here and zipping the feed and title lists).
Accepts a tag / state or a reference to a list of tags / states for which to associate / unassociate the target feeds.
Associate / unassociate a list of tags / states from a feed / feeds.
Subscribe or unsubscribe from a list of feeds.
Renames a feed to the given title.
Marks the feeds as read.

The following methods are used to edit tags and states.

Accepts the following parameters.
Make the given tags / states public.
Make the given tags / states private.
Only tags (and not states) can be disabled.
Associate / unassociate the 'broadcast' state with the given tags / states.
Delete the given tags.
Renames the tags associated with any feeds.
Renames the tags associated with any individual entries.
Calls rename_feed_tag and rename_entry_tag, and finally delete_tag.
Marks all entries as read for the given tags / states.

The following methods are used to edit individual entries.

Associate / unassociate the entries with the given tags / states.
Associate / unassociate the entries with the given tags / states.
Marks all the given entries as "broadcast".
Marks / unmarks all the given entries as "starred".
Marks all the given entries as "read".
Marks / unmarks all the given entries as "liked".

These are a list of other useful methods.

Sets the given preference name to the given value.
Exports feed subscriptions as OPML.
Returns true / false on success / failure. Unsure of when this needs to be used.

The following private methods may be of use to others.

_login
This is automatically called from within methods that require authorization. An optional parameter is accepted which when true, will force a login even if a previous login was successful. The end result of a successful login is to set the auth token.
_request
Given an "HTTP::Request", this will perform the request and if the response indicates a bad (expired) token, it will request another token before performing the request again. Returns an "HTTP::Response" on success, false on failure (check error).
_token
This is automatically called from within methods that require a user token. If successful, the token is available via the token accessor.
_states
Returns a list of all the known states. See "STATES".

The following characters are not allowed: "<>?&/\^

These are tags in a Google-specific namespace. The following are all the known used states.

Entries which have been read.
Entries which have been read, but marked unread.
New entries from reading-list.
Entries which have been starred.
Entries which have been shared and made publicly available.
Entries from all subscriptions.
Entries for which a link in the body has been clicked.
Entries which have been mailed.
Entries for which the title link has been clicked.
Entries which have been kept unread. (Not sure how this differs from "kept-unread").

XML::Atom::Feed

<https://groups.google.com/group/fougrapi/>

<http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI>

<http://www.inoreader.com/developers/>

Please report any bugs or feature requests to <http://rt.cpan.org/Public/Bug/Report.html?Queue=WebService-Google-Reader>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.

    perldoc WebService::Google::Reader

You can also look for information at:

  • GitHub Source Repository

    <http://github.com/gray/webservice-google-reader>

  • AnnoCPAN: Annotated CPAN documentation

    <http://annocpan.org/dist/WebService-Google-Reader>

  • CPAN Ratings

    <http://cpanratings.perl.org/d/WebService-Google-Reader>

  • RT: CPAN's request tracker

    <http://rt.cpan.org/Public/Dist/Display.html?Dist=WebService-Google-Reader>

  • Search CPAN

    <http://search.cpan.org/dist/WebService-Google-Reader/>

Copyright (C) 2007-2015 gray <gray at cpan.org>, all rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

gray, <gray at cpan.org>

2015-07-02 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.