Common Lisp から Twitter 操作 cl-twitter
もう少し使い方がわかってきたので紹介。
cl-twitterはいろんな関数が用意されているけど、裏では twitter-op メソッドに集約されている。
オプションの一覧は command-help で確認可能
(command-help)
Twitter API Commands (command-help command-name) provides help:
:USERS/SHOW -> TWITTER-USER
Returns a single-status specified by the id parameter
:USERS/LOOKUP -> (TWITTER-USER)
Return up to 100 users worth of extended information, specified by either ID, screen name, or combination of the two.
:USERS/SEARCH -> (TWITTER-USER)
Runs a search for users similar to Find People button on Twitter.com.
:USERS/SUGGESTIONS -> (IDENTITY)
Access to Twitter's suggested user list. This returns the list of suggested user categories.
:USERS/SUGGESTIONS/?SLUG -> (IDENTITY)
Access the users in a given category of the Twitter suggested user list.
・
・
・
こんな感じで一覧を確認できる。更に詳細なオプションについては command-help の引数で与えて確認可能。
(command-help :FRIENDSHIPS/CREATE) FRIENDSHIPS/CREATE Allows the authenticating users to follow the user specified in the ID parameter. Arguments: USER_ID: The ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name. SCREEN_NAME: The screen name of the user for whom to return results for. Helpful for disambiguating when a valid screen name is also a user ID. FOLLOW: Enable notifications for the target user. INCLUDE_ENTITIES: When set to either true, t or 1, each tweet will include a node called entities
これを直接使えば、APIの呼び出し回数を抑えてコーディングできそう。
0 件のコメント:
コメントを投稿