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


Manual Reference Pages  -  WEBSERVICE::GOOGLE::READER (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



    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;
    }



DESCRIPTION

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.

METHODS

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

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

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

    Feed generators

The following methods request an ATOM feed and return a subclass of XML::Atom::Feed. These methods accept the following optional named parameters:
<B>orderB> / <B>sortB> The sort order of the entries: <B>descB> (default) or <B>ascB> in time. When ordering by <B>ascB>, Google only returns entries within 30 days, whereas the default order has no limitation.
<B>start_timeB> Request entries only newer than this time (represented as a unix timestamp).
<B>excludeB>(feed => $feed|[@feeds], tag => $tag|[@tags]) Accepts a hash reference to one or more of feed / tag / state. Each of which is a scalar or array reference.
<B>feedB>($feed) Accepts a single feed url.
<B>tagB>($tag) Accepts a single tag name. See TAGS
<B>stateB>($state) Accepts a single state name. See STATES.
<B>sharedB> Shortcut for <B>stateB>(’broadcast’).
<B>starredB> Shortcut for <B>stateB>(’starred’).
<B>unreadB> Shortcut for <B>stateB>(’reading-list’, exclude => { state => ’read’ })
<B>likedB> Shortcut for <B>stateB>(’like’).
<B>searchB>($query, %params) Accepts a query string and the following named parameters:
<B>feedB> / <B>stateB> / <B>tagB> One or more (as a array reference) feed / state / tag to search. The default is to search all feed subscriptions.
<B>resultsB> The total number of search results: defaults to 1000.
<B>countB> The number of entries per fetch: defaults to 40.
<B>orderB> / <B>sortB> The sort order of the entries: <B>descB> (default) or <B>ascB> in time.
<B>moreB> / <B>previousB> / <B>nextB> A feed generator only returns <B>B>$count<B>B> entries. If more are available, calling this method will return a feed with the next <B>B>$count<B>B> entries.

    List generators

The following methods return an object of type WebService::Google::Reader::ListElement.
<B>countsB> 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.
<B>feedsB> Returns the list of user subscriptions. The following accessors are provided: id, title, categories, firstitemmsec. categories is a reference to a list of ListElements providing accessors: id, label.
<B>preferencesB> Returns the list of preference settings. The following accessors are provided: id, value.
<B>tagsB> Returns the list of user-created tags. The following accessors are provided: id, shared.
<B>userinfoB> Returns the list of user information. The following accessors are provided: isBloggerUser, userId, userEmail.

    Edit feeds

The following methods are used to edit feed subscriptions.
<B>edit_feedB>($feed|[@feeds], %params) Requires a feed url or Feed object, or a reference to a list of them. The following named parameters are accepted:
<B>subscribeB> / <B>unsubscribeB> Flag indicating whether the target feeds should be added or removed from the user’s subscriptions.
<B>titleB> 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).
<B>tagB> / <B>stateB> / <B>untagB> / <B>unstateB> Accepts a tag / state or a reference to a list of tags / states for which to associate / unassociate the target feeds.
<B>tag_feedB>($feed|[@feeds], @tags)
<B>untag_feedB>($feed|[@feeds], @tags)
<B>state_feedB>($feed|[@feeds], @states)
<B>unstate_feedB>($feed|[@feeds], @states) Associate / unassociate a list of tags / states from a feed / feeds.
<B>subscribeB>(@feeds|[@feeds])
<B>unsubscribeB>(@feeds|[@feeds]) Subscribe or unsubscribe from a list of feeds.
<B>rename_feedB>($feed|[@feeds], $title) Renames a feed to the given title.
<B>mark_read_feedB>(@feeds|[@feeds]) Marks the feeds as read.

    Edit tags / states

