Twitter API私的覚書[技術系日記]
APIが返す型でよく使いそうな型・プロパティ
user関連
user.name- 表示名
user.screen_nameuser.id- 内部のintのprimary keyなんだと思う。
- identifyに使うのかしら。
user.profile_image_url_https- アイコンURL
- HTTPS
- UI作っていく上でアイコン見えるとテンションあがるので大事
user.profile_image_urlアイコンURL HTTP- アイコンURL
- HTTP
- 使わないんじゃないかな……
user.location- 所在地
user.description- いわゆるbio
user.utc_offset- タイムゾーンの時差?
- 詳細不明
- 調べる!
- ここで調べたら以下のページが
- Object: Users - API Overview
- そりゃそうだ
- 公式でまとまってないわけがないな?
- お疲れ様でした
一応つづく。書いて覚える。
tweet関連
tweet.contributors- beta
tweet.created_at- 読んで字の如し
- utc
tweet.favorite_counttweet.retweet_counttweet.id- 読んで字の如し
tweet.favoritedtweet.retweeted- 認証しているユーザーからみてfav/RTしたか
tweet.in_reply_to_screen_nametweet.in_reply_to_status_idtweet.in_reply_to_user_id- リプライ系
tweet.possibly_sensitive- 不適切なコンテンツを含む可能性があるかどうか
tweet.scopes- たぶん広告消せる
tweet.sourcevia Twitter web的なやつのanchorタグ
tweet.text- 本文
tweet.entities- parse結果
- 次回へ続く
ちょっと不安
tweet.retweeted_status
Users can amplify the broadcast of tweets authored by other users by retweeting. Retweets can be distinguished from typical Tweets by the existence of a retweeted_status attribute. This attribute contains a representation of the original Tweet that was retweeted. Note that retweets of retweets do not show representations of the intermediary retweet, but only the original tweet. (Users can also unretweet a retweet they created by deleting their retweet.)
英単語
- amplify
「増幅する」って感じっぽい。出力アンプとかのアンプと関係あるのかしら。
ここではツイートを「拡散する」って感じかしら。
解釈
普通のツイートとRTは違う。
RTはこのretweeted_status属性をもつ。
ビビってたからちょっと腰引けてたけど単純にRT元のツイートが入ってるだけっぽい
Statusという単語に惑わされたっぽい。
poi