syuilo / Twitch2

Twitch2 is a .NET Twitter library
5 stars 1 forks source link

UserStreamで処理されないイベントがある #7

Open marihachi opened 9 years ago

marihachi commented 9 years ago

RTをRTした際には

RTをFavした際には

が送られてくるようです。

syuilo commented 9 years ago

Thanks for reporting!

syuilo commented 9 years ago

でもこの中に無いな https://dev.twitter.com/streaming/overview/messages-types#Events_event

syuilo commented 9 years ago

送られてくるデータの情報求む。 イベントハンドラは作ったけどどういう形式でretweetdとかretweeted_retweetとかfavorited_retweetが送られてくるのかが分からないからパース出来ない

marihachi commented 9 years ago

favorited_retweetのサンプルです 整形する際にエスケープ関係で少々変更されましたがこんな感じです

{
    "created_at": "Sat May 30 02:57:32 +0000 2015", 
    "event": "favorited_retweet", 
    "source": {
        "contributors_enabled": false, 
        "created_at": "Tue Nov 02 11:06:03 +0000 2010", 
        "default_profile": false, 
        "default_profile_image": false, 
        "description": "しがないC#er。icon/header自作 /プログラミング(C++,C#,VB,PHP,JS,Java)/Webデザイン/アニメ(ごちうさ,変猫,きんモザ)/声優(内田真礼,小倉唯,田村ゆかり)/東方/ http://twpf.jp/_mrhc", 
        "favourites_count": 112634, 
        "follow_request_sent": null, 
        "followers_count": 12036, 
        "following": null, 
        "friends_count": 2198, 
        "geo_enabled": false, 
        "id": 211116192, 
        "id_str": "211116192", 
        "is_translation_enabled": true, 
        "is_translator": false, 
        "lang": "ja", 
        "listed_count": 642, 
        "location": "SkyFlip代表/P教/ごちうさ同盟", 
        "name": "まりはち・マーガトロイド@6/20生誕", 
        "notifications": null, 
        "profile_background_color": "C0DEED", 
        "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/577826987420491776/OtQj3kP2.png", 
        "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/577826987420491776/OtQj3kP2.png", 
        "profile_background_tile": false, 
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/211116192/1432309550", 
        "profile_image_url": "http://pbs.twimg.com/profile_images/601775976637288451/xZUMWhnH_normal.png", 
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/601775976637288451/xZUMWhnH_normal.png", 
        "profile_link_color": "FF8800", 
        "profile_sidebar_border_color": "000000", 
        "profile_sidebar_fill_color": "EFEFEF", 
        "profile_text_color": "333333", 
        "profile_use_background_image": true, 
        "protected": false, 
        "screen_name": "_mrhc", 
        "statuses_count": 85206, 
        "time_zone": "Osaka", 
        "url": "http://marihachi.hol.es/", 
        "utc_offset": 32400, 
        "verified": false
    }, 
    "target": {
        "contributors_enabled": false, 
        "created_at": "Thu Nov 01 09:51:52 +0000 2012", 
        "default_profile": false, 
        "default_profile_image": false, 
        "description": "寺社 東方 艦これ", 
        "favourites_count": 41267, 
        "follow_request_sent": null, 
        "followers_count": 3509, 
        "following": null, 
        "friends_count": 3371, 
        "geo_enabled": true, 
        "id": 918657764, 
        "id_str": "918657764", 
        "is_translation_enabled": true, 
        "is_translator": false, 
        "lang": "ja", 
        "listed_count": 123, 
        "location": null, 
        "name": "霊峨@すめらぎいやさか", 
        "notifications": null, 
        "profile_background_color": "131516", 
        "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/746971073/1f78932807b1ea6999dc82bc8101c18c.jpeg", 
        "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/746971073/1f78932807b1ea6999dc82bc8101c18c.jpeg", 
        "profile_background_tile": true, 
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/918657764/1432019823", 
        "profile_image_url": "http://pbs.twimg.com/profile_images/570718395425030145/UQveh_Hc_normal.jpeg", 
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/570718395425030145/UQveh_Hc_normal.jpeg", 
        "profile_link_color": "009999", 
        "profile_sidebar_border_color": "000000", 
        "profile_sidebar_fill_color": "DDEEF6", 
        "profile_text_color": "333333", 
        "profile_use_background_image": true, 
        "protected": false, 
        "screen_name": "reiga344", 
        "statuses_count": 104438, 
        "time_zone": "Irkutsk", 
        "url": null, 
        "utc_offset": 32400, 
        "verified": false
    }, 
    "target_object": {
        "contributors": null, 
        "coordinates": null, 
        "created_at": "Sat May 30 02:53:10 +0000 2015", 
        "entities": {
            "hashtags": [], 
            "media": [
                {
                    "display_url": "pic.twitter.com/iw7tqYNRvs", 
                    "expanded_url": "http://twitter.com/arai_harumaki/status/580662718883098624/photo/1", 
                    "id": 580662717922426880, 
                    "id_str": "580662717922426880", 
                    "indices": [
                        56, 
                        78
                    ], 
                    "media_url": "http://pbs.twimg.com/media/CA7tqlwUQAASmiP.jpg", 
                    "media_url_https": "https://pbs.twimg.com/media/CA7tqlwUQAASmiP.jpg", 
                    "sizes": {
                        "large": {
                            "h": 1000, 
                            "resize": "fit", 
                            "w": 707
                        }, 
                        "medium": {
                            "h": 848, 
                            "resize": "fit", 
                            "w": 600
                        }, 
                        "small": {
                            "h": 480, 
                            "resize": "fit", 
                            "w": 340
                        }, 
                        "thumb": {
                            "h": 150, 
                            "resize": "crop", 
                            "w": 150
                        }
                    }, 
                    "source_status_id": 580662718883098624, 
                    "source_status_id_str": "580662718883098624", 
                    "source_user_id": 159063679, 
                    "source_user_id_str": "159063679", 
                    "type": "photo", 
                    "url": "http://t.co/iw7tqYNRvs"
                }
            ], 
            "symbols": [], 
            "urls": [], 
            "user_mentions": [
                {
                    "id": 159063679, 
                    "id_str": "159063679", 
                    "indices": [
                        3, 
                        17
                    ], 
                    "name": "新井春巻(あらいはるまき)", 
                    "screen_name": "arai_harumaki"
                }
            ]
        }, 
        "extended_entities": {
            "media": [
                {
                    "display_url": "pic.twitter.com/iw7tqYNRvs", 
                    "expanded_url": "http://twitter.com/arai_harumaki/status/580662718883098624/photo/1", 
                    "id": 580662717922426880, 
                    "id_str": "580662717922426880", 
                    "indices": [
                        56, 
                        78
                    ], 
                    "media_url": "http://pbs.twimg.com/media/CA7tqlwUQAASmiP.jpg", 
                    "media_url_https": "https://pbs.twimg.com/media/CA7tqlwUQAASmiP.jpg", 
                    "sizes": {
                        "large": {
                            "h": 1000, 
                            "resize": "fit", 
                            "w": 707
                        }, 
                        "medium": {
                            "h": 848, 
                            "resize": "fit", 
                            "w": 600
                        }, 
                        "small": {
                            "h": 480, 
                            "resize": "fit", 
                            "w": 340
                        }, 
                        "thumb": {
                            "h": 150, 
                            "resize": "crop", 
                            "w": 150
                        }
                    }, 
                    "source_status_id": 580662718883098624, 
                    "source_status_id_str": "580662718883098624", 
                    "source_user_id": 159063679, 
                    "source_user_id_str": "159063679", 
                    "type": "photo", 
                    "url": "http://t.co/iw7tqYNRvs"
                }
            ]
        }, 
        "favorite_count": 0, 
        "favorited": false, 
        "geo": null, 
        "id": 604480643003609088, 
        "id_str": "604480643003609088", 
        "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, 
        "possibly_sensitive": false, 
        "retweet_count": 0, 
        "retweeted": false, 
        "source": "<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>", 
        "text": "RT @arai_harumaki: 1年前の絵。艦これも3月に初めたんだけど、クソ提督もすでに誕生していた。 http://t.co/iw7tqYNRvs", 
        "truncated": false, 
        "user": {
            "contributors_enabled": false, 
            "created_at": "Thu Nov 01 09:51:52 +0000 2012", 
            "default_profile": false, 
            "default_profile_image": false, 
            "description": "寺社 東方 艦これ", 
            "favourites_count": 41267, 
            "follow_request_sent": null, 
            "followers_count": 3509, 
            "following": null, 
            "friends_count": 3371, 
            "geo_enabled": true, 
            "id": 918657764, 
            "id_str": "918657764", 
            "is_translation_enabled": true, 
            "is_translator": false, 
            "lang": "ja", 
            "listed_count": 123, 
            "location": null, 
            "name": "霊峨@すめらぎいやさか", 
            "notifications": null, 
            "profile_background_color": "131516", 
            "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/746971073/1f78932807b1ea6999dc82bc8101c18c.jpeg", 
            "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/746971073/1f78932807b1ea6999dc82bc8101c18c.jpeg", 
            "profile_background_tile": true, 
            "profile_banner_url": "https://pbs.twimg.com/profile_banners/918657764/1432019823", 
            "profile_image_url": "http://pbs.twimg.com/profile_images/570718395425030145/UQveh_Hc_normal.jpeg", 
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/570718395425030145/UQveh_Hc_normal.jpeg", 
            "profile_link_color": "009999", 
            "profile_sidebar_border_color": "000000", 
            "profile_sidebar_fill_color": "DDEEF6", 
            "profile_text_color": "333333", 
            "profile_use_background_image": true, 
            "protected": false, 
            "screen_name": "reiga344", 
            "statuses_count": 104438, 
            "time_zone": "Irkutsk", 
            "url": null, 
            "utc_offset": 32400, 
            "verified": false
        }
    }
}
syuilo commented 9 years ago

