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  -  WWW::INSTAPAPER::CLIENT (3)

.ds Aq ’

NAME

WWW::Instapaper::Client - An implementation of the Instapaper client API (see <http://www.instapaper.com/api>)

CONTENTS

SYNOPSIS



        require WWW::Instapaper::Client;
       
        my $paper = WWW::Instapaper::Client->new(
                username        => myname@mydomain.com, # E-mail OR username
                password        => SooperSekrit,
        );
       
        my $result = $paper->add(
                url   => http://some.domain/path/to/page.html,
                title => "Page Title",  # optional, will try to get automatically if not given
                selection => Some text on the page, #optional
        );
       
        if (defined $result) {
                print "URL added: ", $result->[0], "\n";  # http://instapaper.com/go/######
                print "Title: ", $result->[1], "\n";      # Title of page added
        }
        else {
                # Must be an error
                warn "Was error: " . $paper->error . "\n";
        }



DESCRIPTION

This module is an implementation of the Instapaper API.
new


        my $paper = WWW::Instapaper::Client->new( %parameters );



Returns a new instance of this class, configured with the appropriate parameters. Dies if invalid parameters are provided.

Possible parameters are:
user_agent The user agent (browser) the server will see. Defaults to WWW-Instapaper-Client/$VERSION.
username The Instapaper username. Often, but not always, an e-mail address. Defaults to $ENV{instapaper_user}
password The password for the user’s Instapaper account. The user may not have a password, in which case, any value works. Defaults to $ENV{instapaper_pass}
api_url The base URL for the Instapaper API. Defaults to https://www.instapaper.com/api. You shouldn’t need to change this unless you’re connecting to a non-Instapaper service that uses the same API.
http_proxy, http_proxyuser, http_proxypass The path to an HTTPS-capable proxy, and the username and password as appropriate. The standard HTTP_PROXY set of environment variables will work here; these are widely documented. You only need to specify these if you have a proxy <B>ANDB> you don’t have the environment variables set.

add


        my $result = $paper->add(
                url       =>  http://path.to/page,  # required
                title     =>  Page title,           # optional
                selection =>  Text from page,       # optional
        );
       
        if (defined $result) {
                print "URL added: ", $result->[0], "\n";  # http://instapaper.com/go/######
                print "Title: ", $result->[1], "\n";      # Title of page added
        }
        else {
                # Must be an error
                warn "Was error: " . $paper->error . "\n";
        }



Adds the specified page URL to Instapaper. If a title is not provided, Instapaper will attempt to acquire the title by retrieving the page; that is, we set auto-title = 1 for the Instapaper API when a title is not provided.

You may optionally provide text that represents a selection from the page.

If successful, add will return an ARRAYref containing the Instapaper go URL, and the page title as recorded by Instapaper.

If an error is encountered, add returns undefined and the error message is available in $paper-error()>.

authenticate


        $paper->authenticate or warn "Could not authenticate: ".$paper->error."\n";



Authenticates the user to Instapaper. This is useful to check that the credentials are valid before e.g. storing them for later use.

If successful, authenticate will return a true value.

If an error is encountered, authenticate returns undefined and the error message is available in $paper-error()>.

CHANGELOG

Release 0.9_001 Fixed dependency bug in Build.PL - forgot that Class::Base was required.

AUTHOR

Darren Meyer - DPMEYER on PAUSE

COPYRIGHT

(c) 2010 Darren Meyer (DPMEYER on PAUSE), and available under the same terms as Perl itself.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 227: ’=item’ outside of any ’=over’
Around line 231: You forgot a ’=back’ before ’=head1’
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWW::INSTAPAPER::CLIENT (3) 2016-04-03

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