The following methods are used to edit tags and states.
<B>edit_tagB>($tag|[@tags], %params)
<B>edit_stateB>($state|[@states], %params) Accepts the following parameters.
<B>shareB> / <B>publicB> Make the given tags / states public.
<B>unshareB> / <B>privateB> Make the given tags / states private.
<B>disableB> / <B>deleteB> Only tags (and not states) can be disabled.
<B>share_tagB>(@tags|[@tags])
<B>unshare_tagB>(@tags|[@tags])
<B>share_stateB>(@states|[@states])
<B>unshare_stateB>(@states|[@states]) Associate / unassociate the ’broadcast’ state with the given tags / states.
<B>delete_tagB>(@tags|[@tags]) Delete the given tags.
<B>rename_feed_tagB>($oldtag|[@oldtags], $newtag|[@newtags] Renames the tags associated with any feeds.
<B>rename_entry_tagB>($oldtag|[@oldtags], $newtag|[@newtags] Renames the tags associated with any individual entries.
<B>rename_tagB>($oldtag|[@oldtags], $newtag|[@newtags] Calls <B>rename_feed_tagB> and <B>rename_entry_tagB>, and finally <B>delete_tagB>.
<B>mark_read_tagB>(@tags|[@tags])
<B>mark_read_stateB>(@states|[@states]) Marks all entries as read for the given tags / states.

    Edit entries

The following methods are used to edit individual entries.
<B>edit_entryB>($entry|[@entries], %params)
<B>tagB> / <B>stateB> / <B>untagB> / <B>unstateB> Associate / unassociate the entries with the given tags / states.
<B>tag_entryB>($entry|[@entries], @tags)
<B>untag_entryB>($entry|[@entries], @tags)
<B>state_entryB>($entry|[@entries], @tags)
<B>unstate_entryB>($entry|[@entries], @tags) Associate / unassociate the entries with the given tags / states.
<B>share_entryB>(@entries|[@entries])
<B>unshare_entryB>(@entries|[@entries]) Marks all the given entries as broadcast.
<B>starB>(@entries|[@entries])
<B>star_entryB>(@entries|[@entries])
<B>unstarB>(@entries|[@entries])
<B>unstar_entryB>(@entries|[@entries]) Marks / unmarks all the given entries as starred.
<B>mark_read_entryB>(@entries|[@entries]) Marks all the given entries as read.
<B>likeB>(@entries|[@entries])
<B>like_entryB>(@entries|[@entries])
<B>unlikeB>(@entries|[@entries])
<B>unlike_entryB>(@entries|[@entries]) Marks / unmarks all the given entries as liked.

    Miscellaneous

These are a list of other useful methods.
<B>edit_preferenceB>($key, $value) Sets the given preference name to the given value.
<B>mark_readB>(feed => $feed|[@feeds], state => $state|[@states], tag => $tag|[@tags])
<B>opmlB> Exports feed subscriptions as OPML.
<B>pingB> Returns true / false on success / failure. Unsure of when this needs to be used.

    Private methods

The following private methods may be of use to others.
<B>_loginB> 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.
<B>_requestB> 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 <B>errorB>).
<B>_tokenB> This is automatically called from within methods that require a user token. If successful, the token is available via the <B>tokenB> accessor.
<B>_statesB> Returns a list of all the known states. See STATES.

TAGS

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

STATES

These are tags in a Google-specific namespace. The following are all the known used states.
read Entries which have been read.
kept-unread Entries which have been read, but marked unread.
fresh New entries from reading-list.
starred Entries which have been starred.
broadcast Entries which have been shared and made publicly available.
reading-list Entries from all subscriptions.
tracking-body-link-used Entries for which a link in the body has been clicked.
tracking-emailed Entries which have been mailed.
tracking-item-link-used Entries for which the title link has been clicked.
tracking-kept-unread Entries which have been kept unread. (Not sure how this differs from kept-unread).

SEE ALSO

XML::Atom::Feed

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

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

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

REQUESTS AND BUGS

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.

SUPPORT

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



    perldoc WebService::Google::Reader



You can also look for information at:
o GitHub Source Repository

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

o AnnoCPAN: Annotated CPAN documentation

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

o CPAN Ratings

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

o RT: CPAN’s request tracker

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

o Search CPAN

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

COPYRIGHT AND LICENSE

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.

AUTHOR

gray, <gray at cpan.org>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WEBSERVICE::GOOGLE::READER (3) 2015-07-02

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