.\" 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 "Twitter::API::Trait::ApiMethods 3pm" .TH Twitter::API::Trait::ApiMethods 3pm "2018-10-05" "perl v5.26.2" "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" Twitter::API::Trait::ApiMethods \- Convenient API Methods .SH "VERSION" .IX Header "VERSION" version 1.0005 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This trait provides convenient methods for calling \s-1API\s0 endpoints. They are Net::Twitter compatible, with the same names and calling conventions. .PP Refer to Twitter's \s-1API\s0 documentation for details about each method's parameters. .PP These methods are simply shorthand forms of \f(CW\*(C`get\*(C'\fR and \f(CW\*(C`post\*(C'\fR. All methods can be called with a parameters hashref. It can be omitted for endpoints that do not require any parameters, such as \f(CW\*(C`mentions\*(C'\fR. For example, all of these calls are equivalent: .PP .Vb 4 \& $client\->mentions; \& $client\->mentions({}); \& $client\->get(\*(Aqstatuses/mentions_timeline\*(Aq); \& $client\->get(\*(Aqstatuses/mentions_timeline\*(Aq, {}); .Ve .PP Use the parameters hashref to pass optional parameters. For example, .PP .Vb 1 \& $client\->mentions({ count => 200, trim_user=>\*(Aqtrue\*(Aq }); .Ve .PP Some methods, with required parameters, can take positional parameters. For example, \f(CW\*(C`geo_id\*(C'\fR requires a \f(CW\*(C`place_id\*(C'\fR parameter. These calls are equivalent: .PP .Vb 2 \& $client\->place_id($place); \& $client\->place_id({ place_id => $place }); .Ve .PP When positional parameters are allowed, they must be specified in the correct order, but they don't all need to be specified. Those not specified positionally can be added to the parameters hashref. For example, these calls are equivalent: .PP .Vb 3 \& $client\->add_collection_entry($id, $tweet_id); \& $client\->add_collection_entry($id, { tweet_id => $tweet_id); \& $client\->add_collection_entry({ id => $id, tweet_id => $tweet_id }); .Ve .PP Many calls require a \f(CW\*(C`screen_name\*(C'\fR or \f(CW\*(C`user_id\*(C'\fR. Where noted, you may pass either \s-1ID\s0 as the first positional parameter. Twitter::API will inspect the value. If it contains only digits, it will be considered a \f(CW\*(C`user_id\*(C'\fR. Otherwise, it will be considered a \f(CW\*(C`screen_name\*(C'\fR. Best practice is to explicitly declare the \s-1ID\s0 type by passing it in the parameters hashref, because it is possible to for users to set their screen names to a string of digits, making the inferred \s-1ID\s0 ambiguous. These calls are equivalent: .PP .Vb 2 \& $client\->create_block(\*(AqrealDonaldTrump\*(Aq); \& $client\->create_block({ screen_name => \*(AqrealDonaldTrump\*(Aq }); .Ve .PP Since all of these methods simple resolve to a \f(CW\*(C`get\*(C'\fR or \f(CW\*(C`post\*(C'\fR call, see the Twitter::API for details about return values and error handling. .SH "METHODS" .IX Header "METHODS" .SS "account_settings([ \e%args ])" .IX Subsection "account_settings([ %args ])" .SS "blocking([ \e%args ])" .IX Subsection "blocking([ %args ])" Aliases: blocks_list .PP .SS "blocking_ids([ \e%args ])" .IX Subsection "blocking_ids([ %args ])" Aliases: blocks_ids .PP .ie n .SS "collection_entries([ $id, ][ \e%args ])" .el .SS "collection_entries([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "collection_entries([ $id, ][ %args ])" .ie n .SS "collections([ $screen_name | $user_id, ][ \e%args ])" .el .SS "collections([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "collections([ $screen_name | $user_id, ][ %args ])" .SS "favorites([ \e%args ])" .IX Subsection "favorites([ %args ])" .SS "followers([ \e%args ])" .IX Subsection "followers([ %args ])" Aliases: followers_list .PP .ie n .SS "followers_ids([ $screen_name | $user_id, ][ \e%args ])" .el .SS "followers_ids([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "followers_ids([ $screen_name | $user_id, ][ %args ])" .SS "friends([ \e%args ])" .IX Subsection "friends([ %args ])" Aliases: friends_list .PP .SS "friends_ids([ \e%args ])" .IX Subsection "friends_ids([ %args ])" Aliases: following_ids .PP .SS "friendships_incoming([ \e%args ])" .IX Subsection "friendships_incoming([ %args ])" Aliases: incoming_friendships .PP .SS "friendships_outgoing([ \e%args ])" .IX Subsection "friendships_outgoing([ %args ])" Aliases: outgoing_friendships .PP .ie n .SS "geo_id([ $place_id, ][ \e%args ])" .el .SS "geo_id([ \f(CW$place_id\fP, ][ \e%args ])" .IX Subsection "geo_id([ $place_id, ][ %args ])" .SS "geo_search([ \e%args ])" .IX Subsection "geo_search([ %args ])" .SS "get_configuration([ \e%args ])" .IX Subsection "get_configuration([ %args ])" .SS "get_languages([ \e%args ])" .IX Subsection "get_languages([ %args ])" .SS "get_list([ \e%args ])" .IX Subsection "get_list([ %args ])" Aliases: show_list .PP .SS "get_lists([ \e%args ])" .IX Subsection "get_lists([ %args ])" Aliases: list_lists, all_subscriptions .PP .SS "get_privacy_policy([ \e%args ])" .IX Subsection "get_privacy_policy([ %args ])" .SS "get_tos([ \e%args ])" .IX Subsection "get_tos([ %args ])" .SS "home_timeline([ \e%args ])" .IX Subsection "home_timeline([ %args ])" .SS "list_members([ \e%args ])" .IX Subsection "list_members([ %args ])" .SS "list_memberships([ \e%args ])" .IX Subsection "list_memberships([ %args ])" .SS "list_ownerships([ \e%args ])" .IX Subsection "list_ownerships([ %args ])" .SS "list_statuses([ \e%args ])" .IX Subsection "list_statuses([ %args ])" .SS "list_subscribers([ \e%args ])" .IX Subsection "list_subscribers([ %args ])" .SS "list_subscriptions([ \e%args ])" .IX Subsection "list_subscriptions([ %args ])" Aliases: subscriptions .PP .SS "lookup_friendships([ \e%args ])" .IX Subsection "lookup_friendships([ %args ])" .ie n .SS "lookup_statuses([ $id, ][ \e%args ])" .el .SS "lookup_statuses([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "lookup_statuses([ $id, ][ %args ])" .SS "lookup_users([ \e%args ])" .IX Subsection "lookup_users([ %args ])" .SS "mentions([ \e%args ])" .IX Subsection "mentions([ %args ])" Aliases: replies, mentions_timeline .PP .SS "mutes([ \e%args ])" .IX Subsection "mutes([ %args ])" Aliases: muting_ids, muted_ids .PP .SS "muting([ \e%args ])" .IX Subsection "muting([ %args ])" Aliases: mutes_list .PP .SS "no_retweet_ids([ \e%args ])" .IX Subsection "no_retweet_ids([ %args ])" Aliases: no_retweets_ids .PP .SS "oembed([ \e%args ])" .IX Subsection "oembed([ %args ])" .SS "profile_banner([ \e%args ])" .IX Subsection "profile_banner([ %args ])" .SS "rate_limit_status([ \e%args ])" .IX Subsection "rate_limit_status([ %args ])" .ie n .SS "retweeters_ids([ $id, ][ \e%args ])" .el .SS "retweeters_ids([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "retweeters_ids([ $id, ][ %args ])" .ie n .SS "retweets([ $id, ][ \e%args ])" .el .SS "retweets([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "retweets([ $id, ][ %args ])" .SS "retweets_of_me([ \e%args ])" .IX Subsection "retweets_of_me([ %args ])" Aliases: retweeted_of_me .PP .ie n .SS "reverse_geocode([ $lat, [ $long, ]][ \e%args ])" .el .SS "reverse_geocode([ \f(CW$lat\fP, [ \f(CW$long\fP, ]][ \e%args ])" .IX Subsection "reverse_geocode([ $lat, [ $long, ]][ %args ])" .SS "saved_searches([ \e%args ])" .IX Subsection "saved_searches([ %args ])" .ie n .SS "search([ $q, ][ \e%args ])" .el .SS "search([ \f(CW$q\fP, ][ \e%args ])" .IX Subsection "search([ $q, ][ %args ])" .SS "sent_direct_messages([ \e%args ])" .IX Subsection "sent_direct_messages([ %args ])" Aliases: direct_messages_sent .PP .SS "show_friendship([ \e%args ])" .IX Subsection "show_friendship([ %args ])" Aliases: show_relationship .PP .SS "show_list_member([ \e%args ])" .IX Subsection "show_list_member([ %args ])" Aliases: is_list_member .PP .SS "show_list_subscriber([ \e%args ])" .IX Subsection "show_list_subscriber([ %args ])" Aliases: is_list_subscriber, is_subscriber_lists .PP .ie n .SS "show_saved_search([ $id, ][ \e%args ])" .el .SS "show_saved_search([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "show_saved_search([ $id, ][ %args ])" .ie n .SS "show_status([ $id, ][ \e%args ])" .el .SS "show_status([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "show_status([ $id, ][ %args ])" .ie n .SS "show_user([ $screen_name | $user_id, ][ \e%args ])" .el .SS "show_user([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "show_user([ $screen_name | $user_id, ][ %args ])" .SS "suggestion_categories([ \e%args ])" .IX Subsection "suggestion_categories([ %args ])" .SS "trends_available([ \e%args ])" .IX Subsection "trends_available([ %args ])" .SS "trends_closest([ \e%args ])" .IX Subsection "trends_closest([ %args ])" .ie n .SS "trends_place([ $id, ][ \e%args ])" .el .SS "trends_place([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "trends_place([ $id, ][ %args ])" .ie n .SS "user_suggestions([ $slug, ][ \e%args ])" .el .SS "user_suggestions([ \f(CW$slug\fP, ][ \e%args ])" .IX Subsection "user_suggestions([ $slug, ][ %args ])" .ie n .SS "user_suggestions_for([ $slug, ][ \e%args ])" .el .SS "user_suggestions_for([ \f(CW$slug\fP, ][ \e%args ])" .IX Subsection "user_suggestions_for([ $slug, ][ %args ])" Aliases: follow_suggestions .PP .ie n .SS "user_timeline([ $screen_name | $user_id, ][ \e%args ])" .el .SS "user_timeline([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "user_timeline([ $screen_name | $user_id, ][ %args ])" .ie n .SS "users_search([ $q, ][ \e%args ])" .el .SS "users_search([ \f(CW$q\fP, ][ \e%args ])" .IX Subsection "users_search([ $q, ][ %args ])" Aliases: find_people, search_users .PP .SS "verify_credentials([ \e%args ])" .IX Subsection "verify_credentials([ %args ])" .ie n .SS "add_collection_entry([ $id, [ $tweet_id, ]][ \e%args ])" .el .SS "add_collection_entry([ \f(CW$id\fP, [ \f(CW$tweet_id\fP, ]][ \e%args ])" .IX Subsection "add_collection_entry([ $id, [ $tweet_id, ]][ %args ])" .SS "add_list_member([ \e%args ])" .IX Subsection "add_list_member([ %args ])" .ie n .SS "create_block([ $screen_name | $user_id, ][ \e%args ])" .el .SS "create_block([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "create_block([ $screen_name | $user_id, ][ %args ])" .ie n .SS "create_collection([ $name, ][ \e%args ])" .el .SS "create_collection([ \f(CW$name\fP, ][ \e%args ])" .IX Subsection "create_collection([ $name, ][ %args ])" .ie n .SS "create_favorite([ $id, ][ \e%args ])" .el .SS "create_favorite([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "create_favorite([ $id, ][ %args ])" .ie n .SS "create_friend([ $screen_name | $user_id, ][ \e%args ])" .el .SS "create_friend([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "create_friend([ $screen_name | $user_id, ][ %args ])" Aliases: follow, follow_new, create_friendship .PP .ie n .SS "create_list([ $name, ][ \e%args ])" .el .SS "create_list([ \f(CW$name\fP, ][ \e%args ])" .IX Subsection "create_list([ $name, ][ %args ])" .SS "create_media_metadata([ \e%args ])" .IX Subsection "create_media_metadata([ %args ])" .ie n .SS "create_mute([ $screen_name | $user_id, ][ \e%args ])" .el .SS "create_mute([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "create_mute([ $screen_name | $user_id, ][ %args ])" .PP Alias: mute .ie n .SS "create_saved_search([ $query, ][ \e%args ])" .el .SS "create_saved_search([ \f(CW$query\fP, ][ \e%args ])" .IX Subsection "create_saved_search([ $query, ][ %args ])" .SS "curate_collection([ \e%args ])" .IX Subsection "curate_collection([ %args ])" .SS "delete_list([ \e%args ])" .IX Subsection "delete_list([ %args ])" .SS "delete_list_member([ \e%args ])" .IX Subsection "delete_list_member([ %args ])" .ie n .SS "destroy_block([ $screen_name | $user_id, ][ \e%args ])" .el .SS "destroy_block([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "destroy_block([ $screen_name | $user_id, ][ %args ])" .ie n .SS "destroy_collection([ $id, ][ \e%args ])" .el .SS "destroy_collection([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "destroy_collection([ $id, ][ %args ])" .ie n .SS "destroy_favorite([ $id, ][ \e%args ])" .el .SS "destroy_favorite([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "destroy_favorite([ $id, ][ %args ])" .ie n .SS "destroy_friend([ $screen_name | $user_id, ][ \e%args ])" .el .SS "destroy_friend([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "destroy_friend([ $screen_name | $user_id, ][ %args ])" Aliases: unfollow, destroy_friendship .PP .ie n .SS "destroy_mute([ $screen_name | $user_id, ][ \e%args ])" .el .SS "destroy_mute([ \f(CW$screen_name\fP | \f(CW$user_id\fP, ][ \e%args ])" .IX Subsection "destroy_mute([ $screen_name | $user_id, ][ %args ])" .PP Alias: unmute .ie n .SS "destroy_saved_search([ $id, ][ \e%args ])" .el .SS "destroy_saved_search([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "destroy_saved_search([ $id, ][ %args ])" Aliases: delete_saved_search .PP .ie n .SS "destroy_status([ $id, ][ \e%args ])" .el .SS "destroy_status([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "destroy_status([ $id, ][ %args ])" .SS "members_create_all([ \e%args ])" .IX Subsection "members_create_all([ %args ])" Aliases: add_list_members .PP .SS "members_destroy_all([ \e%args ])" .IX Subsection "members_destroy_all([ %args ])" Aliases: remove_list_members .PP .ie n .SS "move_collection_entry([ $id, [ $tweet_id, [ $relative_to, ]]][ \e%args ])" .el .SS "move_collection_entry([ \f(CW$id\fP, [ \f(CW$tweet_id\fP, [ \f(CW$relative_to\fP, ]]][ \e%args ])" .IX Subsection "move_collection_entry([ $id, [ $tweet_id, [ $relative_to, ]]][ %args ])" .ie n .SS "remove_collection_entry([ $id, [ $tweet_id, ]][ \e%args ])" .el .SS "remove_collection_entry([ \f(CW$id\fP, [ \f(CW$tweet_id\fP, ]][ \e%args ])" .IX Subsection "remove_collection_entry([ $id, [ $tweet_id, ]][ %args ])" .SS "remove_profile_banner([ \e%args ])" .IX Subsection "remove_profile_banner([ %args ])" .SS "report_spam([ \e%args ])" .IX Subsection "report_spam([ %args ])" .ie n .SS "retweet([ $id, ][ \e%args ])" .el .SS "retweet([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "retweet([ $id, ][ %args ])" .SS "subscribe_list([ \e%args ])" .IX Subsection "subscribe_list([ %args ])" .ie n .SS "unretweet([ $id, ][ \e%args ])" .el .SS "unretweet([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "unretweet([ $id, ][ %args ])" .SS "unsubscribe_list([ \e%args ])" .IX Subsection "unsubscribe_list([ %args ])" .ie n .SS "update([ $status, ][ \e%args ])" .el .SS "update([ \f(CW$status\fP, ][ \e%args ])" .IX Subsection "update([ $status, ][ %args ])" .SS "update_account_settings([ \e%args ])" .IX Subsection "update_account_settings([ %args ])" .ie n .SS "update_collection([ $id, ][ \e%args ])" .el .SS "update_collection([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "update_collection([ $id, ][ %args ])" .SS "update_friendship([ \e%args ])" .IX Subsection "update_friendship([ %args ])" .SS "update_list([ \e%args ])" .IX Subsection "update_list([ %args ])" .SS "update_profile([ \e%args ])" .IX Subsection "update_profile([ %args ])" .SS "update_profile_background_image([ \e%args ])" .IX Subsection "update_profile_background_image([ %args ])" .ie n .SS "update_profile_banner([ $banner, ][ \e%args ])" .el .SS "update_profile_banner([ \f(CW$banner\fP, ][ \e%args ])" .IX Subsection "update_profile_banner([ $banner, ][ %args ])" .ie n .SS "update_profile_image([ $image, ][ \e%args ])" .el .SS "update_profile_image([ \f(CW$image\fP, ][ \e%args ])" .IX Subsection "update_profile_image([ $image, ][ %args ])" .ie n .SS "upload_media([ $media, ][ \e%args ])" .el .SS "upload_media([ \f(CW$media\fP, ][ \e%args ])" .IX Subsection "upload_media([ $media, ][ %args ])" Aliases: upload .PP .SS "direct_messages_events([ \e%args ])" .IX Subsection "direct_messages_events([ %args ])" .ie n .SS "show_direct_messages_event([ $id, ][ \e%args ])" .el .SS "show_direct_messages_event([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "show_direct_messages_event([ $id, ][ %args ])" .ie n .SS "destroy_direct_messages_event([ $id, ][ \e%args ])" .el .SS "destroy_direct_messages_event([ \f(CW$id\fP, ][ \e%args ])" .IX Subsection "destroy_direct_messages_event([ $id, ][ %args ])" .ie n .SS "new_direct_messages_event([$text, $recipient_id ] | [ \e%event ], [ \e%args ])" .el .SS "new_direct_messages_event([$text, \f(CW$recipient_id\fP ] | [ \e%event ], [ \e%args ])" .IX Subsection "new_direct_messages_event([$text, $recipient_id ] | [ %event ], [ %args ])" For simple usage, pass text and recipient \s-1ID:\s0 .PP .Vb 1 \& $client\->new_dirrect_messages_event($text, $recipient_id) .Ve .PP For more complex messages, pass a full event structure, for example: .PP .Vb 10 \& $client\->new_direct_massages_event({ \& type => \*(Aqmessage_create\*(Aq, \& message_create => { \& target => { recipient_id => $user_id }, \& message_data => { \& text => $text, \& attachment => { \& type => \*(Aqmedia\*(Aq, \& media => { id => $media\->{id} }, \& }, \& }, \& }, \& }) .Ve .PP .SS "invalidate_access_token([ \e%args ])" .IX Subsection "invalidate_access_token([ %args ])" Calling this method has the same effect as a user revoking access to the application via Twitter settings. The access token/secret pair will no longer be valid. .PP This method can be called with client that has been initialized with \&\f(CW\*(C`access_token\*(C'\fR and \f(CW\*(C`access_token_secret\*(C'\fR attributes, by passing \f(CW\*(C`\-token\*(C'\fR and \&\f(CW\*(C`\-token_secret\*(C'\fR parameters, or by passing \f(CW\*(C`access_token\*(C'\fR and \&\f(CW\*(C`access_token_secret\*(C'\fR parameters. .PP .Vb 6 \& $client\->invalidate_access_token; \& $client\->invalidate_access_token({ \-token => $token, \-token_secret => $secret }); \& $client\->invalidate_access_token({ \& access_token => $token, \& access_token_secret => $secret, \& }); .Ve .PP Twitter added this method to the \s-1API\s0 on 2018\-09\-20. .PP See .SH "AUTHOR" .IX Header "AUTHOR" Marc Mims .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2015\-2018 by Marc Mims. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.