.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::Twitter 3pm" .TH Net::Twitter 3pm "2018-01-18" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Twitter \- A perl interface to the Twitter API .SH "VERSION" .IX Header "VERSION" version 4.01043 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Net::Twitter; \& use Scalar::Util \*(Aqblessed\*(Aq; \& \& # When no authentication is required: \& my $nt = Net::Twitter\->new(legacy => 0); \& \& # As of 13\-Aug\-2010, Twitter requires OAuth for authenticated requests \& my $nt = Net::Twitter\->new( \& traits => [qw/API::RESTv1_1/], \& consumer_key => $consumer_key, \& consumer_secret => $consumer_secret, \& access_token => $token, \& access_token_secret => $token_secret, \& ); \& \& my $result = $nt\->update(\*(AqHello, world!\*(Aq); \& \& eval { \& my $statuses = $nt\->friends_timeline({ since_id => $high_water, count => 100 }); \& for my $status ( @$statuses ) { \& print "$status\->{created_at} <$status\->{user}{screen_name}> $status\->{text}\en"; \& } \& }; \& if ( my $err = $@ ) { \& die $@ unless blessed $err && $err\->isa(\*(AqNet::Twitter::Error\*(Aq); \& \& warn "HTTP Response Code: ", $err\->code, "\en", \& "HTTP Message......: ", $err\->message, "\en", \& "Twitter error.....: ", $err\->error, "\en"; \& } .Ve .SH "TWITTER API V1.1 SUPPORT" .IX Header "TWITTER API V1.1 SUPPORT" This version of Net::Twitter provides Twitter \s-1API\s0 v1.1 support. Enable it by including the \f(CW\*(C`API::RESTv1_1\*(C'\fR trait instead of \f(CW\*(C`API::REST\*(C'\fR. Using Twitter \s-1API\s0 v1.1 may require changes to you code! It is not completely backwards compatible with v1. .PP For help migrating your application to Twitter \s-1API\s0 v1.1, see Net::Twitter::Manual::MigratingToV1_1. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module has been superseded by Twitter::API. Please update as soon as you possibly can to use new features and the new \s-1API\s0 versions. This module will no longer be supported. .PP This module provides a perl interface to the Twitter APIs. See for a full description of the Twitter APIs. .SH "TWITTER API VERSION 1.1" .IX Header "TWITTER API VERSION 1.1" Twitter will (perhaps has by the time you read this) deprecated version 1 of the \s-1API.\s0 Documentation, here, assumes version 1.1 of the \s-1API.\s0 For version 1 documentation, see Net::Twitter::Role::API::REST. .PP To use Twitter \s-1API\s0 version 1.1, simply replace \f(CW\*(C`API::REST\*(C'\fR in the \f(CW\*(C`traits\*(C'\fR argument to \f(CW\*(C`new\*(C'\fR with \f(CW\*(C`API::RESTv1_1\*(C'\fR. The \f(CW\*(C`Net::Twitter\*(C'\fR \s-1API\s0 is backwards compatible to the extent possible. If Twitter does not provide a 1.1 endpoint for a version 1 call, \f(CW\*(C`Net::Twitter\*(C'\fR cannot support it, of course. .PP Twitter \s-1API\s0 version 1.1 requires OAuth authentication for all calls. There is no longer an \s-1IP\s0 address limit and a per-user limit. Each \s-1API\s0 call has it's own rate limit. Most are 15 calls reset every 15 minutes. Others are 180 calls, reset every 15 minutes. These limits may change. For current rate limits, see . .SH "OMG! THE MOOSE!" .IX Header "OMG! THE MOOSE!" Net::Twitter is Moose based. Moose provides some advantages, including the ability for the maintainer of this module to respond quickly to Twitter \s-1API\s0 changes. .PP See Net::Twitter::Lite if you need an alternative without Moose and its dependencies. .PP Net::Twitter::Lite's \s-1API\s0 method definitions and documentation are generated from Net::Twitter. It is a related module, but does not depend on Net::Twitter or Moose for installation. .SH "RETURN VALUES" .IX Header "RETURN VALUES" Net::Twitter decodes the data structures returned by the Twitter \s-1API\s0 into native perl data structures (\s-1HASH\s0 references and \s-1ARRAY\s0 references). The full layout of those data structures are not documented, here. They change often, usually with the addition of new elements, and documenting all of those changes would be a significant challenge. .PP Instead, rely on the online Twitter \s-1API\s0 documentation and inspection of the returned data. .PP The Twitter \s-1API\s0 online documentation is located at . .PP To inspect the data, use Data::Dumper or similar module of your choice. Here's a simple example using Data::Dumper: .PP .Vb 1 \& use Data::Dumper; \& \& my $r = $nt\->search($search_term); \& print Dumper $r; .Ve .PP For more information on perl data structures, see perlreftut, perldsc, and perllol. .SH "METHODS AND ARGUMENTS" .IX Header "METHODS AND ARGUMENTS" .IP "new" 4 .IX Item "new" This constructs a \f(CW\*(C`Net::Twitter\*(C'\fR object. It takes several named parameters, all of them optional: .RS 4 .IP "traits" 4 .IX Item "traits" An \s-1ARRAY\s0 ref of traits used to control which APIs the constructed \&\f(CW\*(C`Net::Twitter\*(C'\fR object will support and how it handles errors. Possible values are: .RS 4 .IP "API::RESTv1_1" 4 .IX Item "API::RESTv1_1" Provides support for the Twitter \s-1REST API\s0 version 1.1 methods. .IP "API::Search" 4 .IX Item "API::Search" Deprecated. Use \*(L"search\*(R" in API::RESTv1_1 instead. .IP "AppAuth" 4 .IX Item "AppAuth" Provides Application-Only Authentication with methods, \&\f(CW\*(C`request_access_token\*(C'\fR and \f(CW\*(C`invalidate_token\*(C'\fR. See Net::Twitter::Role::AppAuth. .Sp Example: .Sp .Vb 5 \& my $nt = Net::Twitter\->new( \& traits => [ qw/AppAuth API::RESTv1_1/ ], \& consumer_key => \*(Aqmy\-consumer\-key\*(Aq, \& consumer_secret => \*(Aqmy\-consumer\-secret\*(Aq, \& ); \& \& $nt\->request_access_token; \& say \*(Aqtoken: \*(Aq, $nt\->access_token; \& my $r = $nt\->followers_ids({ \& screen_name => \*(Aqtimtoady\*(Aq, \& cursor => \-1, \& }); \& \& # good until invalidated, with ... \& $nt\->invalidate_token .Ve .IP "AutoCursor" 4 .IX Item "AutoCursor" \&\f(CW\*(C`AutoCursor\*(C'\fR is a parameterized trait that provides an automatic loop for cursored calls, returning an \s-1ARRAY\s0 reference to the combined results. By default, it handles \f(CW\*(C`friends_ids\*(C'\fR and \f(CW\*(C`followers_ids\*(C'\fR. See Net::Twitter::Role::AutoCursor for details. .IP "InflateObjects" 4 .IX Item "InflateObjects" When this optional trait is included, Net::Twitter inflates \s-1HASH\s0 refs returned by Twitter into objects with read accessors for each element. In addition, it inflates dates to DateTime objects and URLs to \s-1URI\s0 objects. Objects that include a \f(CW\*(C`created_at\*(C'\fR attribute also have a \f(CW\*(C`relative_created_at\*(C'\fR method. .Sp For example, with \f(CW\*(C`InflateObjects\*(C'\fR applied, the method returns an array of status objects: .Sp .Vb 3 \& $r = $nt\->friends_timeline; \& for my $status ( @$r ) { \& $r\->user\->screen_name; # same as $r\->{user}{screen_name} \& \& # $created_at is a DateTime; $age is a DateTime::Duration \& my $age = DateTime\->now \- $r\->created_at; \& \& # print an age in a similar style to the Twitter web site, e.g.: \& # less than a minute ago \& # about a minute ago \& # 6 minutes ago \& # 1 day ago \& # etc. \& print $r\->relative_created_at; .Ve .IP "Legacy" 4 .IX Item "Legacy" This trait provides backwards compatibility to \f(CW\*(C`Net::Twitter\*(C'\fR versions prior to 3.00. It implies the traits \f(CW\*(C`API::REST\*(C'\fR, \f(CW\*(C`API::Search\*(C'\fR, \&\f(CW\*(C`API::TwitterVision\*(C'\fR, and \f(CW\*(C`API::WrapError\*(C'\fR. It also provides additional functionality to ensure consistent behavior for applications written for use with legacy versions of \f(CW\*(C`Net::Twitter\*(C'\fR. .Sp In the current version, this trait is automatically included if the \f(CW\*(C`traits\*(C'\fR option is not specified. This ensures backwards compatibility for existing applications using \f(CW\*(C`Net::Twitter\*(C'\fR versions prior to 3.00. See section \&\*(L"\s-1LEGACY COMPATIBILITY\*(R"\s0 for more details. .IP "OAuth" 4 .IX Item "OAuth" The \f(CW\*(C`OAuth\*(C'\fR trait provides OAuth authentication rather than the default Basic Authentication for Twitter \s-1API\s0 method calls. See the \*(L"Authentication\*(R" section and Net::Twitter::Role::OAuth for full documentation. .IP "RateLimit" 4 .IX Item "RateLimit" The \f(CW\*(C`RateLimit\*(C'\fR trait adds utility methods that return information about the current rate limit status. See Net::Twitter::Role::RateLimit for details. .IP "RetryOnError" 4 .IX Item "RetryOnError" The \f(CW\*(C`RetryOnError\*(C'\fR trait automatically retries Twitter \s-1API\s0 calls with temporary failures. See Net::Twitter::Role::RetryOnError for details. .IP "WrapError" 4 .IX Item "WrapError" \&\f(CW\*(C`Net::Twitter\*(C'\fR normally throws exceptions on error. When this trait is included, \f(CW\*(C`Net::Twitter\*(C'\fR returns undef when a method fails and makes the error available through method \f(CW\*(C`get_error\*(C'\fR. This is the way all errors were handled in Net::Twitter versions prior to version 3.00. .RE .RS 4 .Sp Some examples of using the \f(CW\*(C`traits\*(C'\fR parameter in \f(CW\*(C`new\*(C'\fR: .Sp .Vb 2 \& # provide support for *only* the REST API; throw exceptions on error \& $nt = Net::Twitter\->new(traits => [\*(AqAPI::RESTv1_1\*(Aq]); \& \& # provide support for both the REST and Search APIs; wrap errors \& $nt = Net::Twitter\->new(traits => [qw/API::RESTv1_1 API::Search WrapError/]); \& \& # Provide legacy support for applications written with Net::Twitter \& # prior to version 3.0. \& $nt = Net::Twitter\->new(traits => [\*(AqLegacy\*(Aq]); .Ve .RE .IP "legacy" 4 .IX Item "legacy" A boolean. If set to 0, \f(CW\*(C`new\*(C'\fR constructs a \f(CW\*(C`Net::Twitter\*(C'\fR object implementing the \s-1REST API\s0 and throws exceptions on \s-1API\s0 method errors. .Sp .Vb 1 \& Net::Twitter\->new(legacy => 0); .Ve .Sp is a shortcut for: .Sp .Vb 1 \& Net::Twitter\->new(traits => [\*(AqAPI::RESTv1_1\*(Aq]); .Ve .Sp If set to 1, \f(CW\*(C`new\*(C'\fR constructs a \f(CW\*(C`Net::Twitter\*(C'\fR object with the \f(CW\*(C`Legacy\*(C'\fR trait. .Sp .Vb 1 \& Net::Twitter\->new(legacy => 1); .Ve .Sp is a shortcut for: .Sp .Vb 1 \& Net::Twitter\->new(traits => [\*(AqLegacy\*(Aq]); .Ve .IP "username" 4 .IX Item "username" This is the username for Basic Authentication. \s-1NOTE:\s0 as of 31\-Aug\-2010, Twitter no longer supports Basic Authentication. Use OAuth instead. Other Twitter compatible services may, however, accept Basic Authentication, so support for it remains in \f(CW\*(C`Net::Twitter\*(C'\fR. .IP "password" 4 .IX Item "password" This is the password used for Basic Authentication. .IP "clientname" 4 .IX Item "clientname" The value for the \f(CW\*(C`X\-Twitter\-Client\-Name\*(C'\fR \s-1HTTP\s0 header. It defaults to \*(L"Perl Net::Twitter\*(R". Note: This option has nothing to do with the \*(L"via\*(R" application byline. .IP "clientver" 4 .IX Item "clientver" The value for the \f(CW\*(C`X\-Twitter\-Client\-Version\*(C'\fR \s-1HTTP\s0 header. It defaults to current version of the \f(CW\*(C`Net::Twitter\*(C'\fR module. .IP "clienturl" 4 .IX Item "clienturl" The value for the \f(CW\*(C`X\-Twitter\-Client\-URL\*(C'\fR \s-1HTTP\s0 header. It defaults to the search.cpan.org page for the \f(CW\*(C`Net::Twitter\*(C'\fR distribution. .IP "useragent_class" 4 .IX Item "useragent_class" The \f(CW\*(C`LWP::UserAgent\*(C'\fR compatible class used internally by \f(CW\*(C`Net::Twitter\*(C'\fR. It defaults to \*(L"LWP::UserAgent\*(R". For \s-1POE\s0 based applications, consider using \&\*(L"LWP::UserAgent::POE\*(R". .IP "useragent_args" 4 .IX Item "useragent_args" An \s-1HASH\s0 ref of arguments to pass to constructor of the class specified with \&\f(CW\*(C`useragent_class\*(C'\fR, above. It defaults to {} (an empty \s-1HASH\s0 ref). .IP "useragent" 4 .IX Item "useragent" The value for \f(CW\*(C`User\-Agent\*(C'\fR \s-1HTTP\s0 header. It defaults to \&\*(L"Net::Twitter/4.01043 (Perl)\*(R". .IP "source" 4 .IX Item "source" Twitter on longer uses the \f(CW\*(C`source\*(C'\fR parameter. Support for it remains in \&\f(CW\*(C`Net::Twitter\*(C'\fR for any compatible services that may use it. It was originally used by Twitter to provide an \*(L"via\*(R" application byline. .IP "apiurl" 4 .IX Item "apiurl" The \s-1URL\s0 for the Twitter \s-1API.\s0 This defaults to \*(L"http://api.twitter.com/1\*(R". This option is available when the \f(CW\*(C`API::RESTv1_1\*(C'\fR trait is included. .IP "apihost" 4 .IX Item "apihost" \&\s-1DEPRECATED\s0 \- Setting the \f(CW\*(C`apiurl\*(C'\fR is sufficient. .IP "apirealm" 4 .IX Item "apirealm" A string containing the Twitter \s-1API\s0 realm used for Basic Authentication. It defaults to \*(L"Twitter \s-1API\*(R".\s0 This option is available when the \f(CW\*(C`API::RESTv1_1\*(C'\fR trait is included. .IP "identica" 4 .IX Item "identica" If set to 1, \f(CW\*(C`Net::Twitter\*(C'\fR overrides the defaults for \f(CW\*(C`apiurl\*(C'\fR, \f(CW\*(C`apihost\*(C'\fR, and \f(CW\*(C`apirealm\*(C'\fR to \*(L"http://identi.ca/api\*(R", \*(L"identi.ca:80\*(R", and \*(L"Laconica \s-1API\*(R"\s0 respectively. It defaults to 0. This option is available when the \&\f(CW\*(C`API::RESTv1_1\*(C'\fR trait is included. .IP "consumer_key" 4 .IX Item "consumer_key" A string containing the OAuth consumer key provided by Twitter when an application is registered. This option is available when the \f(CW\*(C`OAuth\*(C'\fR trait is included. .IP "consumer_secret" 4 .IX Item "consumer_secret" A string containing the OAuth consumer secret. This option is available when the \f(CW\*(C`OAuth\*(C'\fR trait is included. .IP "ssl" 4 .IX Item "ssl" If set to 1, an \s-1SSL\s0 connection will be used for all \s-1API\s0 calls. Defaults to 1. .IP "netrc" 4 .IX Item "netrc" (Optional) Sets the \fImachine\fR key to look up in \f(CW\*(C`.netrc\*(C'\fR to obtain credentials. If set to 1, Net::Twitter will use the value of the \f(CW\*(C`netrc_machine\*(C'\fR option (below). .Sp .Vb 7 \& # in .netrc \& machine api.twitter.com \& login YOUR_TWITTER_USER_NAME \& password YOUR_TWITTER_PASSWORD \& machine semifor.twitter.com \& login semifor \& password SUPERSECRET \& \& # in your perl program \& $nt = Net::Twitter\->new(netrc => 1); \& $nt = Net::Twitter\->new(netrc => \*(Aqsemifor.twitter.com\*(Aq); .Ve .IP "netrc_machine" 4 .IX Item "netrc_machine" (Optional) Sets the \f(CW\*(C`machine\*(C'\fR entry to look up in \f(CW\*(C`.netrc\*(C'\fR when \f(CW\*(C`> is used. Defaults to \f(CW\*(C`api.twitter.com\*(C'\fR. .IP "decode_html_entities" 4 .IX Item "decode_html_entities" Twitter encodes \s-1HTML\s0 entities in the \f(CW\*(C`text\*(C'\fR field of statuses. Set this option to 1 to have them automatically decoded. Default 0. .RE .RS 4 .RE .ie n .IP "credentials($username, $password)" 4 .el .IP "credentials($username, \f(CW$password\fR)" 4 .IX Item "credentials($username, $password)" Set the credentials for Basic Authentication. This is helpful for managing multiple accounts. .IP "ua" 4 .IX Item "ua" Provides access to the constructed user agent object used internally by \&\f(CW\*(C`Net::Twitter\*(C'\fR. Use it with caution. .SH "AUTHENTICATION" .IX Header "AUTHENTICATION" With \s-1REST API\s0 version 1.1, all \s-1API\s0 calls require OAuth. Since 31\-Aug\-2010, version 1 required OAuth requests requiring authentication. Other Twitter compatible services, like Identi.ca, accept Basic Authentication. So, \&\f(CW\*(C`Net::Twitter\*(C'\fR provides support for both. .PP To set up OAuth, include the \f(CW\*(C`consumer_key\*(C'\fR and \f(CW\*(C`consumer_secret\*(C'\fR options to \&\*(L"new\*(R". When they are provided, the \f(CW\*(C`OAuth\*(C'\fR trait will be automatically included. See Net::Twitter::Role::OAuth for more information on using OAuth, including examples. .PP To set up Basic Authentication in \f(CW\*(C`Net::Twitter\*(C'\fR, provide the \f(CW\*(C`username\*(C'\fR and \&\f(CW\*(C`password\*(C'\fR options to \*(L"new\*(R" or call the \*(L"credentials\*(R" method. .PP In addition to the arguments specified for each \s-1API\s0 method described below, an additional \f(CW\*(C`\-authenticate\*(C'\fR parameter can be passed. To request an \&\f(CW\*(C`Authorization\*(C'\fR header, pass \f(CW\*(C`\-authenticate => 1\*(C'\fR; to suppress an authentication header, pass \f(CW\*(C`\-authenticate => 0\*(C'\fR. Even if requested, an Authorization header will not be added if there are no user credentials (username and password for Basic Authentication; access tokens for OAuth). .PP This is probably only useful for non-Twitter sites that use the Twitter \s-1API\s0 and support unauthenticated calls. .SH "API METHODS AND ARGUMENTS" .IX Header "API METHODS AND ARGUMENTS" Most Twitter \s-1API\s0 methods take parameters. All Net::Twitter \s-1API\s0 methods will accept a \s-1HASH\s0 ref of named parameters as specified in the Twitter \s-1API\s0 documentation. For convenience, many Net::Twitter methods accept simple positional arguments. The positional parameter passing style is optional; you can always use the named parameters in a \s-1HASH\s0 reference if you prefer. .PP You may pass any number of required parameters as positional parameters. You must pass them in the order specified in the documentation for each method. Optional parameters must be passed as named parameters in a \s-1HASH\s0 reference. The \&\s-1HASH\s0 reference containing the named parameters must be the final parameter to the method call. Any required parameters not passed as positional parameters, must be included in the named parameter \s-1HASH\s0 reference. .PP For example, the \s-1REST API\s0 method \f(CW\*(C`update\*(C'\fR has one required parameter, \&\f(CW\*(C`status\*(C'\fR. You can call \f(CW\*(C`update\*(C'\fR with a \s-1HASH\s0 ref argument: .PP .Vb 1 \& $nt\->update({ status => \*(AqHello world!\*(Aq }); .Ve .PP Or, you can use the convenient, positional parameter form: .PP .Vb 1 \& $nt\->update(\*(AqHello world!\*(Aq); .Ve .PP The \f(CW\*(C`update\*(C'\fR method also has an optional parameter, \f(CW\*(C`in_reply_to_status_id\*(C'\fR. To use it, you \fBmust\fR use the \s-1HASH\s0 ref form: .PP .Vb 1 \& $nt\->update({ status => \*(AqHello world!\*(Aq, in_reply_to_status_id => $reply_to }); .Ve .PP You may use the convenient positional form for the required \f(CW\*(C`status\*(C'\fR parameter with the optional parameters specified in the named parameter \s-1HASH\s0 reference: .PP .Vb 1 \& $nt\->update(\*(AqHello world!\*(Aq, { in_reply_to_status_id => $reply_to }); .Ve .PP Convenience form is provided for the required parameters of all \s-1API\s0 methods. So, these two calls are equivalent: .PP .Vb 2 \& $nt\->friendship_exists({ user_a => $fred, user_b => $barney }); \& $nt\->friendship_exists($fred, $barney); .Ve .PP Many \s-1API\s0 methods have aliases. You can use the \s-1API\s0 method name, or any of its aliases, as you prefer. For example, these calls are all equivalent: .PP .Vb 3 \& $nt\->friendship_exists($fred, $barney); \& $nt\->relationship_exists($fred, $barney); \& $nt\->follows($fred, $barney); .Ve .PP Aliases support both the \s-1HASH\s0 ref and convenient forms: .PP .Vb 1 \& $nt\->follows({ user_a => $fred, user_b => $barney }); .Ve .SS "Cursors and Paging" .IX Subsection "Cursors and Paging" Some methods return partial results a page at a time. Originally, methods that returned partial results used a \f(CW\*(C`page\*(C'\fR parameter. A more recent addition to the Twitter \s-1API\s0 for retrieving multiple pages uses the \f(CW\*(C`cursor\*(C'\fR parameter. Usually, a method uses either the \f(CW\*(C`page\*(C'\fR parameter or the \f(CW\*(C`cursor\*(C'\fR parameter, but not both. There have been exceptions to this rule when Twitter deprecates the use of \f(CW\*(C`page\*(C'\fR for a method in favor of \f(CW\*(C`cursor\*(C'\fR. In that case, both methods may work during a transition period. So, if a method supports both, you should always use the \f(CW\*(C`cursor\*(C'\fR parameter. .PP \fIPaging\fR .IX Subsection "Paging" .PP For methods that support paging, the first page is returned by passing \&\f(CW\*(C`page => 1\*(C'\fR, the second page by passing \f(CW\*(C`page => 2\*(C'\fR, etc. If no \&\f(CW\*(C`page\*(C'\fR parameter is passed, the first page is returned. .PP Here's an example that demonstrates how to obtain all favorites in a loop: .PP .Vb 4 \& my @favs; \& for ( my $page = 1; ; ++$page ) { \& my $r = $nt\->favorites({ page => $page }); \& last unless @$r; \& \& push @favs, @$r; \& } .Ve .PP \fICursors\fR .IX Subsection "Cursors" .PP Cursoring employs a different strategy. To obtain the first page of results, pass \f(CW\*(C`cursor => \-1\*(C'\fR. Twitter returns a reference to a hash that includes entries \f(CW\*(C`next_cursor\*(C'\fR, \f(CW\*(C`previous_cursor\*(C'\fR, and an entry with a reference to an array containing a page of the requested items. The key for the array reference will be named \f(CW\*(C`users\*(C'\fR, \&\f(CW\*(C`ids\*(C'\fR, or something similar depending upon the type of returned items. For example, when \f(CW\*(C`cursor\*(C'\fR parameter is used with the \&\f(CW\*(C`followers_ids\*(C'\fR method, the returned in hash entry \f(CW\*(C`ids\*(C'\fR. .PP The \f(CW\*(C`next_cursor\*(C'\fR value can be used in a subsequent call to obtain the next page of results. When you have obtained the last page of results, \&\f(CW\*(C`next_cursor\*(C'\fR will be 0. Likewise, you can use the value for \&\f(CW\*(C`previous_cursor\*(C'\fR to obtain the previous page of results. When you have obtained the first page, \f(CW\*(C`previous_cursor\*(C'\fR will be 0. .PP Here's an example that demonstrates how to obtain all follower IDs in a loop using the \f(CW\*(C`cursor\*(C'\fR parameter: .PP .Vb 5 \& my @ids; \& for ( my $cursor = \-1, my $r; $cursor; $cursor = $r\->{next_cursor} ) { \& $r = $nt\->followers_ids({ cursor => $cursor }); \& push @ids, @{ $r\->{ids} }; \& } .Ve .SS "Synthetic Arguments" .IX Subsection "Synthetic Arguments" In addition to the arguments described in the Twitter \s-1API\s0 Documentation for each \s-1API\s0 method, Net::Twitter supports additional \fIsynthetic\fR arguments. .IP "\-authenticate" 4 .IX Item "-authenticate" When set to 1, Net::Twitter will provide an Authorization header for the \s-1API\s0 call; when set to 0, it will suppress the Authentication header. This argument overrides the defined authentication behavior for the \s-1API\s0 method. It is probably only useful for the \f(CW\*(C`rate_limit_status\*(C'\fR method which returns different values for authenticated and unauthenticated calls. See \*(L"\s-1AUTHENTICATION\*(R"\s0 for more details. .IP "\-since" 4 .IX Item "-since" \&\s-1API\s0 methods that accept the \f(CW\*(C`since_id\*(C'\fR argument will also accept the synthetic \&\f(CW\*(C`\-since\*(C'\fR argument, instead. \f(CW\*(C`\-since\*(C'\fR may be a \f(CW\*(C`Date::Time\*(C'\fR object, an epoch time (the number of seconds since the system epoch), or a string in the same format returned by Twitter for the \f(CW\*(C`created_at\*(C'\fR attribute. Only statuses with a \&\f(CW\*(C`created_at\*(C'\fR time greater than \f(CW\*(C`\-since\*(C'\fR will be returned by the \s-1API\s0 call. .IP "\-legacy_lists_api" 4 .IX Item "-legacy_lists_api" This option is only effective when the legacy \f(CW\*(C`API::Lists\*(C'\fR trait is applied. Passing \f(CW\*(C`\-legacy_lists_api\*(C'\fR set to 0 for lists methods will use the new lists endpoints and semantics. This will facilitate upgrading an application to use the new lists api methods. When the \f(CW\*(C`API::Lists\*(C'\fR trait is not applied, this option is ignored. .SH "REST API Methods" .IX Header "REST API Methods" These methods are provided when trait \f(CW\*(C`API::RESTv1_1\*(C'\fR is included in the \f(CW\*(C`traits\*(C'\fR option to \f(CW\*(C`new\*(C'\fR. .SS "Common Parameters" .IX Subsection "Common Parameters" .IP "id" 4 .IX Item "id" Several of these methods accept a user \s-1ID\s0 as the \f(CW\*(C`id\*(C'\fR parameter. The user \s-1ID\s0 can be either a screen name, or the users numeric \s-1ID.\s0 To disambiguate, use the \f(CW\*(C`screen_name\*(C'\fR or \f(CW\*(C`user_id\*(C'\fR parameters, instead. .Sp For example, These calls are equivalent: .Sp .Vb 5 \& $nt\->create_friend(\*(Aqperl_api\*(Aq); # screen name \& $nt\->create_friend(1564061); # numeric ID \& $nt\->create_friend({ id => \*(Aqperl_api\*(Aq }); \& $nt\->create_friend({ screen_name => \*(Aqperl_api\*(Aq }); \& $nt\->create_friend({ user_id => 1564061 }); .Ve .Sp However user_id 911 and screen_name 911 are separate Twitter accounts. These calls are \s-1NOT\s0 equivalent: .Sp .Vb 2 \& $nt\->create_friend(911); # interpreted as screen name \& $nt\->create_friend({ user_id => 911 }); # screen name: richellis .Ve .Sp Whenever the \f(CW\*(C`id\*(C'\fR parameter is required and \f(CW\*(C`user_id\*(C'\fR and \f(CW\*(C`screen_name\*(C'\fR are also parameters, using any one of them satisfies the requirement. .IP "skip_user" 4 .IX Item "skip_user" The timeline methods all accept an optional \f(CW\*(C`skip_user\*(C'\fR parameter. When set to a true value, the statuses returned in a timeline will not contain an entire embedded user \s-1HASH.\s0 Instead, the user node will contain only an \f(CW\*(C`id\*(C'\fR element to indicate the numerical \s-1ID\s0 of the Twitter user that sent the status. .SS "Methods" .IX Subsection "Methods" .IP "\fBaccount_settings\fR" 4 .IX Item "account_settings" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the current trend, geo and sleep time information for the authenticating user. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 account/settings .RE .IP "\fBaccount_totals\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "account_totals DEPRECATED" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the current count of friends, followers, updates (statuses) and favorites of the authenticating user. .Sp Returns: HashRef .RE .IP "\fBadd_list_member\fR" 4 .IX Item "add_list_member" .RS 4 .PD 0 .IP "Parameters: list_id, slug, user_id, screen_name, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, user_id, screen_name, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Add a member to a list. The authenticated user must own the list to be able to add members to it. Note that lists can't have more than 500 members. .Sp Returns: User .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/members/create .RE .IP "\fBadd_place\fR" 4 .IX Item "add_place" .PD 0 .IP "\fBadd_place(name, contained_within, token, lat, long)\fR" 4 .IX Item "add_place(name, contained_within, token, lat, long)" .RS 4 .IP "Parameters: name, contained_within, token, lat, long, attribute:street_address, callback" 4 .IX Item "Parameters: name, contained_within, token, lat, long, attribute:street_address, callback" .IP "Required: name, contained_within, token, lat, long" 4 .IX Item "Required: name, contained_within, token, lat, long" .RE .RS 4 .PD .Sp Creates a new place object at the given latitude and longitude. .Sp Before creating a place you need to query \f(CW\*(C`similar_places\*(C'\fR with the latitude, longitude and name of the place you wish to create. The query will return an array of places which are similar to the one you wish to create, and a token. If the place you wish to create isn't in the returned array you can use the token with this method to create a new one. .Sp Returns: Place .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 geo/place .RE .IP "\fBblock_exists\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "block_exists DEPRECATED" .PD 0 .IP "\fBblock_exists(id)\fR" 4 .IX Item "block_exists(id)" .RS 4 .IP "Parameters: id, user_id, screen_name, include_entities" 4 .IX Item "Parameters: id, user_id, screen_name, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns if the authenticating user is blocking a target user. Will return the blocked user's object if a block exists, and error with \s-1HTTP 404\s0 response code otherwise. .Sp Returns: BasicUser .RE .IP "\fBblocking\fR" 4 .IX Item "blocking" .PD 0 .IP "alias: blocks_list" 4 .IX Item "alias: blocks_list" .RS 4 .IP "Parameters: cursor, include_entities, skip_status" 4 .IX Item "Parameters: cursor, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an array of user objects that the authenticating user is blocking. .Sp Returns: ArrayRef[BasicUser] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 blocks/list .RE .IP "\fBblocking_ids\fR" 4 .IX Item "blocking_ids" .PD 0 .IP "alias: blocks_ids" 4 .IX Item "alias: blocks_ids" .RS 4 .IP "Parameters: cursor, stringify_ids" 4 .IX Item "Parameters: cursor, stringify_ids" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an array of numeric user ids the authenticating user is blocking. .Sp Returns: ArrayRef[Int] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 blocks/ids .RE .IP "\fBcontributees\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "contributees DEPRECATED" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, include_entities, skip_satus" 4 .IX Item "Parameters: user_id, screen_name, include_entities, skip_satus" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an array of users that the specified user can contribute to. .Sp Returns: ArrayRef[User] .RE .IP "\fBcontributors\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "contributors DEPRECATED" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, include_entities, skip_satus" 4 .IX Item "Parameters: user_id, screen_name, include_entities, skip_satus" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an array of users who can contribute to the specified account. .Sp Returns: ArrayRef[User] .RE .IP "\fBcreate_block\fR" 4 .IX Item "create_block" .PD 0 .IP "\fBcreate_block(id)\fR" 4 .IX Item "create_block(id)" .RS 4 .IP "Parameters: user_id, screen_name, include_entities, skip_status" 4 .IX Item "Parameters: user_id, screen_name, include_entities, skip_status" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Blocks the user specified in the \f(CW\*(C`user_id\*(C'\fR or \f(CW\*(C`screen_name\*(C'\fR parameter as the authenticating user. Returns the blocked user when successful. You can find out more about blocking in the Twitter Support Knowledge Base. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 blocks/create .RE .IP "\fBcreate_favorite\fR" 4 .IX Item "create_favorite" .PD 0 .IP "\fBcreate_favorite(id)\fR" 4 .IX Item "create_favorite(id)" .RS 4 .IP "Parameters: id, include_entities" 4 .IX Item "Parameters: id, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Favorites the status specified in the \s-1ID\s0 parameter as the authenticating user. Returns the favorite status when successful. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 favorites/create .RE .IP "\fBcreate_friend\fR" 4 .IX Item "create_friend" .PD 0 .IP "alias: follow" 4 .IX Item "alias: follow" .IP "alias: follow_new" 4 .IX Item "alias: follow_new" .IP "alias: create_friendship" 4 .IX Item "alias: create_friendship" .RS 4 .IP "Parameters: user_id, screen_name, follow" 4 .IX Item "Parameters: user_id, screen_name, follow" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Follows the user specified in the \f(CW\*(C`user_id\*(C'\fR or \f(CW\*(C`screen_name\*(C'\fR parameter as the authenticating user. Returns the befriended user when successful. Returns a string describing the failure condition when unsuccessful. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 friendships/create .RE .IP "\fBcreate_list\fR" 4 .IX Item "create_list" .PD 0 .IP "\fBcreate_list(name)\fR" 4 .IX Item "create_list(name)" .RS 4 .IP "Parameters: list_id, slug, name, mode, description, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, name, mode, description, owner_screen_name, owner_id" .IP "Required: name" 4 .IX Item "Required: name" .RE .RS 4 .PD .Sp Creates a new list for the authenticated user. Note that you can't create more than 20 lists per account. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/create .RE .IP "\fBcreate_media_metadata\fR" 4 .IX Item "create_media_metadata" .PD 0 .IP "\fBcreate_media_metadata(media_id)\fR" 4 .IX Item "create_media_metadata(media_id)" .RS 4 .IP "Parameters: media_id, alt_text" 4 .IX Item "Parameters: media_id, alt_text" .IP "Required: media_id" 4 .IX Item "Required: media_id" .RE .RS 4 .PD .Sp Adds metadata \*(-- alt text, in particular \*(-- to a previously uploaded media object, specified by its \s-1ID.\s0 (One knows this \s-1ID\s0 via the return value of the preceding \f(CW\*(C`upload\*(C'\fR call.) .Sp The \f(CW\*(C`alt_text\*(C'\fR parameter must have as its value a hashref containing a single key-value pair. The key must be \f(CW\*(C`text\*(C'\fR, and the value is the alt text to assign to the media object. The text must be 400 characters or fewer in length. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 media/metadata/create .RE .IP "\fBcreate_mute\fR" 4 .IX Item "create_mute" .PD 0 .IP "\fBcreate_mute(id)\fR" 4 .IX Item "create_mute(id)" .RS 4 .IP "Parameters: user_id, screen_name" 4 .IX Item "Parameters: user_id, screen_name" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Mutes the user specified in the \f(CW\*(C`user_id\*(C'\fR or \f(CW\*(C`screen_name\*(C'\fR parameter as the authenticating user. Returns the muted user when successful. You can find out more about muting in the Twitter Support Knowledge Base. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 mutes/users/create .RE .IP "\fBcreate_saved_search\fR" 4 .IX Item "create_saved_search" .PD 0 .IP "\fBcreate_saved_search(query)\fR" 4 .IX Item "create_saved_search(query)" .RS 4 .IP "Parameters: query" 4 .IX Item "Parameters: query" .IP "Required: query" 4 .IX Item "Required: query" .RE .RS 4 .PD .Sp Creates a saved search for the authenticated user. .Sp Returns: SavedSearch .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 saved_searches/create .RE .IP "\fBdelete_list\fR" 4 .IX Item "delete_list" .RS 4 .PD 0 .IP "Parameters: owner_screen_name, owner_id, list_id, slug" 4 .IX Item "Parameters: owner_screen_name, owner_id, list_id, slug" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Deletes the specified list. The authenticated user must own the list to be able to destroy it. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/destroy .RE .IP "\fBdelete_list_member\fR" 4 .IX Item "delete_list_member" .PD 0 .IP "alias: remove_list_member" 4 .IX Item "alias: remove_list_member" .RS 4 .IP "Parameters: list_id, slug, user_id, screen_name, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, user_id, screen_name, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Removes the specified member from the list. The authenticated user must be the list's owner to remove members from the list. .Sp Returns: User .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/members/destroy .RE .IP "\fBdestroy_block\fR" 4 .IX Item "destroy_block" .PD 0 .IP "\fBdestroy_block(id)\fR" 4 .IX Item "destroy_block(id)" .RS 4 .IP "Parameters: user_id, screen_name, include_entities, skip_status" 4 .IX Item "Parameters: user_id, screen_name, include_entities, skip_status" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Un-blocks the user specified in the \f(CW\*(C`user_id\*(C'\fR or \f(CW\*(C`screen_name\*(C'\fR parameter as the authenticating user. Returns the un-blocked user when successful. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 blocks/destroy .RE .IP "\fBdestroy_direct_message\fR" 4 .IX Item "destroy_direct_message" .PD 0 .IP "\fBdestroy_direct_message(id)\fR" 4 .IX Item "destroy_direct_message(id)" .RS 4 .IP "Parameters: id, include_entities" 4 .IX Item "Parameters: id, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Destroys the direct message specified in the required \s-1ID\s0 parameter. The authenticating user must be the recipient of the specified direct message. .Sp Important: this method requires an access token with \s-1RWD\s0 (read, write, and direct message) permissions. .Sp Returns: DirectMessage .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 direct_messages/destroy .RE .IP "\fBdestroy_favorite\fR" 4 .IX Item "destroy_favorite" .PD 0 .IP "\fBdestroy_favorite(id)\fR" 4 .IX Item "destroy_favorite(id)" .RS 4 .IP "Parameters: id, include_entities" 4 .IX Item "Parameters: id, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Un-favorites the status specified in the \s-1ID\s0 parameter as the authenticating user. Returns the un-favorited status. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 favorites/destroy .RE .IP "\fBdestroy_friend\fR" 4 .IX Item "destroy_friend" .PD 0 .IP "\fBdestroy_friend(id)\fR" 4 .IX Item "destroy_friend(id)" .IP "alias: unfollow" 4 .IX Item "alias: unfollow" .IP "alias: destroy_friendship" 4 .IX Item "alias: destroy_friendship" .RS 4 .IP "Parameters: user_id, screen_name" 4 .IX Item "Parameters: user_id, screen_name" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Discontinues friendship with the user specified in the \f(CW\*(C`user_id\*(C'\fR or \&\f(CW\*(C`screen_name\*(C'\fR parameter as the authenticating user. Returns the un-friended user when successful. Returns a string describing the failure condition when unsuccessful. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 friendships/destroy .RE .IP "\fBdestroy_mute\fR" 4 .IX Item "destroy_mute" .PD 0 .IP "\fBdestroy_mute(id)\fR" 4 .IX Item "destroy_mute(id)" .RS 4 .IP "Parameters: user_id, screen_name" 4 .IX Item "Parameters: user_id, screen_name" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Un-mutes the user specified in the \f(CW\*(C`user_id\*(C'\fR or \f(CW\*(C`screen_name\*(C'\fR parameter as the authenticating user. Returns the un-muted user when successful. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 mutes/users/destroy .RE .IP "\fBdestroy_saved_search\fR" 4 .IX Item "destroy_saved_search" .PD 0 .IP "\fBdestroy_saved_search(id)\fR" 4 .IX Item "destroy_saved_search(id)" .IP "alias: delete_saved_search" 4 .IX Item "alias: delete_saved_search" .RS 4 .IP "Parameters: id" 4 .IX Item "Parameters: id" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Destroys a saved search. The search, specified by \f(CW\*(C`id\*(C'\fR, must be owned by the authenticating user. .Sp Returns: SavedSearch .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 saved_searches/destroy/:id .RE .IP "\fBdestroy_status\fR" 4 .IX Item "destroy_status" .PD 0 .IP "\fBdestroy_status(id)\fR" 4 .IX Item "destroy_status(id)" .RS 4 .IP "Parameters: id, trim_user" 4 .IX Item "Parameters: id, trim_user" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Destroys the status specified by the required \s-1ID\s0 parameter. The authenticating user must be the author of the specified status. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 statuses/destroy/:id .RE .IP "\fBdirect_messages\fR" 4 .IX Item "direct_messages" .RS 4 .PD 0 .IP "Parameters: since_id, max_id, count, page, include_entities, skip_status" 4 .IX Item "Parameters: since_id, max_id, count, page, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a list of the 20 most recent direct messages sent to the authenticating user including detailed information about the sending and recipient users. .Sp Important: this method requires an access token with \s-1RWD\s0 (read, write, and direct message) permissions. .Sp Returns: ArrayRef[DirectMessage] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 direct_messages .RE .IP "\fBdisable_notifications\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "disable_notifications DEPRECATED" .PD 0 .IP "\fBdisable_notifications(id)\fR" 4 .IX Item "disable_notifications(id)" .RS 4 .IP "Parameters: id, screen_name, include_entities" 4 .IX Item "Parameters: id, screen_name, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Disables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful. .Sp Returns: BasicUser .RE .IP "\fBenable_notifications\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "enable_notifications DEPRECATED" .PD 0 .IP "\fBenable_notifications(id)\fR" 4 .IX Item "enable_notifications(id)" .RS 4 .IP "Parameters: id, screen_name, include_entities" 4 .IX Item "Parameters: id, screen_name, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Enables notifications for updates from the specified user to the authenticating user. Returns the specified user when successful. .Sp Returns: BasicUser .RE .IP "\fBend_session\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "end_session DEPRECATED" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Ends the session of the authenticating user, returning a null cookie. Use this method to sign users out of client-facing applications like widgets. .Sp Returns: Error .RE .IP "\fBfavorites\fR" 4 .IX Item "favorites" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, count, since_id, max_id, include_entities" 4 .IX Item "Parameters: user_id, screen_name, count, since_id, max_id, include_entities" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent favorite statuses for the authenticating user or user specified by the \s-1ID\s0 parameter. .Sp Returns: ArrayRef[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 favorites/list .RE .IP "\fBfollowers\fR" 4 .IX Item "followers" .PD 0 .IP "alias: followers_list" 4 .IX Item "alias: followers_list" .RS 4 .IP "Parameters: user_id, screen_name, cursor" 4 .IX Item "Parameters: user_id, screen_name, cursor" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a cursored collection of user objects for users following the specified user. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 followers/list .RE .IP "\fBfollowers_ids\fR" 4 .IX Item "followers_ids" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, cursor, stringify_ids" 4 .IX Item "Parameters: user_id, screen_name, cursor, stringify_ids" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a reference to an array of numeric IDs for every user following the specified user. The order of the IDs may change from call to call. To obtain the screen names, pass the arrayref to \*(L"lookup_users\*(R". .Sp Use the optional \f(CW\*(C`cursor\*(C'\fR parameter to retrieve IDs in pages of 5000. When the \f(CW\*(C`cursor\*(C'\fR parameter is used, the return value is a reference to a hash with keys \f(CW\*(C`previous_cursor\*(C'\fR, \f(CW\*(C`next_cursor\*(C'\fR, and \f(CW\*(C`ids\*(C'\fR. The value of \f(CW\*(C`ids\*(C'\fR is a reference to an array of \s-1IDS\s0 of the user's followers. Set the optional \f(CW\*(C`cursor\*(C'\fR parameter to \-1 to get the first page of IDs. Set it to the prior return's value of \f(CW\*(C`previous_cursor\*(C'\fR or \f(CW\*(C`next_cursor\*(C'\fR to page forward or backwards. When there are no prior pages, the value of \f(CW\*(C`previous_cursor\*(C'\fR will be 0. When there are no subsequent pages, the value of \f(CW\*(C`next_cursor\*(C'\fR will be 0. .Sp Returns: HashRef|ArrayRef[Int] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 followers/ids .RE .IP "\fBfriends\fR" 4 .IX Item "friends" .PD 0 .IP "alias: friends_list" 4 .IX Item "alias: friends_list" .RS 4 .IP "Parameters: user_id, screen_name, cursor" 4 .IX Item "Parameters: user_id, screen_name, cursor" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a cursored collection of user objects for users followed by the specified user. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friends/list .RE .IP "\fBfriends_ids\fR" 4 .IX Item "friends_ids" .PD 0 .IP "alias: following_ids" 4 .IX Item "alias: following_ids" .RS 4 .IP "Parameters: user_id, screen_name, cursor, stringify_ids" 4 .IX Item "Parameters: user_id, screen_name, cursor, stringify_ids" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a reference to an array of numeric IDs for every user followed by the specified user. The order of the IDs is reverse chronological. .Sp Use the optional \f(CW\*(C`cursor\*(C'\fR parameter to retrieve IDs in pages of 5000. When the \f(CW\*(C`cursor\*(C'\fR parameter is used, the return value is a reference to a hash with keys \f(CW\*(C`previous_cursor\*(C'\fR, \f(CW\*(C`next_cursor\*(C'\fR, and \f(CW\*(C`ids\*(C'\fR. The value of \f(CW\*(C`ids\*(C'\fR is a reference to an array of \s-1IDS\s0 of the user's friends. Set the optional \f(CW\*(C`cursor\*(C'\fR parameter to \-1 to get the first page of IDs. Set it to the prior return's value of \f(CW\*(C`previous_cursor\*(C'\fR or \f(CW\*(C`next_cursor\*(C'\fR to page forward or backwards. When there are no prior pages, the value of \f(CW\*(C`previous_cursor\*(C'\fR will be 0. When there are no subsequent pages, the value of \f(CW\*(C`next_cursor\*(C'\fR will be 0. .Sp Returns: HashRef|ArrayRef[Int] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friends/ids .RE .IP "\fBfriends_timeline\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "friends_timeline DEPRECATED" .PD 0 .IP "alias: following_timeline" 4 .IX Item "alias: following_timeline" .RS 4 .IP "Parameters: since_id, max_id, count, exclude_replies, contributor_details, include_entities, trim_user" 4 .IX Item "Parameters: since_id, max_id, count, exclude_replies, contributor_details, include_entities, trim_user" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. .Sp Returns: ArrayRef[Status] .RE .IP "\fBfriendship_exists\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "friendship_exists DEPRECATED" .PD 0 .IP "\fBfriendship_exists(user_a, user_b)\fR" 4 .IX Item "friendship_exists(user_a, user_b)" .IP "alias: relationship_exists" 4 .IX Item "alias: relationship_exists" .IP "alias: follows" 4 .IX Item "alias: follows" .RS 4 .IP "Parameters: user_id_a, user_id_b, screen_name_a, screen_name_b, user_a, user_b" 4 .IX Item "Parameters: user_id_a, user_id_b, screen_name_a, screen_name_b, user_a, user_b" .IP "Required: user_a, user_b" 4 .IX Item "Required: user_a, user_b" .RE .RS 4 .PD .Sp This method is provided for backwards compatibility with Twitter \s-1API V1.0.\s0 Twitter \s-1API V1.1\s0 does not provide an endpoint for this call. Instead, \&\f(CW\*(C`show_friendship\*(C'\fR is called, the result is inspected, and an appropriate value is returned which can be evaluated in a boolean context. .Sp Tests for the existence of friendship between two users. Will return true if user_a follows user_b, otherwise will return false. .Sp Use of \f(CW\*(C`user_a\*(C'\fR and \f(CW\*(C`user_b\*(C'\fR is deprecated. It has been preserved for backwards compatibility, and is used for the two-argument positional form: .Sp .Vb 1 \& $nt\->friendship_exists($user_a, $user_b); .Ve .Sp Instead, you should use one of the named argument forms: .Sp .Vb 2 \& $nt\->friendship_exists({ user_id_a => $id1, user_id_b => $id2 }); \& $nt\->friendship_exists({ screen_name_a => $name1, screen_name_b => $name2 }); .Ve .Sp Consider using \f(CW\*(C`show_friendship\*(C'\fR instead. .Sp Returns: Bool .RE .IP "\fBfriendships_incoming\fR" 4 .IX Item "friendships_incoming" .PD 0 .IP "alias: incoming_friendships" 4 .IX Item "alias: incoming_friendships" .RS 4 .IP "Parameters: cursor, stringify_ids" 4 .IX Item "Parameters: cursor, stringify_ids" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an \s-1HASH\s0 ref with an array of numeric IDs in the \f(CW\*(C`ids\*(C'\fR element for every user who has a pending request to follow the authenticating user. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friendships/incoming .RE .IP "\fBfriendships_outgoing\fR" 4 .IX Item "friendships_outgoing" .PD 0 .IP "alias: outgoing_friendships" 4 .IX Item "alias: outgoing_friendships" .RS 4 .IP "Parameters: cursor, stringify_ids" 4 .IX Item "Parameters: cursor, stringify_ids" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an \s-1HASH\s0 ref with an array of numeric IDs in the \f(CW\*(C`ids\*(C'\fR element for every protected user for whom the authenticating user has a pending follow request. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friendships/outgoing .RE .IP "\fBgeo_id\fR" 4 .IX Item "geo_id" .PD 0 .IP "\fBgeo_id(place_id)\fR" 4 .IX Item "geo_id(place_id)" .RS 4 .IP "Parameters: place_id" 4 .IX Item "Parameters: place_id" .IP "Required: place_id" 4 .IX Item "Required: place_id" .RE .RS 4 .PD .Sp Returns details of a place returned from the \f(CW\*(C`reverse_geocode\*(C'\fR method. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 geo/id/:place_id .RE .IP "\fBgeo_search\fR" 4 .IX Item "geo_search" .RS 4 .PD 0 .IP "Parameters: lat, long, query, ip, granularity, accuracy, max_results, contained_within, attribute:street_address, callback" 4 .IX Item "Parameters: lat, long, query, ip, granularity, accuracy, max_results, contained_within, attribute:street_address, callback" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Search for places that can be attached to a statuses/update. Given a latitude and a longitude pair, an \s-1IP\s0 address, or a name, this request will return a list of all the valid places that can be used as the place_id when updating a status. .Sp Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location he or she is at, and then send the \&\s-1ID\s0 of this location with a call to statuses/update. .Sp This is the recommended method to use find places that can be attached to statuses/update. Unlike geo/reverse_geocode which provides raw data access, this endpoint can potentially re-order places with regards to the user who is authenticated. This approach is also preferred for interactive place matching with the user. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 geo/search .RE .IP "\fBget_configuration\fR" 4 .IX Item "get_configuration" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the current configuration used by Twitter including twitter.com slugs which are not usernames, maximum photo resolutions, and t.co \s-1URL\s0 lengths. .Sp It is recommended applications request this endpoint when they are loaded, but no more than once a day. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 help/configuration .RE .IP "\fBget_languages\fR" 4 .IX Item "get_languages" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the list of languages supported by Twitter along with their \s-1ISO 639\-1\s0 code. The \s-1ISO 639\-1\s0 code is the two letter value to use if you include lang with any of your requests. .Sp Returns: ArrayRef[Lanugage] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 help/languages .RE .IP "\fBget_list\fR" 4 .IX Item "get_list" .PD 0 .IP "alias: show_list" 4 .IX Item "alias: show_list" .RS 4 .IP "Parameters: list_id, slug, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the specified list. Private lists will only be shown if the authenticated user owns the specified list. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/show .RE .IP "\fBget_lists\fR" 4 .IX Item "get_lists" .PD 0 .IP "alias: list_lists" 4 .IX Item "alias: list_lists" .IP "alias: all_subscriptions" 4 .IX Item "alias: all_subscriptions" .RS 4 .IP "Parameters: user_id, screen_name, reverse" 4 .IX Item "Parameters: user_id, screen_name, reverse" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns all lists the authenticating or specified user subscribes to, including their own. The user is specified using the user_id or screen_name parameters. If no user is given, the authenticating user is used. .Sp A maximum of 100 results will be returned by this call. Subscribed lists are returned first, followed by owned lists. This means that if a user subscribes to 90 lists and owns 20 lists, this method returns 90 subscriptions and 10 owned lists. The reverse method returns owned lists first, so with \f(CW\*(C`reverse =\*(C'\fR 1>, 20 owned lists and 80 subscriptions would be returned. If your goal is to obtain every list a user owns or subscribes to, use and/or \&\f(CW\*(C`list_subscriptions\*(C'\fR instead. .Sp Returns: Hashref .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/list .RE .IP "\fBget_privacy_policy\fR" 4 .IX Item "get_privacy_policy" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns Twitter's privacy policy. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 help/privacy .RE .IP "\fBget_tos\fR" 4 .IX Item "get_tos" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the Twitter Terms of Service. These are not the same as the Developer Rules of the Road. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 help/tos .RE .IP "\fBhome_timeline\fR" 4 .IX Item "home_timeline" .RS 4 .PD 0 .IP "Parameters: since_id, max_id, count, exclude_replies, contributor_details, include_entities, trim_user" 4 .IX Item "Parameters: since_id, max_id, count, exclude_replies, contributor_details, include_entities, trim_user" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. .Sp Returns: ArrayRef[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/home_timeline .RE .IP "\fBlist_members\fR" 4 .IX Item "list_members" .RS 4 .PD 0 .IP "Parameters: list_id, slug, owner_screen_name, owner_id, cursor, include_entities, skip_status" 4 .IX Item "Parameters: list_id, slug, owner_screen_name, owner_id, cursor, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the members of the specified list. Private list members will only be shown if the authenticated user owns the specified list. .Sp Returns: Hashref .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/members .RE .IP "\fBlist_memberships\fR" 4 .IX Item "list_memberships" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, cursor, filter_to_owned_lists" 4 .IX Item "Parameters: user_id, screen_name, cursor, filter_to_owned_lists" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the lists the specified user has been added to. If user_id or screen_name are not provided the memberships for the authenticating user are returned. .Sp Returns: Hashref .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/memberships .RE .IP "\fBlist_ownerships\fR" 4 .IX Item "list_ownerships" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, count, cursor" 4 .IX Item "Parameters: user_id, screen_name, count, cursor" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Obtain a collection of the lists owned by the specified Twitter user. Private lists will only be shown if the authenticated user is also the owner of the lists. .Sp Returns: ArrayRef[List] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/ownerships .RE .IP "\fBlist_statuses\fR" 4 .IX Item "list_statuses" .RS 4 .PD 0 .IP "Parameters: list_id, slug, owner_screen_name, owner_id, since_id, max_id, count, include_entities, include_rts" 4 .IX Item "Parameters: list_id, slug, owner_screen_name, owner_id, since_id, max_id, count, include_entities, include_rts" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns tweet timeline for members of the specified list. Historically, retweets were not available in list timeline responses but you can now use the include_rts=true parameter to additionally receive retweet objects. .Sp Returns: ArrayRef[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/statuses .RE .IP "\fBlist_subscribers\fR" 4 .IX Item "list_subscribers" .RS 4 .PD 0 .IP "Parameters: list_id, slug, owner_screen_name, owner_id, cursor, include_entities, skip_status" 4 .IX Item "Parameters: list_id, slug, owner_screen_name, owner_id, cursor, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the subscribers of the specified list. Private list subscribers will only be shown if the authenticated user owns the specified list. .Sp Returns: Hashref .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/subscribers .RE .IP "\fBlist_subscriptions\fR" 4 .IX Item "list_subscriptions" .PD 0 .IP "alias: subscriptions" 4 .IX Item "alias: subscriptions" .RS 4 .IP "Parameters: user_id, screen_name, count, cursor" 4 .IX Item "Parameters: user_id, screen_name, count, cursor" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Obtain a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists. .Sp Returns: ArrayRef[List] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/subscriptions .RE .IP "\fBlookup_friendships\fR" 4 .IX Item "lookup_friendships" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name" 4 .IX Item "Parameters: user_id, screen_name" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the relationship of the authenticating user to the comma separated list or \s-1ARRAY\s0 ref of up to 100 screen_names or user_ids provided. Values for connections can be: following, following_requested, followed_by, none. Requires authentication. .Sp Returns: ArrayRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friendships/lookup .RE .IP "\fBlookup_statuses\fR" 4 .IX Item "lookup_statuses" .PD 0 .IP "\fBlookup_statuses(id)\fR" 4 .IX Item "lookup_statuses(id)" .RS 4 .IP "Parameters: id, include_entities, trim_user, map" 4 .IX Item "Parameters: id, include_entities, trim_user, map" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns a hash reference of tweets from an arbitrary set of ids. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/lookup .RE .IP "\fBlookup_users\fR" 4 .IX Item "lookup_users" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, include_entities" 4 .IX Item "Parameters: user_id, screen_name, include_entities" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Return up to 100 users worth of extended information, specified by either \s-1ID,\s0 screen name, or combination of the two. The author's most recent status (if the authenticating user has permission) will be returned inline. This method is rate limited to 1000 calls per hour. .Sp This method will accept user IDs or screen names as either a comma delimited string, or as an \s-1ARRAY\s0 ref. It will also accept arguments in the normal \&\s-1HASHREF\s0 form or as a simple list of named arguments. I.e., any of the following forms are acceptable: .Sp .Vb 5 \& $nt\->lookup_users({ user_id => \*(Aq1234,6543,3333\*(Aq }); \& $nt\->lookup_users(user_id => \*(Aq1234,6543,3333\*(Aq); \& $nt\->lookup_users({ user_id => [ 1234, 6543, 3333 ] }); \& $nt\->lookup_users({ screen_name => \*(Aqfred,barney,wilma\*(Aq }); \& $nt\->lookup_users(screen_name => [\*(Aqfred\*(Aq, \*(Aqbarney\*(Aq, \*(Aqwilma\*(Aq]); \& \& $nt\->lookup_users( \& screen_name => [\*(Aqfred\*(Aq, \*(Aqbarney\*(Aq ], \& user_id => \*(Aq4321,6789\*(Aq, \& ); .Ve .Sp Returns: ArrayRef[User] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/lookup .RE .IP "\fBmembers_create_all\fR" 4 .IX Item "members_create_all" .PD 0 .IP "alias: add_list_members" 4 .IX Item "alias: add_list_members" .RS 4 .IP "Parameters: list_id, slug, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Adds multiple members to a list, by specifying a reference to an array or a comma-separated list of member ids or screen names. The authenticated user must own the list to be able to add members to it. Note that lists can't have more than 500 members, and you are limited to adding up to 100 members to a list at a time with this method. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/members/create_all .RE .IP "\fBmembers_destroy_all\fR" 4 .IX Item "members_destroy_all" .PD 0 .IP "alias: remove_list_members" 4 .IX Item "alias: remove_list_members" .RS 4 .IP "Parameters: list_id, slug, user_id, screen_name, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, user_id, screen_name, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Removes multiple members from a list, by specifying a reference to an array of member ids or screen names, or a string of comma separated user ids or screen names. The authenticated user must own the list to be able to remove members from it. Note that lists can't have more than 500 members, and you are limited to removing up to 100 members to a list at a time with this method. .Sp Please note that there can be issues with lists that rapidly remove and add memberships. Take care when using these methods such that you are not too rapidly switching between removals and adds on the same list. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/members/destroy_all .RE .IP "\fBmentions\fR" 4 .IX Item "mentions" .PD 0 .IP "alias: replies" 4 .IX Item "alias: replies" .IP "alias: mentions_timeline" 4 .IX Item "alias: mentions_timeline" .RS 4 .IP "Parameters: since_id, max_id, count, trim_user, include_entities, contributor_details" 4 .IX Item "Parameters: since_id, max_id, count, trim_user, include_entities, contributor_details" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent mentions (statuses containing \f(CW@username\fR) for the authenticating user. .Sp Returns: ArrayRef[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/mentions_timeline .RE .IP "\fBmutes\fR" 4 .IX Item "mutes" .PD 0 .IP "\fBmutes(cursor)\fR" 4 .IX Item "mutes(cursor)" .IP "alias: muting_ids" 4 .IX Item "alias: muting_ids" .IP "alias: muted_ids" 4 .IX Item "alias: muted_ids" .RS 4 .IP "Parameters: cursor" 4 .IX Item "Parameters: cursor" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an array of numeric user ids the authenticating user has muted. .Sp Returns: ArrayRef[Int] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 mutes/users/ids .RE .IP "\fBmuting\fR" 4 .IX Item "muting" .PD 0 .IP "alias: mutes_list" 4 .IX Item "alias: mutes_list" .RS 4 .IP "Parameters: cursor, include_entities, skip_status" 4 .IX Item "Parameters: cursor, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an array of user objects that the authenticating user is muting. .Sp Returns: ArrayRef[BasicUser] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 mutes/users/list .RE .IP "\fBnew_direct_message\fR" 4 .IX Item "new_direct_message" .PD 0 .IP "\fBnew_direct_message(text)\fR" 4 .IX Item "new_direct_message(text)" .RS 4 .IP "Parameters: user_id, screen_name, text" 4 .IX Item "Parameters: user_id, screen_name, text" .IP "Required: text" 4 .IX Item "Required: text" .RE .RS 4 .PD .Sp Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters. Returns the sent message when successful. In order to support numeric screen names, the \f(CW\*(C`screen_name\*(C'\fR or \&\f(CW\*(C`user_id\*(C'\fR parameters may be used instead of \f(CW\*(C`user\*(C'\fR. .Sp Important: this method requires an access token with \s-1RWD\s0 (read, write, and direct message) permissions. .Sp Returns: DirectMessage .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 direct_messages/new .RE .IP "\fBno_retweet_ids\fR" 4 .IX Item "no_retweet_ids" .PD 0 .IP "alias: no_retweets_ids" 4 .IX Item "alias: no_retweets_ids" .RS 4 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an \s-1ARRAY\s0 ref of user IDs for which the authenticating user does not want to receive retweets. .Sp Returns: ArrayRef[UserIDs] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friendships/no_retweets/ids .RE .IP "\fBoembed\fR" 4 .IX Item "oembed" .RS 4 .PD 0 .IP "Parameters: id, url, maxwidth, hide_media, hide_thread, omit_script, align, related, lang" 4 .IX Item "Parameters: id, url, maxwidth, hide_media, hide_thread, omit_script, align, related, lang" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns information allowing the creation of an embedded representation of a Tweet on third party sites. See the oEmbed specification for information about the response format. .Sp While this endpoint allows a bit of customization for the final appearance of the embedded Tweet, be aware that the appearance of the rendered Tweet may change over time to be consistent with Twitter's Display Requirements . Do not rely on any class or id parameters to stay constant in the returned markup. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/oembed .RE .IP "\fBprofile_banner\fR" 4 .IX Item "profile_banner" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name" 4 .IX Item "Parameters: user_id, screen_name" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a hash reference mapping available size variations to URLs that can be used to retrieve each variation of the banner. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/profile_banner .RE .IP "\fBrate_limit_status\fR" 4 .IX Item "rate_limit_status" .PD 0 .IP "\fBrate_limit_status(resources)\fR" 4 .IX Item "rate_limit_status(resources)" .RS 4 .IP "Parameters: resources" 4 .IX Item "Parameters: resources" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the remaining number of \s-1API\s0 requests available to the authenticated user before the \s-1API\s0 limit is reached for the current hour. .Sp Use \f(CW\*(C`\->rate_limit_status({ authenticate => 0 })\*(C'\fR to force an unauthenticated call, which will return the status for the \s-1IP\s0 address rather than the authenticated user. (Note: for a web application, this is the server's \&\s-1IP\s0 address.) .Sp Returns: RateLimitStatus .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 application/rate_limit_status .RE .IP "\fBrelated_results\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "related_results DEPRECATED" .PD 0 .IP "\fBrelated_results(id)\fR" 4 .IX Item "related_results(id)" .RS 4 .IP "Parameters: id" 4 .IX Item "Parameters: id" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp If available, returns an array of replies and mentions related to the specified status. There is no guarantee there will be any replies or mentions in the response. This method is only available to users who have access to #newtwitter. Requires authentication. .Sp Returns: ArrayRef[Status] .RE .IP "\fBremove_profile_banner\fR" 4 .IX Item "remove_profile_banner" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Removes the uploaded profile banner for the authenticating user. .Sp Returns: Nothing .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/remove_profile_banner .RE .IP "\fBreport_spam\fR" 4 .IX Item "report_spam" .PD 0 .IP "\fBreport_spam(id)\fR" 4 .IX Item "report_spam(id)" .RS 4 .IP "Parameters: user_id, screen_name" 4 .IX Item "Parameters: user_id, screen_name" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp The user specified in the id is blocked by the authenticated user and reported as a spammer. .Sp Returns: User .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 users/report_spam .RE .IP "\fBretweet\fR" 4 .IX Item "retweet" .PD 0 .IP "\fBretweet(id)\fR" 4 .IX Item "retweet(id)" .RS 4 .IP "Parameters: idtrim_user" 4 .IX Item "Parameters: idtrim_user" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Retweets a tweet. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 statuses/retweet/:id .RE .IP "\fBretweeted_by\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "retweeted_by DEPRECATED" .PD 0 .IP "\fBretweeted_by(id)\fR" 4 .IX Item "retweeted_by(id)" .RS 4 .IP "Parameters: id, count, page, trim_user, include_entities" 4 .IX Item "Parameters: id, count, page, trim_user, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns up to 100 users who retweeted the status identified by \f(CW\*(C`id\*(C'\fR. .Sp Returns: ArrayRef[User] .RE .IP "\fBretweeted_by_ids\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "retweeted_by_ids DEPRECATED" .PD 0 .IP "\fBretweeted_by_ids(id)\fR" 4 .IX Item "retweeted_by_ids(id)" .RS 4 .IP "Parameters: id, count, page, trim_user, include_entities" 4 .IX Item "Parameters: id, count, page, trim_user, include_entities" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns the IDs of up to 100 users who retweeted the status identified by \f(CW\*(C`id\*(C'\fR. .Sp Returns: ArrayRef[User] .RE .IP "\fBretweeted_by_me\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "retweeted_by_me DEPRECATED" .RS 4 .PD 0 .IP "Parameters: since_id, max_id, count, page, trim_user, include_entities" 4 .IX Item "Parameters: since_id, max_id, count, page, trim_user, include_entities" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent retweets posted by the authenticating user. .Sp Returns: ArrayRef[Status] .RE .IP "\fBretweeted_by_user\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "retweeted_by_user DEPRECATED" .PD 0 .IP "\fBretweeted_by_user(id)\fR" 4 .IX Item "retweeted_by_user(id)" .RS 4 .IP "Parameters: id, user_id, screen_name" 4 .IX Item "Parameters: id, user_id, screen_name" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns the 20 most recent retweets posted by the specified user. The user is specified using the user_id or screen_name parameters. This method is identical to \f(CW\*(C`retweeted_by_me\*(C'\fR except you can choose the user to view. Does not require authentication, unless the user is protected. .Sp Returns: ArrayRef .RE .IP "\fBretweeted_to_me\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "retweeted_to_me DEPRECATED" .RS 4 .PD 0 .IP "Parameters: since_id, max_id, count, page" 4 .IX Item "Parameters: since_id, max_id, count, page" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent retweets posted by the authenticating user's friends. .Sp Returns: ArrayRef[Status] .RE .IP "\fBretweeted_to_user\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "retweeted_to_user DEPRECATED" .PD 0 .IP "\fBretweeted_to_user(id)\fR" 4 .IX Item "retweeted_to_user(id)" .RS 4 .IP "Parameters: id, user_id, screen_name" 4 .IX Item "Parameters: id, user_id, screen_name" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns the 20 most recent retweets posted by users the specified user follows. The user is specified using the user_id or screen_name parameters. This method is identical to \f(CW\*(C`retweeted_to_me\*(C'\fR except you can choose the user to view. Does not require authentication, unless the user is protected. .Sp Returns: ArrayRef .RE .IP "\fBretweeters_ids\fR" 4 .IX Item "retweeters_ids" .PD 0 .IP "\fBretweeters_ids(id)\fR" 4 .IX Item "retweeters_ids(id)" .RS 4 .IP "Parameters: id, cursor, stringify_ids" 4 .IX Item "Parameters: id, cursor, stringify_ids" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns a collection of up to 100 user IDs belonging to users who have retweeted the tweet specified by the id parameter. .Sp This method offers similar data to \f(CW\*(C`retweets\*(C'\fR and replaces \s-1API\s0 v1's \&\f(CW\*(C`retweeted_by_ids\*(C'\fR method. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/retweeters/ids .RE .IP "\fBretweets\fR" 4 .IX Item "retweets" .PD 0 .IP "\fBretweets(id)\fR" 4 .IX Item "retweets(id)" .RS 4 .IP "Parameters: id, count, trim_user" 4 .IX Item "Parameters: id, count, trim_user" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns up to 100 of the first retweets of a given tweet. .Sp Returns: Arrayref[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/retweets/:id .RE .IP "\fBretweets_of_me\fR" 4 .IX Item "retweets_of_me" .PD 0 .IP "alias: retweeted_of_me" 4 .IX Item "alias: retweeted_of_me" .RS 4 .IP "Parameters: since_id, max_id, count, trim_user, include_entities, include_user_entities" 4 .IX Item "Parameters: since_id, max_id, count, trim_user, include_entities, include_user_entities" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent tweets of the authenticated user that have been retweeted by others. .Sp Returns: ArrayRef[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/retweets_of_me .RE .IP "\fBreverse_geocode\fR" 4 .IX Item "reverse_geocode" .PD 0 .IP "\fBreverse_geocode(lat, long)\fR" 4 .IX Item "reverse_geocode(lat, long)" .RS 4 .IP "Parameters: lat, long, accuracy, granularity, max_results, callback" 4 .IX Item "Parameters: lat, long, accuracy, granularity, max_results, callback" .IP "Required: lat, long" 4 .IX Item "Required: lat, long" .RE .RS 4 .PD .Sp Search for places (cities and neighborhoods) that can be attached to a statuses/update. Given a latitude and a longitude, return a list of all the valid places that can be used as a place_id when updating a status. Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location he or she is at, and then send the \&\s-1ID\s0 of this location up with a call to statuses/update. .Sp There are multiple granularities of places that can be returned \*(-- \&\*(L"neighborhoods\*(R", \*(L"cities\*(R", etc. At this time, only United States data is available through this method. .IP "lat" 4 .IX Item "lat" Required. The latitude to query about. Valid ranges are \-90.0 to +90.0 (North is positive) inclusive. .IP "long" 4 .IX Item "long" Required. The longitude to query about. Valid ranges are \-180.0 to +180.0 (East is positive) inclusive. .IP "accuracy" 4 .IX Item "accuracy" Optional. A hint on the \*(L"region\*(R" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m. If coming from a device, in practice, this value is whatever accuracy the device has measuring its location (whether it be coming from a \s-1GPS,\s0 WiFi triangulation, etc.). .IP "granularity" 4 .IX Item "granularity" Optional. The minimal granularity of data to return. If this is not passed in, then \f(CW\*(C`neighborhood\*(C'\fR is assumed. \f(CW\*(C`city\*(C'\fR can also be passed. .IP "max_results" 4 .IX Item "max_results" Optional. A hint as to the number of results to return. This does not guarantee that the number of results returned will equal max_results, but instead informs how many \*(L"nearby\*(R" results to return. Ideally, only pass in the number of places you intend to display to the user here. .RE .RS 4 .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 geo/reverse_geocode .RE .IP "\fBsaved_searches\fR" 4 .IX Item "saved_searches" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the authenticated user's saved search queries. .Sp Returns: ArrayRef[SavedSearch] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 saved_searches/list .RE .IP "\fBsearch\fR" 4 .IX Item "search" .PD 0 .IP "\fBsearch(q)\fR" 4 .IX Item "search(q)" .RS 4 .IP "Parameters: q, count, callback, lang, locale, rpp, since_id, max_id, until, geocode, result_type, include_entities" 4 .IX Item "Parameters: q, count, callback, lang, locale, rpp, since_id, max_id, until, geocode, result_type, include_entities" .IP "Required: q" 4 .IX Item "Required: q" .RE .RS 4 .PD .Sp Returns a \s-1HASH\s0 reference with some meta-data about the query including the \&\f(CW\*(C`next_page\*(C'\fR, \f(CW\*(C`refresh_url\*(C'\fR, and \f(CW\*(C`max_id\*(C'\fR. The statuses are returned in \&\f(CW\*(C`results\*(C'\fR. To iterate over the results, use something similar to: .Sp .Vb 4 \& my $r = $nt\->search($search_term); \& for my $status ( @{$r\->{statuses}} ) { \& print "$status\->{text}\en"; \& } .Ve .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 search/tweets .RE .IP "\fBsent_direct_messages\fR" 4 .IX Item "sent_direct_messages" .PD 0 .IP "alias: direct_messages_sent" 4 .IX Item "alias: direct_messages_sent" .RS 4 .IP "Parameters: since_id, max_id, page, count, include_entities" 4 .IX Item "Parameters: since_id, max_id, page, count, include_entities" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns a list of the 20 most recent direct messages sent by the authenticating user including detailed information about the sending and recipient users. .Sp Important: this method requires an access token with \s-1RWD\s0 (read, write, and direct message) permissions. .Sp Returns: ArrayRef[DirectMessage] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 direct_messages/sent .RE .IP "\fBshow_direct_message\fR" 4 .IX Item "show_direct_message" .PD 0 .IP "\fBshow_direct_message(id)\fR" 4 .IX Item "show_direct_message(id)" .RS 4 .IP "Parameters: id" 4 .IX Item "Parameters: id" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns a single direct message, specified by an id parameter. Like the \f(CW\*(C`direct_messages\*(C'\fR request, this method will include the user objects of the sender and recipient. Requires authentication. .Sp Important: this method requires an access token with \s-1RWD\s0 (read, write, and direct message) permissions. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 direct_messages/show .RE .IP "\fBshow_friendship\fR" 4 .IX Item "show_friendship" .PD 0 .IP "alias: show_relationship" 4 .IX Item "alias: show_relationship" .RS 4 .IP "Parameters: source_id, source_screen_name, target_id, target_screen_name" 4 .IX Item "Parameters: source_id, source_screen_name, target_id, target_screen_name" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns detailed information about the relationship between two users. .Sp Returns: Relationship .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 friendships/show .RE .IP "\fBshow_list_member\fR" 4 .IX Item "show_list_member" .PD 0 .IP "alias: is_list_member" 4 .IX Item "alias: is_list_member" .RS 4 .IP "Parameters: owner_screen_name, owner_id, list_id, slug, user_id, screen_name, include_entities, skip_status" 4 .IX Item "Parameters: owner_screen_name, owner_id, list_id, slug, user_id, screen_name, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Check if the specified user is a member of the specified list. Returns the user or undef. .Sp Returns: Maybe[User] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/members/show .RE .IP "\fBshow_list_subscriber\fR" 4 .IX Item "show_list_subscriber" .PD 0 .IP "alias: is_list_subscriber" 4 .IX Item "alias: is_list_subscriber" .IP "alias: is_subscriber_lists" 4 .IX Item "alias: is_subscriber_lists" .RS 4 .IP "Parameters: owner_screen_name, owner_id, list_id, slug, user_id, screen_name, include_entities, skip_status" 4 .IX Item "Parameters: owner_screen_name, owner_id, list_id, slug, user_id, screen_name, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the user if they are a subscriber. .Sp Returns: User .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 lists/subscribers/show .RE .IP "\fBshow_saved_search\fR" 4 .IX Item "show_saved_search" .PD 0 .IP "\fBshow_saved_search(id)\fR" 4 .IX Item "show_saved_search(id)" .RS 4 .IP "Parameters: id" 4 .IX Item "Parameters: id" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Retrieve the data for a saved search, by \f(CW\*(C`id\*(C'\fR, owned by the authenticating user. .Sp Returns: SavedSearch .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 saved_searches/show/:id .RE .IP "\fBshow_status\fR" 4 .IX Item "show_status" .PD 0 .IP "\fBshow_status(id)\fR" 4 .IX Item "show_status(id)" .RS 4 .IP "Parameters: id, trim_user, include_entities, include_my_retweet" 4 .IX Item "Parameters: id, trim_user, include_entities, include_my_retweet" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns a single status, specified by the id parameter. The status's author will be returned inline. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/show/:id .RE .IP "\fBshow_user\fR" 4 .IX Item "show_user" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, include_entities" 4 .IX Item "Parameters: user_id, screen_name, include_entities" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns extended information of a given user, specified by \s-1ID\s0 or screen name as per the required id parameter. This information includes design settings, so third party developers can theme their widgets according to a given user's preferences. You must be properly authenticated to request the page of a protected user. .Sp Returns: ExtendedUser .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/show .RE .IP "\fBsimilar_places\fR" 4 .IX Item "similar_places" .PD 0 .IP "\fBsimilar_places(lat, long, name)\fR" 4 .IX Item "similar_places(lat, long, name)" .RS 4 .IP "Parameters: lat, long, name, contained_within, attribute:street_address, callback" 4 .IX Item "Parameters: lat, long, name, contained_within, attribute:street_address, callback" .IP "Required: lat, long, name" 4 .IX Item "Required: lat, long, name" .RE .RS 4 .PD .Sp Locates places near the given coordinates which are similar in name. .Sp Conceptually you would use this method to get a list of known places to choose from first. Then, if the desired place doesn't exist, make a request to \&\f(CW\*(C`add_place\*(C'\fR to create a new one. .Sp The token contained in the response is the token needed to be able to create a new place. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 geo/similar_places .RE .IP "\fBsubscribe_list\fR" 4 .IX Item "subscribe_list" .RS 4 .PD 0 .IP "Parameters: owner_screen_name, owner_id, list_id, slug" 4 .IX Item "Parameters: owner_screen_name, owner_id, list_id, slug" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Subscribes the authenticated user to the specified list. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/subscribers/create .RE .IP "\fBsuggestion_categories\fR" 4 .IX Item "suggestion_categories" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the list of suggested user categories. The category slug can be used in the \f(CW\*(C`user_suggestions\*(C'\fR \s-1API\s0 method get the users in that category . Does not require authentication. .Sp Returns: ArrayRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/suggestions .RE .IP "\fBtest\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "test DEPRECATED" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the string \*(L"ok\*(R" status code. .Sp Returns: Hash .RE .IP "\fBtrends_available\fR" 4 .IX Item "trends_available" .RS 4 .PD 0 .IP "Parameters: \fInone\fR" 4 .IX Item "Parameters: none" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the locations with trending topic information. The response is an array of \*(L"locations\*(R" that encode the location's \s-1WOEID\s0 (a Yahoo! Where On Earth \&\s-1ID\s0 ) and some other human-readable information such as a the location's canonical name and country. .Sp For backwards compatibility, this method accepts optional \f(CW\*(C`lat\*(C'\fR and \f(CW\*(C`long\*(C'\fR parameters. You should call \f(CW\*(C`trends_closest\*(C'\fR directly, instead. .Sp Use the \s-1WOEID\s0 returned in the location object to query trends for a specific location. .Sp Returns: ArrayRef[Location] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 trends/available .RE .IP "\fBtrends_closest\fR" 4 .IX Item "trends_closest" .RS 4 .PD 0 .IP "Parameters: lat, long" 4 .IX Item "Parameters: lat, long" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the locations with trending topic information. The response is an array of \*(L"locations\*(R" that encode the location's \s-1WOEID\s0 (a Yahoo! Where On Earth \s-1ID\s0 ) and some other human-readable information such as a the location's canonical name and country. The results are sorted by distance from that location, nearest to farthest. .Sp Use the \s-1WOEID\s0 returned in the location object to query trends for a specific location. .Sp Returns: ArrayRef[Location] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 trends/closest .RE .IP "\fBtrends_current\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "trends_current DEPRECATED" .PD 0 .IP "\fBtrends_current(exclude)\fR" 4 .IX Item "trends_current(exclude)" .RS 4 .IP "Parameters: exclude" 4 .IX Item "Parameters: exclude" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the current top ten trending topics on Twitter. The response includes the time of the request, the name of each trending topic, and query used on Twitter Search results page for that topic. .Sp Returns: HashRef .RE .IP "\fBtrends_daily\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "trends_daily DEPRECATED" .RS 4 .PD 0 .IP "Parameters: date, exclude" 4 .IX Item "Parameters: date, exclude" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the top 20 trending topics for each hour in a given day. .Sp Returns: HashRef .RE .IP "\fBtrends_place\fR" 4 .IX Item "trends_place" .PD 0 .IP "\fBtrends_place(id)\fR" 4 .IX Item "trends_place(id)" .IP "alias: trends_location" 4 .IX Item "alias: trends_location" .RS 4 .IP "Parameters: id, exclude" 4 .IX Item "Parameters: id, exclude" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Returns the top 10 trending topics for a specific \s-1WOEID.\s0 The response is an array of \*(L"trend\*(R" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Search, and the direct \&\s-1URL\s0 that can be issued against Search. This information is cached for five minutes, and therefore users are discouraged from querying these endpoints faster than once every five minutes. Global trends information is also available from this \s-1API\s0 by using a \s-1WOEID\s0 of 1. .Sp Returns: ArrayRef[Trend] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 trends/place .RE .IP "\fBtrends_weekly\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "trends_weekly DEPRECATED" .RS 4 .PD 0 .IP "Parameters: date, exclude" 4 .IX Item "Parameters: date, exclude" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the top 30 trending topics for each day in a given week. .Sp Returns: HashRef .RE .IP "\fBunsubscribe_list\fR" 4 .IX Item "unsubscribe_list" .RS 4 .PD 0 .IP "Parameters: list_id, slug, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Unsubscribes the authenticated user from the specified list. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/subscribers/destroy .RE .IP "\fBupdate\fR" 4 .IX Item "update" .PD 0 .IP "\fBupdate(status)\fR" 4 .IX Item "update(status)" .RS 4 .IP "Parameters: attachment_url, display_coordinates, in_reply_to_status_id, lat, long, media_ids, place_id, status, trim_user" 4 .IX Item "Parameters: attachment_url, display_coordinates, in_reply_to_status_id, lat, long, media_ids, place_id, status, trim_user" .IP "Required: status" 4 .IX Item "Required: status" .RE .RS 4 .PD .Sp Updates the authenticating user's status. Requires the status parameter specified. A status update with text identical to the authenticating user's current status will be ignored. .IP "status" 4 .IX Item "status" Required. The text of your status update. \s-1URL\s0 encode as necessary. Statuses over 140 characters will cause a 403 error to be returned from the \s-1API.\s0 .IP "in_reply_to_status_id" 4 .IX Item "in_reply_to_status_id" Optional. The \s-1ID\s0 of an existing status that the update is in reply to. o Note: This parameter will be ignored unless the author of the tweet this parameter references is mentioned within the status text. Therefore, you must include \&\f(CW@username\fR, where username is the author of the referenced tweet, within the update. .IP "lat" 4 .IX Item "lat" Optional. The location's latitude that this tweet refers to. The valid ranges for latitude is \-90.0 to +90.0 (North is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding long parameter with this tweet. .IP "long" 4 .IX Item "long" Optional. The location's longitude that this tweet refers to. The valid ranges for longitude is \-180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter with this tweet. .IP "place_id" 4 .IX Item "place_id" Optional. The place to attach to this status update. Valid place_ids can be found by querying \f(CW\*(C`reverse_geocode\*(C'\fR. .IP "display_coordinates" 4 .IX Item "display_coordinates" Optional. By default, geo-tweets will have their coordinates exposed in the status object (to remain backwards compatible with existing \s-1API\s0 applications). To turn off the display of the precise latitude and longitude (but keep the contextual location information), pass \f(CW\*(C`display_coordinates =\*(C'\fR 0> on the status update. .RE .RS 4 .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 statuses/update .RE .IP "\fBupdate_account_settings\fR" 4 .IX Item "update_account_settings" .RS 4 .PD 0 .IP "Parameters: trend_location_woid, sleep_time_enabled, start_sleep_time, end_sleep_time, time_zone, lang" 4 .IX Item "Parameters: trend_location_woid, sleep_time_enabled, start_sleep_time, end_sleep_time, time_zone, lang" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Updates the authenticating user's settings. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/settings .RE .IP "\fBupdate_delivery_device\fR" 4 .IX Item "update_delivery_device" .PD 0 .IP "\fBupdate_delivery_device(device)\fR" 4 .IX Item "update_delivery_device(device)" .RS 4 .IP "Parameters: device, include_entities" 4 .IX Item "Parameters: device, include_entities" .IP "Required: device" 4 .IX Item "Required: device" .RE .RS 4 .PD .Sp Sets which device Twitter delivers updates to for the authenticating user. Sending none as the device parameter will disable \s-1SMS\s0 updates. .Sp Returns: BasicUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/update_delivery_device .RE .IP "\fBupdate_friendship\fR" 4 .IX Item "update_friendship" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, device, retweets" 4 .IX Item "Parameters: user_id, screen_name, device, retweets" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Allows you enable or disable retweets and device notifications from the specified user. All other values are assumed to be false. Requires authentication. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 friendships/update .RE .IP "\fBupdate_list\fR" 4 .IX Item "update_list" .RS 4 .PD 0 .IP "Parameters: list_id, slug, name, mode, description, owner_screen_name, owner_id" 4 .IX Item "Parameters: list_id, slug, name, mode, description, owner_screen_name, owner_id" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Updates the specified list. The authenticated user must own the list to be able to update it. .Sp Returns: List .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 lists/update .RE .IP "\fBupdate_location\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "update_location DEPRECATED" .PD 0 .IP "\fBupdate_location(location)\fR" 4 .IX Item "update_location(location)" .RS 4 .IP "Parameters: location" 4 .IX Item "Parameters: location" .IP "Required: location" 4 .IX Item "Required: location" .RE .RS 4 .PD .Sp This method has been deprecated in favor of the update_profile method. Its \s-1URL\s0 will continue to work, but please consider migrating to the newer and more comprehensive method of updating profile attributes. .Sp Returns: BasicUser .RE .IP "\fBupdate_profile\fR" 4 .IX Item "update_profile" .RS 4 .PD 0 .IP "Parameters: name, url, location, description, include_entities, skip_status" 4 .IX Item "Parameters: name, url, location, description, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Sets values that users are able to set under the \*(L"Account\*(R" tab of their settings page. Only the parameters specified will be updated; to only update the \*(L"name\*(R" attribute, for example, only include that parameter in your request. .Sp Returns: ExtendedUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/update_profile .RE .IP "\fBupdate_profile_background_image\fR" 4 .IX Item "update_profile_background_image" .RS 4 .PD 0 .IP "Parameters: image, tile, include_entities, skip_status, use" 4 .IX Item "Parameters: image, tile, include_entities, skip_status, use" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Updates the authenticating user's profile background image. The \f(CW\*(C`image\*(C'\fR parameter must be an arrayref with the same interpretation as the \f(CW\*(C`image\*(C'\fR parameter in the \f(CW\*(C`update_profile_image\*(C'\fR method. See that method's documentation for details. The \f(CW\*(C`use\*(C'\fR parameter allows you to specify whether to use the uploaded profile background or not. .Sp Returns: ExtendedUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/update_profile_background_image .RE .IP "\fBupdate_profile_banner\fR" 4 .IX Item "update_profile_banner" .PD 0 .IP "\fBupdate_profile_banner(banner)\fR" 4 .IX Item "update_profile_banner(banner)" .RS 4 .IP "Parameters: banner, width, height, offset_left, offset_top" 4 .IX Item "Parameters: banner, width, height, offset_left, offset_top" .IP "Required: banner" 4 .IX Item "Required: banner" .RE .RS 4 .PD .Sp Uploads a profile banner on behalf of the authenticating user. The \f(CW\*(C`image\*(C'\fR parameter is an arrayref with the following interpretation: .Sp .Vb 4 \& [ $file ] \& [ $file, $filename ] \& [ $file, $filename, Content_Type => $mime_type ] \& [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ] .Ve .Sp The first value of the array (\f(CW$file\fR) is the name of a file to open. The second value (\f(CW$filename\fR) is the name given to Twitter for the file. If \&\f(CW$filename\fR is not provided, the basename portion of \f(CW$file\fR is used. If \&\f(CW$mime_type\fR is not provided, it will be provided automatically using \&\fILWP::MediaTypes::guess_media_type()\fR. .Sp \&\f(CW$raw_image_data\fR can be provided, rather than opening a file, by passing \&\f(CW\*(C`undef\*(C'\fR as the first array value. .Sp Returns: Nothing .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/update_profile_banner .RE .IP "\fBupdate_profile_colors\fR" 4 .IX Item "update_profile_colors" .RS 4 .PD 0 .IP "Parameters: profile_background_color, profile_text_color, profile_link_color, profile_sidebar_fill_color, profile_sidebar_border_color, include_entities, skip_status" 4 .IX Item "Parameters: profile_background_color, profile_text_color, profile_link_color, profile_sidebar_fill_color, profile_sidebar_border_color, include_entities, skip_status" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Sets one or more hex values that control the color scheme of the authenticating user's profile page on twitter.com. These values are also returned in the /users/show \s-1API\s0 method. .Sp Returns: ExtendedUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/update_profile_colors .RE .IP "\fBupdate_profile_image\fR" 4 .IX Item "update_profile_image" .PD 0 .IP "\fBupdate_profile_image(image)\fR" 4 .IX Item "update_profile_image(image)" .RS 4 .IP "Parameters: image, include_entities, skip_status" 4 .IX Item "Parameters: image, include_entities, skip_status" .IP "Required: image" 4 .IX Item "Required: image" .RE .RS 4 .PD .Sp Updates the authenticating user's profile image. The \f(CW\*(C`image\*(C'\fR parameter is an arrayref with the following interpretation: .Sp .Vb 4 \& [ $file ] \& [ $file, $filename ] \& [ $file, $filename, Content_Type => $mime_type ] \& [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ] .Ve .Sp The first value of the array (\f(CW$file\fR) is the name of a file to open. The second value (\f(CW$filename\fR) is the name given to Twitter for the file. If \&\f(CW$filename\fR is not provided, the basename portion of \f(CW$file\fR is used. If \&\f(CW$mime_type\fR is not provided, it will be provided automatically using \&\fILWP::MediaTypes::guess_media_type()\fR. .Sp \&\f(CW$raw_image_data\fR can be provided, rather than opening a file, by passing \&\f(CW\*(C`undef\*(C'\fR as the first array value. .Sp Returns: ExtendedUser .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 account/update_profile_image .RE .IP "\fBupdate_with_media\fR \fB\s-1DEPRECATED\s0\fR" 4 .IX Item "update_with_media DEPRECATED" .PD 0 .IP "\fBupdate_with_media(status, media[])\fR" 4 .IX Item "update_with_media(status, media[])" .RS 4 .IP "Parameters: status, media[], possibly_sensitive, in_reply_to_status_id, lat, long, place_id, display_coordinates" 4 .IX Item "Parameters: status, media[], possibly_sensitive, in_reply_to_status_id, lat, long, place_id, display_coordinates" .IP "Required: status, media[]" 4 .IX Item "Required: status, media[]" .RE .RS 4 .PD .Sp Updates the authenticating user's status and attaches media for upload. .Sp Note that Twitter has marked this endpoint as \fBdeprecated\fR, and recommends instead calling \f(CW\*(C`upload\*(C'\fR, then (optionally) \f(CW\*(C`create_media_metadata\*(C'\fR, then \&\f(CW\*(C`update\*(C'\fR. .Sp The \f(CW\*(C`media[]\*(C'\fR parameter is an arrayref with the following interpretation: .Sp .Vb 4 \& [ $file ] \& [ $file, $filename ] \& [ $file, $filename, Content_Type => $mime_type ] \& [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ] .Ve .Sp The first value of the array (\f(CW$file\fR) is the name of a file to open. The second value (\f(CW$filename\fR) is the name given to Twitter for the file. If \&\f(CW$filename\fR is not provided, the basename portion of \f(CW$file\fR is used. If \&\f(CW$mime_type\fR is not provided, it will be provided automatically using \&\fILWP::MediaTypes::guess_media_type()\fR. .Sp \&\f(CW$raw_image_data\fR can be provided, rather than opening a file, by passing \&\f(CW\*(C`undef\*(C'\fR as the first array value. .Sp The Tweet text will be rewritten to include the media \s-1URL\s0(s), which will reduce the number of characters allowed in the Tweet text. If the \s-1URL\s0(s) cannot be appended without text truncation, the tweet will be rejected and this method will return an \s-1HTTP 403\s0 error. .Sp Returns: Status .RE .IP "\fBupload\fR" 4 .IX Item "upload" .PD 0 .IP "\fBupload(media)\fR" 4 .IX Item "upload(media)" .RS 4 .IP "Parameters: media" 4 .IX Item "Parameters: media" .IP "Required: media" 4 .IX Item "Required: media" .RE .RS 4 .PD .Sp Uploads an image to twitter without immediately posting it to the authenticating user's timeline. Its return-value hashref notably contains a \&\f(CW\*(C`media_id\*(C'\fR value that's useful as a parameter value in various other endpoint calls, such as \f(CW\*(C`update\*(C'\fR and \f(CW\*(C`create_media_metadata\*(C'\fR. .Sp Returns: HashRef .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 media/upload .RE .IP "\fBupload_status\fR" 4 .IX Item "upload_status" .PD 0 .IP "\fBupload_status(media_id, command)\fR" 4 .IX Item "upload_status(media_id, command)" .RS 4 .IP "Parameters: media_id, command" 4 .IX Item "Parameters: media_id, command" .IP "Required: media_id, command" 4 .IX Item "Required: media_id, command" .RE .RS 4 .PD .Sp Check the status for async video uploads. .Sp Returns: status .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 media/upload .RE .IP "\fBuser_suggestions\fR" 4 .IX Item "user_suggestions" .PD 0 .IP "\fBuser_suggestions(slug)\fR" 4 .IX Item "user_suggestions(slug)" .IP "alias: follow_suggestions" 4 .IX Item "alias: follow_suggestions" .RS 4 .IP "Parameters: slug, lang" 4 .IX Item "Parameters: slug, lang" .IP "Required: slug" 4 .IX Item "Required: slug" .RE .RS 4 .PD .Sp Access the users in a given slug (category) of the Twitter suggested user list and return their most recent status if they are not a protected user. Currently supported values for optional parameter \f(CW\*(C`lang\*(C'\fR are \f(CW\*(C`en\*(C'\fR, \f(CW\*(C`fr\*(C'\fR, \&\f(CW\*(C`de\*(C'\fR, \f(CW\*(C`es\*(C'\fR, \f(CW\*(C`it\*(C'\fR. Does not require authentication. .Sp Returns: ArrayRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/suggestions/:slug/members .RE .IP "\fBuser_suggestions_for\fR" 4 .IX Item "user_suggestions_for" .PD 0 .IP "\fBuser_suggestions_for(slug)\fR" 4 .IX Item "user_suggestions_for(slug)" .IP "alias: follow_suggestions_for" 4 .IX Item "alias: follow_suggestions_for" .RS 4 .IP "Parameters: slug, lang" 4 .IX Item "Parameters: slug, lang" .IP "Required: slug" 4 .IX Item "Required: slug" .RE .RS 4 .PD .Sp Access the users in a given slug (category) of the Twitter suggested user list. .Sp Returns: ArrayRef .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/suggestions/:slug .RE .IP "\fBuser_timeline\fR" 4 .IX Item "user_timeline" .RS 4 .PD 0 .IP "Parameters: user_id, screen_name, since_id, max_id, count, trim_user, exclude_replies, include_rts, contributor_details" 4 .IX Item "Parameters: user_id, screen_name, since_id, max_id, count, trim_user, exclude_replies, include_rts, contributor_details" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns the 20 most recent statuses posted by the authenticating user, or the user specified by \f(CW\*(C`screen_name\*(C'\fR or \f(CW\*(C`user_id\*(C'\fR. .Sp Returns: ArrayRef[Status] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 statuses/user_timeline .RE .IP "\fBusers_search\fR" 4 .IX Item "users_search" .PD 0 .IP "\fBusers_search(q)\fR" 4 .IX Item "users_search(q)" .IP "alias: find_people" 4 .IX Item "alias: find_people" .IP "alias: search_users" 4 .IX Item "alias: search_users" .RS 4 .IP "Parameters: q, per_page, page, count, include_entities" 4 .IX Item "Parameters: q, per_page, page, count, include_entities" .IP "Required: q" 4 .IX Item "Required: q" .RE .RS 4 .PD .Sp Run a search for users similar to Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this \&\s-1API\s0 (about being listed in the People Search). It is only possible to retrieve the first 1000 matches from this \s-1API.\s0 .Sp Returns: ArrayRef[Users] .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 users/search .RE .IP "\fBverify_credentials\fR" 4 .IX Item "verify_credentials" .RS 4 .PD 0 .IP "Parameters: include_entities, skip_status, include_email" 4 .IX Item "Parameters: include_entities, skip_status, include_email" .IP "Required: \fInone\fR" 4 .IX Item "Required: none" .RE .RS 4 .PD .Sp Returns an \s-1HTTP 200 OK\s0 response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not. Use this method to test if supplied user credentials are valid. .Sp Returns: ExtendedUser .Sp Twitter \s-1API\s0 documentation: \s-1GET\s0 account/verify_credentials .RE .IP "\fBupdate_with_media\fR" 4 .IX Item "update_with_media" .PD 0 .IP "\fBupdate_with_media(status, media)\fR" 4 .IX Item "update_with_media(status, media)" .RS 4 .IP "Parameters: status, media[], possibly_sensitive, in_reply_to_status_id, lat, long, place_id, display_coordinates" 4 .IX Item "Parameters: status, media[], possibly_sensitive, in_reply_to_status_id, lat, long, place_id, display_coordinates" .IP "Required: status, media" 4 .IX Item "Required: status, media" .RE .RS 4 .PD .Sp Updates the authenticating user's status and attaches media for upload. .Sp The \f(CW\*(C`media[]\*(C'\fR parameter is an arrayref with the following interpretation: .Sp .Vb 4 \& [ $file ] \& [ $file, $filename ] \& [ $file, $filename, Content_Type => $mime_type ] \& [ undef, $filename, Content_Type => $mime_type, Content => $raw_image_data ] .Ve .Sp The first value of the array (\f(CW$file\fR) is the name of a file to open. The second value (\f(CW$filename\fR) is the name given to Twitter for the file. If \&\f(CW$filename\fR is not provided, the basename portion of \f(CW$file\fR is used. If \&\f(CW$mime_type\fR is not provided, it will be provided automatically using \&\fILWP::MediaTypes::guess_media_type()\fR. .Sp \&\f(CW$raw_image_data\fR can be provided, rather than opening a file, by passing \&\f(CW\*(C`undef\*(C'\fR as the first array value. .Sp The Tweet text will be rewritten to include the media \s-1URL\s0(s), which will reduce the number of characters allowed in the Tweet text. If the \s-1URL\s0(s) cannot be appended without text truncation, the tweet will be rejected and this method will return an \s-1HTTP 403\s0 error. .Sp Returns: Status .Sp Twitter \s-1API\s0 documentation: \s-1POST\s0 statuses/update_with_media .RE .SH "Search API Methods" .IX Header "Search API Methods" These methods are provided when trait \f(CW\*(C`API::Search\*(C'\fR is included in the \f(CW\*(C`traits\*(C'\fR option to \f(CW\*(C`new\*(C'\fR. .IP "\fBsearch\fR" 4 .IX Item "search" .PD 0 .IP "\fBsearch(q)\fR" 4 .IX Item "search(q)" .RS 4 .IP "Parameters: q, geocode, lang, locale, result_type, count, until, since_id, max_id, include_entities, callback" 4 .IX Item "Parameters: q, geocode, lang, locale, result_type, count, until, since_id, max_id, include_entities, callback" .IP "Required: q" 4 .IX Item "Required: q" .RE .RS 4 .PD .Sp Returns a \s-1HASH\s0 reference with some meta-data about the query including the \&\f(CW\*(C`next_page\*(C'\fR, \f(CW\*(C`refresh_url\*(C'\fR, and \f(CW\*(C`max_id\*(C'\fR. The statuses are returned in \&\f(CW\*(C`results\*(C'\fR. To iterate over the results, use something similar to: .Sp .Vb 2 \& my $r = $nt\->search($search_term); \& my $r = $nt\->search({ q => $search_term, count => 10 }) \& \& for my $status ( @{$r\->{results}} ) { \& print "$status\->{text}\en"; \& } .Ve .Sp Returns: HashRef .RE .SH "Lists API Methods" .IX Header "Lists API Methods" The original Lists \s-1API\s0 methods have been deprecated. Net::Twitter::Role::API::Lists provides backwards compatibility for code written using those deprecated methods. If you're not already using the \&\f(CW\*(C`API::Lists\*(C'\fR trait, don't! Use the lists methods described above. .PP If you are using the \f(CW\*(C`API::Lists\*(C'\fR trait, you should remove it from your code and change the arguments in your list \s-1API\s0 method calls to match those described above. .PP Also, if using the \f(CW\*(C`API::Lists\*(C'\fR trait, you can pass synthetic argument \&\f(CW\*(C`\-legacy_lists_api\*(C'\fR set to 0 for individual calls to use the new endpoints semantics. .SH "TwitterVision API Methods" .IX Header "TwitterVision API Methods" These methods are provided when trait \f(CW\*(C`API::TwitterVision\*(C'\fR is included in the \&\f(CW\*(C`traits\*(C'\fR option to \f(CW\*(C`new\*(C'\fR. .IP "\fBcurrent_status\fR" 4 .IX Item "current_status" .PD 0 .IP "\fBcurrent_status(id)\fR" 4 .IX Item "current_status(id)" .RS 4 .IP "Parameters: id, callback" 4 .IX Item "Parameters: id, callback" .IP "Required: id" 4 .IX Item "Required: id" .RE .RS 4 .PD .Sp Get the current location and status of a user. .Sp Returns: HashRef .RE .IP "\fBupdate_twittervision\fR" 4 .IX Item "update_twittervision" .PD 0 .IP "\fBupdate_twittervision(location)\fR" 4 .IX Item "update_twittervision(location)" .RS 4 .IP "Parameters: location" 4 .IX Item "Parameters: location" .IP "Required: location" 4 .IX Item "Required: location" .RE .RS 4 .PD .Sp Updates the location for the authenticated user. .Sp Returns: HashRef .RE .SH "LEGACY COMPATIBILITY" .IX Header "LEGACY COMPATIBILITY" This version of \f(CW\*(C`Net::Twitter\*(C'\fR automatically includes the \f(CW\*(C`Legacy\*(C'\fR trait if no \f(CW\*(C`traits\*(C'\fR option is provided to \f(CW\*(C`new\*(C'\fR. Therefore, these 2 calls are currently equivalent: .PP .Vb 6 \& $nt = Net::Twitter\->new(username => $user, password => $passwd); \& $nt = Net::Twitter\->new( \& username => $user, \& password => $passwd, \& traits => [\*(AqLegacy\*(Aq], \& ); .Ve .PP Thus, existing applications written for a prior version of \f(CW\*(C`Net::Twitter\*(C'\fR should continue to run, without modification, with this version. .PP In a future release, the default traits may change. Prior to that change, however, a nearer future version will add a warning if no \f(CW\*(C`traits\*(C'\fR option is provided to \f(CW\*(C`new\*(C'\fR. To avoid this warning, add an appropriate \f(CW\*(C`traits\*(C'\fR option to your existing application code. .SH "ERROR HANDLING" .IX Header "ERROR HANDLING" There are currently two strategies for handling errors: throwing exceptions and wrapping errors. Exception handling is the newer, recommended strategy. .SS "Wrapping Errors" .IX Subsection "Wrapping Errors" When trait \f(CW\*(C`WrapError\*(C'\fR is specified (or \f(CW\*(C`Legacy\*(C'\fR, which includes trait \&\f(CW\*(C`WrapError\*(C'\fR), \f(CW\*(C`Net::Twitter\*(C'\fR returns undef on error. To retrieve information about the error, use methods \f(CW\*(C`http_code\*(C'\fR, \f(CW\*(C`http_message\*(C'\fR, and \f(CW\*(C`get_error\*(C'\fR. These methods are described in the Net::Twitter::Role::WrapError. .PP .Vb 8 \& if ( my $followers = $nt\->followers ) { \& for my $follower ( @$followers ) { \& #... \& } \& } \& else { \& warn "HTTP message: ", $nt\->http_message, "\en"; \& } .Ve .PP Since an error is stored in the object instance, this error handling strategy is problematic when using a user agent like \f(CW\*(C`LWP::UserAgent::POE\*(C'\fR that provides concurrent requests. The error for one request can be overwritten by a concurrent request before you have an opportunity to access it. .SS "Exception Handling" .IX Subsection "Exception Handling" When \f(CW\*(C`Net::Twitter\*(C'\fR encounters a Twitter \s-1API\s0 error or a network error, it throws a \f(CW\*(C`Net::Twitter::Error\*(C'\fR object. You can catch and process these exceptions by using \f(CW\*(C`eval\*(C'\fR blocks and testing $@: .PP .Vb 2 \& eval { \& my $statuses = $nt\->friends_timeline(); # this might die! \& \& for my $status ( @$statuses ) { \& #... \& } \& }; \& if ( $@ ) { \& # friends_timeline encountered an error \& \& if ( blessed $@ && $@\->isa(\*(AqNet::Twitter::Error\*(Aq) ) { \& #... use the thrown error obj \& warn $@\->error; \& } \& else { \& # something bad happened! \& die $@; \& } \& } .Ve .PP \&\f(CW\*(C`Net::Twitter::Error\*(C'\fR stringifies to something reasonable, so if you don't need detailed error information, you can simply treat $@ as a string: .PP .Vb 4 \& eval { $nt\->update($status) }; \& if ( $@ ) { \& warn "update failed because: $@\en"; \& } .Ve .SH "FAQ" .IX Header "FAQ" .ie n .IP "Why does ""\->followers({ screen_name => $friend })"" return \fImy\fR followers instead of $friends's?" 4 .el .IP "Why does \f(CW\->followers({ screen_name => $friend })\fR return \fImy\fR followers instead of \f(CW$friends\fR's?" 4 .IX Item "Why does ->followers({ screen_name => $friend }) return my followers instead of $friends's?" First, check carefully to make sure you've spelled \*(L"screen_name\*(R" correctly. Twitter sometimes discards parameters it doesn't recognize. In this case, the result is a list of your own followers\-\-\-the same thing that would happen if you called \f(CW\*(C`followers\*(C'\fR without the \f(CW\*(C`screen_name\*(C'\fR parameter. .ie n .IP "How do I use the ""geocode"" parameter in the Search \s-1API\s0?" 4 .el .IP "How do I use the \f(CWgeocode\fR parameter in the Search \s-1API\s0?" 4 .IX Item "How do I use the geocode parameter in the Search API?" The \f(CW\*(C`geocode\*(C'\fR parameter value includes a latitude, longitude, and radius separated with commas. .Sp .Vb 1 \& $r = $nt\->search({ geocode => "45.511795,\-122.675629,25mi" }); .Ve .ie n .IP "How do I get Twitter to display something other than ""from Perl Net::Twitter""?" 4 .el .IP "How do I get Twitter to display something other than ``from Perl Net::Twitter''?" 4 .IX Item "How do I get Twitter to display something other than from Perl Net::Twitter?" If you set the source parameter to \f(CW\*(C`api\*(C'\fR, twitter will display \*(L"from \&\s-1API\*(R",\s0 and if you set it to the empty string, twitter will display, \*(L"from web\*(R". .Sp .Vb 3 \& $nt = Net::Twitter\->new(netrc => 1,legacy => 0,ssl => 1,source => \*(Aqapi\*(Aq); \& $nt\->update(\*(AqA post with the source parameter overridden.\*(Aq); \& # result: http://twitter.com/semifor_test/status/6541105458 \& \& $nt = Net::Twitter\->new(netrc => 1,legacy => 0,ssl => 1,source => \*(Aq\*(Aq); \& $nt\->update(\*(AqA post with the source parameter overridden.\*(Aq); \& # result: http://twitter.com/semifor_test/status/6541257224 .Ve .Sp If you want something other than \*(L"Net::Twitter\*(R", \*(L"\s-1API\*(R",\s0 or \*(L"web\*(R", you need to register an application and use OAuth authentication. If you do that, you can have any name you choose for the application printed as the source. Since rolling out OAuth, Twitter has stopped issuing new registered source parameters, only existing register source parameters are valid. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "Net::Twitter::Error" 4 .IX Item "Net::Twitter::Error" The \f(CW\*(C`Net::Twitter\*(C'\fR exception object. .IP "" 4 .IX Item "" This is the official Twitter \s-1API\s0 documentation. It describes the methods and their parameters in more detail and may be more current than the documentation provided with this module. .IP "LWP::UserAgent::POE" 4 .IX Item "LWP::UserAgent::POE" This LWP::UserAgent compatible class can be used in \s-1POE\s0 based application along with Net::Twitter to provide concurrent, non-blocking requests. .IP "Catalyst::Authentication::Credential::Twitter" 4 .IX Item "Catalyst::Authentication::Credential::Twitter" This module, by Jesse Stay, provides Twitter OAuth authentication support for the popular Catalyst web application framework. .SH "SUPPORT" .IX Header "SUPPORT" Please report bugs to \f(CW\*(C`bug\-net\-twitter@rt.cpan.org\*(C'\fR, or through the web interface at . .PP Join the Net::Twitter \s-1IRC\s0 channel at . .PP Follow perl_api: . .PP Track Net::Twitter development at . .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" Many thanks to Chris Thompson , the original author of \&\f(CW\*(C`Net::Twitter\*(C'\fR and all versions prior to 3.00. .PP Also, thanks to Chris Prather (perigrin) for answering many design and implementation questions, especially with regards to Moose. .SH "AUTHOR" .IX Header "AUTHOR" Marc Mims (@semifor on Twitter) .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Roberto Etcheverry (@retcheverry on Twitter) .PP \&\s-1KATOU\s0 Akira .PP Francisco Pecorella .PP Doug Bell .PP Justin Hunter .PP Allen Haim .PP Joe Papperello (@antipasta on Github and Twitter) .PP Samuel Kaufman (ediblenergy on Github) .PP AnnMary Mathew (ammathew on Github) .PP Olaf Alders (oalders on Github) .SH "LICENSE" .IX Header "LICENSE" Copyright (c) 2009\-2016 Marc Mims .PP The Twitter \s-1API\s0 itself, and the description text used in this module is: .PP Copyright (c) 2016 Twitter .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "DISCLAIMER OF WARRANTY" .IX Header "DISCLAIMER OF WARRANTY" \&\s-1BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE \*(L"AS IS\*(R" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.\s0 .PP \&\s-1IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE\s0 (\s-1INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE\s0), \s-1EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\s0