.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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::Lite::WithAPIv1_1 3pm" .TH Net::Twitter::Lite::WithAPIv1_1 3pm "2022-06-16" "perl v5.34.0" "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::Lite::WithAPIv1_1 \- A perl interface to the Twitter API v1.1 .SH "VERSION" .IX Header "VERSION" version 0.12008 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Net::Twitter::Lite::WithAPIv1_1; \& use Scalar::Util \*(Aqblessed\*(Aq; \& \& my $nt = Net::Twitter::Lite::WithAPIv1_1\->new( \& 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\->home_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::Lite::Error\*(Aq); \& \& warn "HTTP Response Code: ", $err\->code, "\en", \& "HTTP Message......: ", $err\->message, "\en", \& "Twitter error.....: ", $err\->error, "\en"; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a perl interface to the Twitter APIs. See for a full description of the Twitter APIs. .SH "RETURN VALUES" .IX Header "RETURN VALUES" Net::Twitter::Lite 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::Lite::WithAPIv1_1\*(C'\fR object. It takes several named parameters, all of them optional: .RS 4 .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::Lite::WithAPIv1_1\*(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 this 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::Lite\*(C'\fR distribution. .IP "useragent_class" 4 .IX Item "useragent_class" The \f(CW\*(C`LWP::UserAgent\*(C'\fR compatible class used internally to make \s-1HTTP\s0 requests. 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::Lite::WithAPIv1_1/$VERSION (Perl)\*(R", where \f(CW$VERSION\fR is the current version of this module. .IP "source" 4 .IX Item "source" Twitter on longer uses the \f(CW\*(C`source\*(C'\fR parameter. Support for it remains in this module 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.1\*(R". This option is available when the \f(CW\*(C`API::RESTv1_1\*(C'\fR trait is included. .IP "upload_url" 4 .IX Item "upload_url" Base \s-1URL\s0 for media uploads. Defaults to \*(L"https://upload.twitter.com/1.1\*(R". .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::Lite::WithAPIv1_1\*(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. .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, 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::Lite::WithAPIv1_1\->new(netrc => 1); \& $nt = Net::Twitter::Lite::WithAPIv1_1\->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 "wrap_result" 4 .IX Item "wrap_result" (Optional) If set to 1, this option will return an Net::Twitter::Lite::WrapResult object, which provides both the Twitter \s-1API\s0 result and the HTTP::Response object for the \s-1API\s0 call. See Net::Twitter::Lite::WrapResult for details. .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. .SH "AUTHENTICATION" .IX Header "AUTHENTICATION" With Twitter \s-1API\s0 version 1.1, all \s-1API\s0 calls require OAuth. Other Twitter compatible services, like Identi.ca, accept Basic Authentication. So, this module provides support for both. .PP For OAuth authentication, provide \f(CW\*(C`consumer_key\*(C'\fR and \f(CW\*(C`consumer_secret\*(C'\fR arguments to \f(CW\*(C`new\*(C'\fR. Set \f(CW\*(C`access_token\*(C'\fR and \f(CW\*(C`access_token_secret\*(C'\fR for each call, or provide them as arguments to \f(CW\*(C`new\*(C'\fR. .PP For Basic Authentication, 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 \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 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 "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, these additional \fIsynthetic\fR arguments are supported. .IP "authenticate" 4 .IX Item "authenticate" When set to 1, an Authorization header for the \s-1API\s0 call will be provided; 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_satus\*(C'\fR method which returns different values for authenticated and unauthenticated calls. See \*(L"\s-1AUTHENTICATION\*(R"\s0 for more details. .SH "API Methods" .IX Header "API 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 .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 .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 .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] .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] .RE .IP "\fBcontributees\fR" 4 .IX Item "contributees" .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" 4 .IX Item "contributors" .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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] .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] .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 .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] .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 .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] .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 .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 .RE .IP "\fBgeo_id\fR" 4 .IX Item "geo_id" .PD 0 .IP "\fBgeo_id(id)\fR" 4 .IX Item "geo_id(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 details of a place returned from the \f(CW\*(C`reverse_geocode\*(C'\fR method. .Sp Returns: HashRef .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 .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 .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] .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 .RE .IP "\fBget_lists\fR" 4 .IX Item "get_lists" .PD 0 .IP "alias: all_subscriptions" 4 .IX Item "alias: all_subscriptions" .IP "alias: list_lists all_subscriptions" 4 .IX Item "alias: list_lists 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: ArrayRef[Lists] .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 .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 .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] .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 .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 .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] .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 .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 .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] .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 .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 .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] .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 .RE .IP "\fBno_retweet_ids\fR" 4 .IX Item "no_retweet_ids" .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 an \s-1ARRAY\s0 ref of user IDs for which the authenticating user does not want to receive retweets. .Sp Returns: ArrayRef[UserIDs] .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 .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 .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 .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 .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 .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 .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] .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] .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 .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] .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($searh_term); \& for my $status ( @{$r\->{statuses}} ) { \& print "$status\->{text}\en"; \& } .Ve .Sp Returns: HashRef .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] .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 .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 .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] .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 .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 .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 .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 .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 .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 .RE .IP "\fBlist_subscriptions\fR" 4 .IX Item "list_subscriptions" .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" .IP "Aliases: subscriptions" 4 .IX Item "Aliases: subscriptions" .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] .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" .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: Hashref .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 .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] .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] .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] .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 .RE .IP "\fBupdate\fR" 4 .IX Item "update" .PD 0 .IP "\fBupdate(status)\fR" 4 .IX Item "update(status)" .RS 4 .IP "Parameters: status, lat, long, place_id, display_coordinates, in_reply_to_status_id, trim_user" 4 .IX Item "Parameters: status, lat, long, place_id, display_coordinates, in_reply_to_status_id, 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 .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 .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 .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 .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 .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 .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 .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 \&\fBLWP::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 .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 .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 \&\fBLWP::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 .RE .IP "\fBupload_media\fR" 4 .IX Item "upload_media" .PD 0 .IP "alias: upload" 4 .IX Item "alias: upload" .RS 4 .IP "Parameters: media, media_data, additional_owners" 4 .IX Item "Parameters: media, media_data, additional_owners" .IP "Required: media or media_data" 4 .IX Item "Required: media or media_data" .RE .RS 4 .PD .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 \&\fBLWP::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 Or, pass base64\-encoded data with the \f(CW\*(C`media_data\*(C'\fR parameter. .Sp Returns: Hashref with media_id. .RE .IP "\fBuser_suggestions\fR" 4 .IX Item "user_suggestions" .PD 0 .IP "\fBuser_suggestions(category)\fR" 4 .IX Item "user_suggestions(category)" .IP "alias: follow_suggestions" 4 .IX Item "alias: follow_suggestions" .RS 4 .IP "Parameters: category, lang" 4 .IX Item "Parameters: category, lang" .IP "Required: category" 4 .IX Item "Required: category" .RE .RS 4 .PD .Sp Access the users in a given 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 .RE .IP "\fBuser_suggestions_for\fR" 4 .IX Item "user_suggestions_for" .PD 0 .IP "\fBuser_suggestions_for(category)\fR" 4 .IX Item "user_suggestions_for(category)" .IP "alias: follow_suggestions" 4 .IX Item "alias: follow_suggestions" .RS 4 .IP "Parameters: category, lang" 4 .IX Item "Parameters: category, lang" .IP "Required: category" 4 .IX Item "Required: category" .RE .RS 4 .PD .Sp Access the users in a given category of the Twitter suggested user list. .Sp Returns: ArrayRef .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] .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] .RE .IP "\fBverify_credentials\fR" 4 .IX Item "verify_credentials" .RS 4 .PD 0 .IP "Parameters: include_entities, skip_status" 4 .IX Item "Parameters: include_entities, skip_status" .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 .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 \&\fBLWP::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 .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, callback, lang, locale, rpp, page, since_id, until, geocode, show_user, result_type" 4 .IX Item "Parameters: q, callback, lang, locale, rpp, page, since_id, until, geocode, show_user, result_type" .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($searh_term); \& for my $status ( @{$r\->{results}} ) { \& print "$status\->{text}\en"; \& } .Ve .Sp Returns: HashRef .RE .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 "ERROR HANDLING" .IX Header "ERROR HANDLING" When a Twitter \s-1API\s0 error or a network error is encountered, \&\f(CW\*(C`Net::Twitter::Lite::Error\*(C'\fR object is thrown. 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::Lite::Error\*(Aq) ) { \& #... use the thrown error obj \& warn $@\->error; \& } \& else { \& # something bad happened! \& die $@; \& } \& } .Ve .PP \&\f(CW\*(C`Net::Twitter::Lite::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 "SEE ALSO" .IX Header "SEE ALSO" .IP "Net::Twitter::Lite::Error" 4 .IX Item "Net::Twitter::Lite::Error" The \f(CW\*(C`Net::Twitter::Lite\*(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::Lite 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. .IP "AnyEvent::Twitter::Stream" 4 .IX Item "AnyEvent::Twitter::Stream" An excellent module for Twitter Streaming \s-1API\s0 support. .SH "SUPPORT" .IX Header "SUPPORT" Please report bugs at . .PP Join the #net\-twitter \s-1IRC\s0 channel on irc.perl.org. .PP Follow perl_api: . .PP Track development at . .SH "AUTHOR" .IX Header "AUTHOR" Marc Mims (@semifor on Twitter) .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Marek Foss (@f055) .SH "LICENSE" .IX Header "LICENSE" Copyright (c) 2013 Marc Mims .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.