API-Twitter

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN


    % cpanm API::Twitter

If you are installing into a system-wide directory, you may need to pass the
"-S" flag to cpanm, which uses sudo to install the module:

    % cpanm -S API::Twitter

## Installing with the CPAN shell

Alternatively, if your CPAN shell is set up, you should just be able to do:

    % cpan API::Twitter

## Manual installation

As a last resort, you can manually install it. Download the tarball, untar it,
then build it:

    % perl Makefile.PL
    % make && make test

README.mkdn  view on Meta::CPAN

functionality. Please read the documentation for API::Client for more
usage information.

# ATTRIBUTES

## access\_token

    $twitter->access_token;
    $twitter->access_token('ACCESS_TOKEN');

The access\_token attribute should be set to an API access\_token associated with
your account.

## access\_token\_secret

    $twitter->access_token_secret;
    $twitter->access_token_secret('ACCESS_TOKEN_SECRET');

The access\_token\_secret attribute should be set to an API access\_token\_secret
associated with your account.

## consumer\_key

    $twitter->consumer_key;
    $twitter->consumer_key('CONSUMER_KEY');

The consumer\_key attribute should be set to an API consumer\_key associated with
your account.

## consumer\_secret

    $twitter->consumer_secret;
    $twitter->consumer_secret('CONSUMER_SECRET');

The consumer\_secret attribute should be set to an API consumer\_secret
associated with your account.

## identifier

    $twitter->identifier;
    $twitter->identifier('IDENTIFIER');

The identifier attribute should be set to a string that identifies your app.

## debug

    $twitter->debug;
    $twitter->debug(1);

The debug attribute if true prints HTTP requests and responses to standard out.

## fatal

README.mkdn  view on Meta::CPAN

    $twitter->timeout(5);

The timeout attribute determines how long an HTTP connection should be kept
alive. This attribute defaults to 10.

## url

    $twitter->url;
    $twitter->url(Mojo::URL->new('https://api.twitter.com'));

The url attribute set the base/pre-configured URL object that will be used in
all HTTP requests. This attribute expects a [Mojo::URL](https://metacpan.org/pod/Mojo::URL) object.

## user\_agent

    $twitter->user_agent;
    $twitter->user_agent(Mojo::UserAgent->new);

The user\_agent attribute set the pre-configured UserAgent object that will be
used in all HTTP requests. This attribute expects a [Mojo::UserAgent](https://metacpan.org/pod/Mojo::UserAgent) object.

# METHODS

## action

    my $result = $twitter->action($verb, %args);

    # e.g.

lib/API/Twitter.pm  view on Meta::CPAN

functionality. Please read the documentation for API::Client for more
usage information.

=head1 ATTRIBUTES

=head2 access_token

    $twitter->access_token;
    $twitter->access_token('ACCESS_TOKEN');

The access_token attribute should be set to an API access_token associated with
your account.

=head2 access_token_secret

    $twitter->access_token_secret;
    $twitter->access_token_secret('ACCESS_TOKEN_SECRET');

The access_token_secret attribute should be set to an API access_token_secret
associated with your account.

=head2 consumer_key

    $twitter->consumer_key;
    $twitter->consumer_key('CONSUMER_KEY');

The consumer_key attribute should be set to an API consumer_key associated with
your account.

=head2 consumer_secret

    $twitter->consumer_secret;
    $twitter->consumer_secret('CONSUMER_SECRET');

The consumer_secret attribute should be set to an API consumer_secret
associated with your account.

=head2 identifier

    $twitter->identifier;
    $twitter->identifier('IDENTIFIER');

The identifier attribute should be set to a string that identifies your app.

=head2 debug

    $twitter->debug;
    $twitter->debug(1);

The debug attribute if true prints HTTP requests and responses to standard out.

=head2 fatal

lib/API/Twitter.pm  view on Meta::CPAN

    $twitter->timeout(5);

The timeout attribute determines how long an HTTP connection should be kept
alive. This attribute defaults to 10.

=head2 url

    $twitter->url;
    $twitter->url(Mojo::URL->new('https://api.twitter.com'));

The url attribute set the base/pre-configured URL object that will be used in
all HTTP requests. This attribute expects a L<Mojo::URL> object.

=head2 user_agent

    $twitter->user_agent;
    $twitter->user_agent(Mojo::UserAgent->new);

The user_agent attribute set the pre-configured UserAgent object that will be
used in all HTTP requests. This attribute expects a L<Mojo::UserAgent> object.

=head1 METHODS

=head2 action

    my $result = $twitter->action($verb, %args);

    # e.g.



( run in 0.654 second using v1.01-cache-2.11-cpan-49f99fa48dc )