Skip to content

Instantly share code, notes, and snippets.

@cucmberium
Last active May 11, 2019 16:40
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cucmberium/8ca7f4a5c5ea5a8b6590 to your computer and use it in GitHub Desktop.
Save cucmberium/8ca7f4a5c5ea5a8b6590 to your computer and use it in GitHub Desktop.
Twitter poll api

twitterの投票

コード

var status = await tokens.Statuses.ShowAsync(id => 696716686381027328, include_cards => true, cards_platform => "Android-12");

https://api.twitter.com/1.1/statuses/show.json?id=696716686381027328&include_cards=true&cards_platform=Android-12

Twitter for AndroidのCK/CS

レスポンス

{
    "card": {
        "binding_values": {
            "api": {
                "string_value": "capi://passthrough/1", 
                "type": "STRING"
            }, 
            "card_url": {
                "scribe_key": "card_url", 
                "string_value": "https://twitter.com", 
                "type": "STRING"
            }, 
            "choice1_count": {
                "string_value": "0", 
                "type": "STRING"
            }, 
            "choice1_label": {
                "string_value": "mおういっかいてすと", 
                "type": "STRING"
            }, 
            "choice2_count": {
                "string_value": "0", 
                "type": "STRING"
            }, 
            "choice2_label": {
                "string_value": "mおういっかいてすと1", 
                "type": "STRING"
            }, 
            "counts_are_final": {
                "boolean_value": false, 
                "type": "BOOLEAN"
            }, 
            "duration_minutes": {
                "string_value": "1440", 
                "type": "STRING"
            }, 
            "end_datetime_utc": {
                "string_value": "2016-02-09T15:26:16Z", 
                "type": "STRING"
            }, 
            "last_updated_datetime_utc": {
                "string_value": "2016-02-08T15:26:35Z", 
                "type": "STRING"
            }
        }, 
        "card_platform": {
            "platform": {
                "audience": {
                    "bucket": null, 
                    "name": "production"
                }, 
                "device": {
                    "name": "Android", 
                    "version": "12"
                }
            }
        }, 
        "card_type_url": "http://card-type-url-is-deprecated.invalid", 
        "name": "poll2choice_text_only", 
        "url": "card://696716685647020032"
    }, 
    "contributors": null, 
    "coordinates": null, 
    "created_at": "Mon Feb 08 15:26:17 +0000 2016", 
    "entities": {
        "hashtags": [], 
        "symbols": [], 
        "urls": [], 
        "user_mentions": []
    }, 
    "favorite_count": 0, 
    "favorited": false, 
    "geo": null, 
    "id": 696716686381027328, 
    "id_str": "696716686381027328", 
    "in_reply_to_screen_name": null, 
    "in_reply_to_status_id": null, 
    "in_reply_to_status_id_str": null, 
    "in_reply_to_user_id": null, 
    "in_reply_to_user_id_str": null, 
    "is_quote_status": false, 
    "lang": "ja", 
    "place": null, 
    "retweet_count": 0, 
    "retweeted": false, 
    "source": "<a href="http://twitter.com" rel="nofollow">Twitter Web Client</a>", 
    "supplemental_language": null, 
    "text": "tえすと", 
    "truncated": false, 
    "user": {
        "can_media_tag": true, 
        "contributors_enabled": false, 
        "created_at": "Mon Oct 18 11:22:06 +0000 2010", 
        "default_profile": true, 
        "default_profile_image": false, 
        "description": "きゅうりうむのサブ垢。
まずはメイン垢をどうにかしてください。

こちらに関してはフォローしなくていいです", 
        "entities": {
            "description": {
                "urls": []
            }, 
            "url": {
                "urls": [
                    {
                        "display_url": "twitter.com/#!/cucmberium", 
                        "expanded_url": "http://twitter.com/#!/cucmberium", 
                        "indices": [
                            0, 
                            22
                        ], 
                        "url": "http://t.co/fdoKoVZ6SL"
                    }
                ]
            }
        }, 
        "fast_followers_count": 0, 
        "favourites_count": 283, 
        "follow_request_sent": false, 
        "followed_by": true, 
        "followers_count": 3, 
        "following": true, 
        "friends_count": 3, 
        "geo_enabled": false, 
        "has_custom_timelines": false, 
        "has_extended_profile": false, 
        "id": 204291126, 
        "id_str": "204291126", 
        "is_translation_enabled": false, 
        "is_translator": false, 
        "lang": "en", 
        "listed_count": 0, 
        "location": "新潟幻想郷", 
        "media_count": 26, 
        "name": "きゅうりうむ〄爆撃専用垢", 
        "normal_followers_count": 3, 
        "notifications": false, 
        "pinned_tweet_ids": [], 
        "profile_background_color": "C0DEED", 
        "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", 
        "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", 
        "profile_background_tile": false, 
        "profile_image_url": "http://pbs.twimg.com/profile_images/1629121057/73b29b350b3f93c300ce9b9d523603bb6ebcef1c_full_normal.jpg", 
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/1629121057/73b29b350b3f93c300ce9b9d523603bb6ebcef1c_full_normal.jpg", 
        "profile_link_color": "0084B4", 
        "profile_sidebar_border_color": "C0DEED", 
        "profile_sidebar_fill_color": "DDEEF6", 
        "profile_text_color": "333333", 
        "profile_use_background_image": true, 
        "protected": false, 
        "screen_name": "cucmberium_sub", 
        "statuses_count": 438, 
        "time_zone": "Hawaii", 
        "url": "http://t.co/fdoKoVZ6SL", 
        "utc_offset": -36000, 
        "verified": false
    }
}
@pvsousalima
Copy link

is that a pool fetching method or just a result of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment