カメニッキ

カメとインコと釣りの人です

Ruby Gems Twitter 5.5.1のREST::Clientが持つメソッド一覧

自分用メモを兼ねて。

以下はいずれもconfig済みのclientオブジェクトに対して呼び出す。

例:

client = Twitter::REST::Client.new do |config|

  config.consumer_key        = consumer_key

  config.consumer_secret     = consumer_secret 

  config.access_token        = oauth_token

  config.access_token_secret = oauth_token_secret 

end

client.block(userid) 

一部抜粋です。誤りがあるかもしれません。詳細は公式Docを見てください。

Class: Twitter::REST::Client — Documentation for twitter (5.5.1)

Methods included from API::Users

#block

概要:指定したユーザをブロック

引数:ユーザID or スクリーンネーム

戻り値:ブロックしたユーザのUserオブジェクト

#block?

概要:自身が指定したユーザをブロックしているか判定

引数:ユーザID or スクリーンネーム

戻り値:Boolean

#blocked_ids

#blocking

概要:自身がブロックしているユーザ一覧を取得

引数:?

戻り値:Array<Twitter:User>

#contributees

#contributors

#profile_banner

概要:指定したユーザのバナーを取得

引数:ユーザID or スクリーンネーム

戻り値:Twitter:ProfileBanner

#remove_profile_banner

概要:自身のユーザバナーを削除

引数:?

戻り値:nil

#settings

概要:自身の設定を更新

引数:公式Doc参照(Method: Twitter::REST::API::Users#settings — Documentation for twitter (5.5.1))

戻り値:Twitter:Settings

#unblock

概要:指定したユーザのブロックを解除

引数:ユーザID or スクリーンネーム

戻り値:Twitter:User

#update_delivery_device

#update_profile

#update_profile_background_image

#update_profile_banner

#update_profile_colors

#update_profile_image

メソッド名みたまんまなので割愛

#user

概要:指定したユーザのユーザ情報を取得、引数無しの場合自身を取得

引数:ユーザID or スクリーンネーム

戻り値:Twitter:User

#user?

概要:指定したユーザが存在するか判定

引数:ユーザID or スクリーンネーム

戻り値:Boolean

#user_search

概要:指定した条件でユーザを検索

引数:公式Doc参照(Method: Twitter::REST::API::Users#user_search — Documentation for twitter (5.5.1))

戻り値:Array<Twitter:User>

#users

#verify_credentials

概要:clientオブジェクトが認証済みか判定

引数:?

戻り値:?

Methods included from API::Undocumented

#following_followers_of

#tweet_count

Methods included from API::Tweets

#destroy_status#oembed#oembeds#retweet#retweet!#retweeters_ids#retweeters_of#retweets#status#statuses#update,#update_with_media

Methods included from API::Trends

#trends#trends_available#trends_closest

Methods included from API::Timelines

#home_timeline#mentions_timeline#retweeted_by_me#retweeted_by_user#retweeted_to_me#retweets_of_me#user_timeline

Methods included from API::SuggestedUsers

#suggest_users#suggestions

Methods included from API::SpamReporting

#report_spam

Methods included from API::Search

#search

Methods included from API::SavedSearches

#create_saved_search#destroy_saved_search#saved_search#saved_searches

Methods included from API::PlacesAndGeo

#geo_search#place#reverse_geocode#similar_places

Methods included from API::OAuth

#invalidate_token#reverse_token#token

Methods included from API::Lists

#add_list_member#add_list_members#create_list#destroy_list#list#list_member?#list_members#list_subscribe#list_subscriber?#list_subscribers,#list_timeline#list_unsubscribe#list_update#lists#memberships#owned_lists#remove_list_member#remove_list_members#subscriptions

Methods included from API::Help

#configuration#languages#privacy#tos

Methods included from API::FriendsAndFollowers

#follow#follow!#follower_ids#followers#friend_ids#friends#friendship#friendship?#friendship_update#friendships#friendships_incoming,#friendships_outgoing#no_retweet_ids#unfollow

Methods included from API::Favorites

#favorite#favorite!#favorites#unfavorite

Methods included from API::DirectMessages

#create_direct_message#destroy_direct_message#direct_message#direct_messages#direct_messages_received#direct_messages_sent

Methods inherited from Client

#credentials#initialize#user_agent#user_token?