Thank uuuu!

marihachi commented 9 years ago

こっちは retweeted_retweetのサンプル

{
    "created_at": "Sat May 30 03:38:14 +0000 2015", 
    "event": "retweeted_retweet", 
    "source": {
        "contributors_enabled": false, 
        "created_at": "Tue Nov 02 11:06:03 +0000 2010", 
        "default_profile": false, 
        "default_profile_image": false, 
        "description": "しがないC#er。icon/header自作 /プログラミング(C++,C#,VB,PHP,JS,Java)/Webデザイン/アニメ(ごちうさ,変猫,きんモザ)/声優(内田真礼,小倉唯,田村ゆかり)/東方/ http://twpf.jp/_mrhc", 
        "favourites_count": 112637, 
        "follow_request_sent": null, 
        "followers_count": 12037, 
        "following": null, 
        "friends_count": 2198, 
        "geo_enabled": false, 
        "id": 211116192, 
        "id_str": "211116192", 
        "is_translation_enabled": true, 
        "is_translator": false, 
        "lang": "ja", 
        "listed_count": 642, 
        "location": "SkyFlip代表/P教/ごちうさ同盟", 
        "name": "まりはち・マーガトロイド@6/20生誕", 
        "notifications": null, 
        "profile_background_color": "C0DEED", 
        "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/577826987420491776/OtQj3kP2.png", 
        "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/577826987420491776/OtQj3kP2.png", 
        "profile_background_tile": false, 
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/211116192/1432309550", 
        "profile_image_url": "http://pbs.twimg.com/profile_images/601775976637288451/xZUMWhnH_normal.png", 
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/601775976637288451/xZUMWhnH_normal.png", 
        "profile_link_color": "FF8800", 
        "profile_sidebar_border_color": "000000", 
        "profile_sidebar_fill_color": "EFEFEF", 
        "profile_text_color": "333333", 
        "profile_use_background_image": true, 
        "protected": false, 
        "screen_name": "_mrhc", 
        "statuses_count": 85209, 
        "time_zone": "Osaka", 
        "url": "http://marihachi.hol.es/", 
        "utc_offset": 32400, 
        "verified": false
    }, 
    "target": {
        "contributors_enabled": false, 
        "created_at": "Fri Nov 22 11:15:01 +0000 2013", 
        "default_profile": false, 
        "default_profile_image": false, 
        "description": "リゼ/海未/凛/スクフェス/琴吹ヒカリ/玖音彩乃/花咲ののか/椎葉紬/神鳳杏 ブログ始めました→ http://kounotori287fa01.blog.fc2.com", 
        "favourites_count": 21606, 
        "follow_request_sent": null, 
        "followers_count": 2533, 
        "following": null, 
        "friends_count": 2456, 
        "geo_enabled": true, 
        "id": 2208807583, 
        "id_str": "2208807583", 
        "is_translation_enabled": false, 
        "is_translator": false, 
        "lang": "ja", 
        "listed_count": 71, 
        "location": "車内", 
        "name": "武州路快速", 
        "notifications": null, 
        "profile_background_color": "FFA500", 
        "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/378800000175169890/bflzbjNV.jpeg", 
        "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/378800000175169890/bflzbjNV.jpeg", 
        "profile_background_tile": true, 
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/2208807583/1432172771", 
        "profile_image_url": "http://pbs.twimg.com/profile_images/600528351330086915/OxaD57YV_normal.jpg", 
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/600528351330086915/OxaD57YV_normal.jpg", 
        "profile_link_color": "0F6CC3", 
        "profile_sidebar_border_color": "000000", 
        "profile_sidebar_fill_color": "DDEEF6", 
        "profile_text_color": "333333", 
        "profile_use_background_image": true, 
        "protected": false, 
        "screen_name": "bushuji_rapidFA", 
        "statuses_count": 40360, 
        "time_zone": "Tokyo", 
        "url": "http://twpf.jp/bushuji_rapidFA", 
        "utc_offset": 32400, 
        "verified": false
    }, 
    "target_object": {
        "contributors": null, 
        "coordinates": null, 
        "created_at": "Sat May 30 03:35:53 +0000 2015", 
        "entities": {
            "hashtags": [], 
            "media": [
                {
                    "display_url": "pic.twitter.com/0CxZSWN90c", 
                    "expanded_url": "http://twitter.com/soruja1/status/604490583441154048/photo/1", 
                    "id": 604490583235624960, 
                    "id_str": "604490583235624960", 
                    "indices": [
                        28, 
                        50
                    ], 
                    "media_url": "http://pbs.twimg.com/media/CGOU-5PUAAAXW1w.png", 
                    "media_url_https": "https://pbs.twimg.com/media/CGOU-5PUAAAXW1w.png", 
                    "sizes": {
                        "large": {
                            "h": 336, 
                            "resize": "fit", 
                            "w": 599
                        }, 
                        "medium": {
                            "h": 336, 
                            "resize": "fit", 
                            "w": 600
                        }, 
                        "small": {
                            "h": 190, 
                            "resize": "fit", 
                            "w": 340
                        }, 
                        "thumb": {
                            "h": 150, 
                            "resize": "crop", 
                            "w": 150
                        }
                    }, 
                    "source_status_id": 604490583441154048, 
                    "source_status_id_str": "604490583441154048", 
                    "source_user_id": 282067252, 
                    "source_user_id_str": "282067252", 
                    "type": "photo", 
                    "url": "http://t.co/0CxZSWN90c"
                }
            ], 
            "symbols": [], 
            "urls": [], 
            "user_mentions": [
                {
                    "id": 282067252, 
                    "id_str": "282067252", 
                    "indices": [
                        3, 
                        11
                    ], 
                    "name": "そるじゃー", 
                    "screen_name": "soruja1"
                }
            ]
        }, 
        "extended_entities": {
            "media": [
                {
                    "display_url": "pic.twitter.com/0CxZSWN90c", 
                    "expanded_url": "http://twitter.com/soruja1/status/604490583441154048/photo/1", 
                    "id": 604490583235624960, 
                    "id_str": "604490583235624960", 
                    "indices": [
                        28, 
                        50
                    ], 
                    "media_url": "http://pbs.twimg.com/media/CGOU-5PUAAAXW1w.png", 
                    "media_url_https": "https://pbs.twimg.com/media/CGOU-5PUAAAXW1w.png", 
                    "sizes": {
                        "large": {
                            "h": 336, 
                            "resize": "fit", 
                            "w": 599
                        }, 
                        "medium": {
                            "h": 336, 
                            "resize": "fit", 
                            "w": 600
                        }, 
                        "small": {
                            "h": 190, 
                            "resize": "fit", 
                            "w": 340
                        }, 
                        "thumb": {
                            "h": 150, 
                            "resize": "crop", 
                            "w": 150
                        }
                    }, 
                    "source_status_id": 604490583441154048, 
                    "source_status_id_str": "604490583441154048", 
                    "source_user_id": 282067252, 
                    "source_user_id_str": "282067252", 
                    "type": "photo", 
                    "url": "http://t.co/0CxZSWN90c"
                }
            ]
        }, 
        "favorite_count": 0, 
        "favorited": false, 
        "geo": null, 
        "id": 604491393357234177, 
        "id_str": "604491393357234177", 
        "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, 
        "possibly_sensitive": false, 
        "retweet_count": 0, 
        "retweeted": false, 
        "source": "<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>", 
        "text": "RT @soruja1: これが国会議員なんだからなぁ http://t.co/0CxZSWN90c", 
        "truncated": false, 
        "user": {
            "contributors_enabled": false, 
            "created_at": "Fri Nov 22 11:15:01 +0000 2013", 
            "default_profile": false, 
            "default_profile_image": false, 
            "description": "リゼ/海未/凛/スクフェス/琴吹ヒカリ/玖音彩乃/花咲ののか/椎葉紬/神鳳杏 ブログ始めました→ http://kounotori287fa01.blog.fc2.com", 
            "favourites_count": 21606, 
            "follow_request_sent": null, 
            "followers_count": 2533, 
            "following": null, 
            "friends_count": 2456, 
            "geo_enabled": true, 
            "id": 2208807583, 
            "id_str": "2208807583", 
            "is_translation_enabled": false, 
            "is_translator": false, 
            "lang": "ja", 
            "listed_count": 71, 
            "location": "車内", 
            "name": "武州路快速", 
            "notifications": null, 
            "profile_background_color": "FFA500", 
            "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/378800000175169890/bflzbjNV.jpeg", 
            "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/378800000175169890/bflzbjNV.jpeg", 
            "profile_background_tile": true, 
            "profile_banner_url": "https://pbs.twimg.com/profile_banners/2208807583/1432172771", 
            "profile_image_url": "http://pbs.twimg.com/profile_images/600528351330086915/OxaD57YV_normal.jpg", 
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/600528351330086915/OxaD57YV_normal.jpg", 
            "profile_link_color": "0F6CC3", 
            "profile_sidebar_border_color": "000000", 
            "profile_sidebar_fill_color": "DDEEF6", 
            "profile_text_color": "333333", 
            "profile_use_background_image": true, 
            "protected": false, 
            "screen_name": "bushuji_rapidFA", 
            "statuses_count": 40360, 
            "time_zone": "Tokyo", 
            "url": "http://twpf.jp/bushuji_rapidFA", 
            "utc_offset": 32400, 
            "verified": false
        }
    }
}
syuilo commented 9 years ago

i love u

marihachi commented 9 years ago

DM関連のイベントが処理されていないことを確認しました