From 4b517de269909592b2cc34b609c04546883fce64 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sun, 16 Jul 2023 23:21:26 +0900 Subject: [PATCH] =?utf8?q?TweetDetail=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=97?= =?utf8?q?=E3=81=9F=E3=83=84=E3=82=A4=E3=83=BC=E3=83=88=E3=81=AE=E5=8F=96?= =?utf8?q?=E5=BE=97=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../Api/GraphQL/TweetDetailRequestTest.cs | 64 ++ OpenTween.Tests/OpenTween.Tests.csproj | 3 + .../Resources/Responses/TweetDetail.json | 669 +++++++++++++++++++++ OpenTween/Api/GraphQL/TweetDetailRequest.cs | 80 +++ OpenTween/Resources/ChangeLog.txt | 1 + OpenTween/Twitter.cs | 17 +- 6 files changed, 832 insertions(+), 2 deletions(-) create mode 100644 OpenTween.Tests/Api/GraphQL/TweetDetailRequestTest.cs create mode 100644 OpenTween.Tests/Resources/Responses/TweetDetail.json create mode 100644 OpenTween/Api/GraphQL/TweetDetailRequest.cs diff --git a/OpenTween.Tests/Api/GraphQL/TweetDetailRequestTest.cs b/OpenTween.Tests/Api/GraphQL/TweetDetailRequestTest.cs new file mode 100644 index 00000000..0045f4e4 --- /dev/null +++ b/OpenTween.Tests/Api/GraphQL/TweetDetailRequestTest.cs @@ -0,0 +1,64 @@ +// OpenTween - Client of Twitter +// Copyright (c) 2023 kim_upsilon (@kim_upsilon) +// All rights reserved. +// +// This file is part of OpenTween. +// +// This program is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3 of the License, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program. If not, see , or write to +// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, +// Boston, MA 02110-1301, USA. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Moq; +using OpenTween.Api.TwitterV2; +using OpenTween.Connection; +using Xunit; + +namespace OpenTween.Api.GraphQL +{ + public class TweetDetailRequestTest + { + [Fact] + public async Task Send_Test() + { + using var responseStream = File.OpenRead("Resources/Responses/TweetDetail.json"); + + var mock = new Mock(); + mock.Setup(x => + x.GetStreamAsync(It.IsAny(), It.IsAny>()) + ) + .Callback>((url, param) => + { + Assert.Equal(new("https://twitter.com/i/api/graphql/-Ls3CrSQNo2fRKH6i6Na1A/TweetDetail"), url); + Assert.Contains(@"""focalTweetId"":""1619433164757413894""", param["variables"]); + }) + .ReturnsAsync(responseStream); + + var request = new TweetDetailRequest + { + FocalTweetId = new("1619433164757413894"), + }; + + var tweets = await request.Send(mock.Object).ConfigureAwait(false); + Assert.Equal("1619433164757413894", tweets.Single().ToTwitterStatus().IdStr); + + mock.VerifyAll(); + } + } +} diff --git a/OpenTween.Tests/OpenTween.Tests.csproj b/OpenTween.Tests/OpenTween.Tests.csproj index 92335575..41c898ef 100644 --- a/OpenTween.Tests/OpenTween.Tests.csproj +++ b/OpenTween.Tests/OpenTween.Tests.csproj @@ -76,5 +76,8 @@ PreserveNewest + + PreserveNewest + diff --git a/OpenTween.Tests/Resources/Responses/TweetDetail.json b/OpenTween.Tests/Resources/Responses/TweetDetail.json new file mode 100644 index 00000000..ddf1fdc7 --- /dev/null +++ b/OpenTween.Tests/Resources/Responses/TweetDetail.json @@ -0,0 +1,669 @@ +{ + "data": { + "threaded_conversation_with_injections_v2": { + "instructions": [ + { + "type": "TimelineAddEntries", + "entries": [ + { + "entryId": "tweet-1619433164757413894", + "sortIndex": "7603938872097361913", + "content": { + "entryType": "TimelineTimelineItem", + "__typename": "TimelineTimelineItem", + "itemContent": { + "itemType": "TimelineTweet", + "__typename": "TimelineTweet", + "tweet_results": { + "result": { + "__typename": "Tweet", + "rest_id": "1619433164757413894", + "has_birdwatch_notes": false, + "core": { + "user_results": { + "result": { + "__typename": "User", + "id": "VXNlcjo1MTQyNDE4MDE=", + "rest_id": "514241801", + "affiliates_highlighted_label": {}, + "has_graduated_access": false, + "is_blue_verified": false, + "profile_image_shape": "Circle", + "legacy": { + "can_dm": true, + "can_media_tag": false, + "created_at": "Sun Mar 04 11:33:45 +0000 2012", + "default_profile": false, + "default_profile_image": false, + "description": "Windows 用 Twitter クライアント OpenTween のアカウントです。", + "entities": { + "description": { + "urls": [] + }, + "url": { + "urls": [ + { + "display_url": "opentween.org", + "expanded_url": "https://www.opentween.org/", + "url": "https://t.co/An6OJeC28u", + "indices": [ + 0, + 23 + ] + } + ] + } + }, + "fast_followers_count": 0, + "favourites_count": 0, + "followers_count": 302, + "friends_count": 1, + "has_custom_timelines": false, + "is_translator": false, + "listed_count": 14, + "location": "", + "media_count": 0, + "name": "OpenTween", + "normal_followers_count": 302, + "pinned_tweet_ids_str": [ + "1617124615347908609" + ], + "possibly_sensitive": false, + "profile_image_url_https": "https://pbs.twimg.com/profile_images/661168792488153088/-UAFci6G_normal.png", + "profile_interstitial_type": "", + "screen_name": "opentween", + "statuses_count": 31, + "translator_type": "none", + "url": "https://t.co/An6OJeC28u", + "verified": false, + "want_retweets": false, + "withheld_in_countries": [] + } + } + } + }, + "card": { + "rest_id": "https://t.co/TBrqEPbIpX", + "legacy": { + "binding_values": [ + { + "key": "photo_image_full_size_large", + "value": { + "image_value": { + "height": 419, + "width": 800, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=800x419" + }, + "type": "IMAGE" + } + }, + { + "key": "thumbnail_image", + "value": { + "image_value": { + "height": 200, + "width": 400, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=400x400" + }, + "type": "IMAGE" + } + }, + { + "key": "description", + "value": { + "string_value": "==== Ver 3.4.0(2023/01/29) NEW: 複数枚の画像を添付する際に画像の削除や順序の変更ができるようになりました FIX: APIアクセス方式の選択画面でのタブオーダーの誤りを修正", + "type": "STRING" + } + }, + { + "key": "domain", + "value": { + "string_value": "github.com", + "type": "STRING" + } + }, + { + "key": "thumbnail_image_large", + "value": { + "image_value": { + "height": 300, + "width": 600, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=600x600" + }, + "type": "IMAGE" + } + }, + { + "key": "summary_photo_image_small", + "value": { + "image_value": { + "height": 202, + "width": 386, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=386x202" + }, + "type": "IMAGE" + } + }, + { + "key": "thumbnail_image_original", + "value": { + "image_value": { + "height": 600, + "width": 1200, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=orig" + }, + "type": "IMAGE" + } + }, + { + "key": "site", + "value": { + "scribe_key": "publisher_id", + "type": "USER", + "user_value": { + "id_str": "13334762", + "path": [] + } + } + }, + { + "key": "photo_image_full_size_small", + "value": { + "image_value": { + "height": 202, + "width": 386, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=386x202" + }, + "type": "IMAGE" + } + }, + { + "key": "summary_photo_image_large", + "value": { + "image_value": { + "height": 419, + "width": 800, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=800x419" + }, + "type": "IMAGE" + } + }, + { + "key": "thumbnail_image_small", + "value": { + "image_value": { + "height": 72, + "width": 144, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=144x144" + }, + "type": "IMAGE" + } + }, + { + "key": "thumbnail_image_x_large", + "value": { + "image_value": { + "height": 600, + "width": 1200, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=png&name=2048x2048_2_exp" + }, + "type": "IMAGE" + } + }, + { + "key": "photo_image_full_size_original", + "value": { + "image_value": { + "height": 600, + "width": 1200, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=orig" + }, + "type": "IMAGE" + } + }, + { + "key": "photo_image_full_size_alt_text", + "value": { + "string_value": "==== Ver 3.4.0(2023/01/29) NEW: 複数枚の画像を添付する際に画像の削除や順序の変更ができるようになりました FIX: APIアクセス方式の選択画面でのタブオーダーの誤りを修正", + "type": "STRING" + } + }, + { + "key": "vanity_url", + "value": { + "scribe_key": "vanity_url", + "string_value": "github.com", + "type": "STRING" + } + }, + { + "key": "photo_image_full_size", + "value": { + "image_value": { + "height": 314, + "width": 600, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=600x314" + }, + "type": "IMAGE" + } + }, + { + "key": "summary_photo_image_alt_text", + "value": { + "string_value": "==== Ver 3.4.0(2023/01/29) NEW: 複数枚の画像を添付する際に画像の削除や順序の変更ができるようになりました FIX: APIアクセス方式の選択画面でのタブオーダーの誤りを修正", + "type": "STRING" + } + }, + { + "key": "thumbnail_image_color", + "value": { + "image_color_value": { + "palette": [ + { + "rgb": { + "blue": 255, + "green": 255, + "red": 255 + }, + "percentage": 91.54 + }, + { + "rgb": { + "blue": 1, + "green": 135, + "red": 23 + }, + "percentage": 3.12 + }, + { + "rgb": { + "blue": 105, + "green": 184, + "red": 118 + }, + "percentage": 1.56 + }, + { + "rgb": { + "blue": 40, + "green": 55, + "red": 50 + }, + "percentage": 0.99 + }, + { + "rgb": { + "blue": 152, + "green": 247, + "red": 255 + }, + "percentage": 0.37 + } + ] + }, + "type": "IMAGE_COLOR" + } + }, + { + "key": "title", + "value": { + "string_value": "Release OpenTween v3.4.0 · opentween/OpenTween", + "type": "STRING" + } + }, + { + "key": "summary_photo_image_color", + "value": { + "image_color_value": { + "palette": [ + { + "rgb": { + "blue": 255, + "green": 255, + "red": 255 + }, + "percentage": 91.54 + }, + { + "rgb": { + "blue": 1, + "green": 135, + "red": 23 + }, + "percentage": 3.12 + }, + { + "rgb": { + "blue": 105, + "green": 184, + "red": 118 + }, + "percentage": 1.56 + }, + { + "rgb": { + "blue": 40, + "green": 55, + "red": 50 + }, + "percentage": 0.99 + }, + { + "rgb": { + "blue": 152, + "green": 247, + "red": 255 + }, + "percentage": 0.37 + } + ] + }, + "type": "IMAGE_COLOR" + } + }, + { + "key": "summary_photo_image_x_large", + "value": { + "image_value": { + "height": 600, + "width": 1200, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=png&name=2048x2048_2_exp" + }, + "type": "IMAGE" + } + }, + { + "key": "summary_photo_image", + "value": { + "image_value": { + "height": 314, + "width": 600, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=600x314" + }, + "type": "IMAGE" + } + }, + { + "key": "photo_image_full_size_color", + "value": { + "image_color_value": { + "palette": [ + { + "rgb": { + "blue": 255, + "green": 255, + "red": 255 + }, + "percentage": 91.54 + }, + { + "rgb": { + "blue": 1, + "green": 135, + "red": 23 + }, + "percentage": 3.12 + }, + { + "rgb": { + "blue": 105, + "green": 184, + "red": 118 + }, + "percentage": 1.56 + }, + { + "rgb": { + "blue": 40, + "green": 55, + "red": 50 + }, + "percentage": 0.99 + }, + { + "rgb": { + "blue": 152, + "green": 247, + "red": 255 + }, + "percentage": 0.37 + } + ] + }, + "type": "IMAGE_COLOR" + } + }, + { + "key": "photo_image_full_size_x_large", + "value": { + "image_value": { + "height": 600, + "width": 1200, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=png&name=2048x2048_2_exp" + }, + "type": "IMAGE" + } + }, + { + "key": "card_url", + "value": { + "scribe_key": "card_url", + "string_value": "https://t.co/TBrqEPbIpX", + "type": "STRING" + } + }, + { + "key": "summary_photo_image_original", + "value": { + "image_value": { + "height": 600, + "width": 1200, + "url": "https://pbs.twimg.com/card_img/1680446865844879360/CxwGjrDn?format=jpg&name=orig" + }, + "type": "IMAGE" + } + } + ], + "card_platform": { + "platform": { + "audience": { + "name": "production" + }, + "device": { + "name": "Swift", + "version": "12" + } + } + }, + "name": "summary_large_image", + "url": "https://t.co/TBrqEPbIpX", + "user_refs_results": [ + { + "result": { + "__typename": "User", + "id": "VXNlcjoxMzMzNDc2Mg==", + "rest_id": "13334762", + "affiliates_highlighted_label": {}, + "has_graduated_access": true, + "is_blue_verified": true, + "profile_image_shape": "Square", + "legacy": { + "can_dm": false, + "can_media_tag": true, + "created_at": "Mon Feb 11 04:41:50 +0000 2008", + "default_profile": false, + "default_profile_image": false, + "description": "The AI-powered developer platform to build, scale, and deliver secure software.", + "entities": { + "description": { + "urls": [] + }, + "url": { + "urls": [ + { + "display_url": "github.com", + "expanded_url": "http://github.com", + "url": "https://t.co/bbJgfyzcJR", + "indices": [ + 0, + 23 + ] + } + ] + } + }, + "fast_followers_count": 0, + "favourites_count": 8064, + "followers_count": 2513216, + "friends_count": 334, + "has_custom_timelines": true, + "is_translator": false, + "listed_count": 18245, + "location": "San Francisco, CA", + "media_count": 2074, + "name": "GitHub", + "normal_followers_count": 2513216, + "pinned_tweet_ids_str": [], + "possibly_sensitive": false, + "profile_banner_url": "https://pbs.twimg.com/profile_banners/13334762/1680541755", + "profile_image_url_https": "https://pbs.twimg.com/profile_images/1633247750010830848/8zfRrYjA_normal.png", + "profile_interstitial_type": "", + "screen_name": "github", + "statuses_count": 8384, + "translator_type": "none", + "url": "https://t.co/bbJgfyzcJR", + "verified": false, + "verified_type": "Business", + "want_retweets": false, + "withheld_in_countries": [] + } + } + } + ] + } + }, + "unified_card": { + "card_fetch_state": "NoCard" + }, + "edit_control": { + "edit_tweet_ids": [ + "1619433164757413894" + ], + "editable_until_msecs": "1674939728000", + "is_edit_eligible": true, + "edits_remaining": "5" + }, + "edit_perspective": { + "favorited": false, + "retweeted": false + }, + "is_translatable": true, + "views": { + "count": "6293", + "state": "EnabledWithCount" + }, + "source": "OpenTween (dev)", + "legacy": { + "bookmark_count": 1, + "bookmarked": false, + "created_at": "Sat Jan 28 20:32:08 +0000 2023", + "conversation_id_str": "1619433164757413894", + "display_text_range": [ + 0, + 74 + ], + "entities": { + "user_mentions": [], + "urls": [ + { + "display_url": "osdn.net/projects/opent…", + "expanded_url": "https://osdn.net/projects/opentween/releases/78214", + "url": "https://t.co/7K0wP0moMw", + "indices": [ + 27, + 50 + ] + }, + { + "display_url": "github.com/opentween/Open…", + "expanded_url": "https://github.com/opentween/OpenTween/releases/tag/OpenTween_v3.4.0", + "url": "https://t.co/TBrqEPbIpX", + "indices": [ + 51, + 74 + ] + } + ], + "hashtags": [ + { + "indices": [ + 0, + 10 + ], + "text": "OpenTween" + } + ], + "symbols": [] + }, + "favorite_count": 23, + "favorited": false, + "full_text": "#OpenTween v3.4.0 リリースしました\nhttps://t.co/7K0wP0moMw\nhttps://t.co/TBrqEPbIpX", + "is_quote_status": false, + "lang": "ja", + "possibly_sensitive": false, + "possibly_sensitive_editable": true, + "quote_count": 1, + "reply_count": 0, + "retweet_count": 37, + "retweeted": false, + "user_id_str": "514241801", + "id_str": "1619433164757413894" + }, + "quick_promote_eligibility": { + "eligibility": "IneligibleNotProfessional" + } + } + }, + "tweetDisplayType": "Tweet", + "hasModeratedReplies": false + } + } + }, + { + "entryId": "tweetdetailrelatedtweets-8187333073841569170", + "sortIndex": "1", + "content": { + "entryType": "TimelineTimelineModule", + "__typename": "TimelineTimelineModule", + "items": [], + "displayType": "Vertical", + "header": { + "displayType": "Classic", + "text": "Discover more", + "socialContext": { + "type": "TimelineGeneralContext", + "contextType": "TextOnly", + "text": "Sourced from across Twitter" + }, + "sticky": true + }, + "clientEventInfo": { + "component": "related_tweet", + "details": { + "conversationDetails": { + "conversationSection": "RelatedTweet" + } + } + } + } + } + ] + }, + { + "type": "TimelineTerminateTimeline", + "direction": "Top" + } + ] + } + } +} diff --git a/OpenTween/Api/GraphQL/TweetDetailRequest.cs b/OpenTween/Api/GraphQL/TweetDetailRequest.cs new file mode 100644 index 00000000..9bd03f72 --- /dev/null +++ b/OpenTween/Api/GraphQL/TweetDetailRequest.cs @@ -0,0 +1,80 @@ +// OpenTween - Client of Twitter +// Copyright (c) 2023 kim_upsilon (@kim_upsilon) +// All rights reserved. +// +// This file is part of OpenTween. +// +// This program is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3 of the License, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program. If not, see , or write to +// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, +// Boston, MA 02110-1301, USA. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.Serialization.Json; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using System.Xml.Linq; +using System.Xml.XPath; +using OpenTween.Connection; +using OpenTween.Models; + +namespace OpenTween.Api.GraphQL +{ + public class TweetDetailRequest + { + private static readonly Uri EndpointUri = new("https://twitter.com/i/api/graphql/-Ls3CrSQNo2fRKH6i6Na1A/TweetDetail"); + + required public TwitterStatusId FocalTweetId { get; set; } + + public Dictionary CreateParameters() + { + return new() + { + ["variables"] = $$""" + {"focalTweetId":"{{this.FocalTweetId.Id}}","with_rux_injections":false,"includePromotedContent":true,"withCommunity":true,"withQuickPromoteEligibilityTweetFields":true,"withBirdwatchNotes":true,"withVoice":true,"withV2Timeline":true} + """, + ["features"] = """ + {"rweb_lists_timeline_redesign_enabled":true,"responsive_web_graphql_exclude_directive_enabled":true,"verified_phone_label_enabled":false,"creator_subscriptions_tweet_preview_api_enabled":true,"responsive_web_graphql_timeline_navigation_enabled":true,"responsive_web_graphql_skip_user_profile_image_extensions_enabled":false,"tweetypie_unmention_optimization_enabled":true,"responsive_web_edit_tweet_api_enabled":true,"graphql_is_translatable_rweb_tweet_is_translatable_enabled":true,"view_counts_everywhere_api_enabled":true,"longform_notetweets_consumption_enabled":true,"responsive_web_twitter_article_tweet_consumption_enabled":false,"tweet_awards_web_tipping_enabled":false,"freedom_of_speech_not_reach_fetch_enabled":true,"standardized_nudges_misinfo":true,"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":true,"longform_notetweets_rich_text_read_enabled":true,"longform_notetweets_inline_media_enabled":true,"responsive_web_media_download_video_enabled":false,"responsive_web_enhance_cards_enabled":false} + """, + ["fieldToggles"] = """ + {"withAuxiliaryUserLabels":false,"withArticleRichContentState":false} + """, + }; + } + + public async Task Send(IApiConnection apiConnection) + { + var param = this.CreateParameters(); + using var stream = await apiConnection.GetStreamAsync(EndpointUri, param); + using var jsonReader = JsonReaderWriterFactory.CreateJsonReader(stream, XmlDictionaryReaderQuotas.Max); + + XElement rootElm; + try + { + rootElm = XElement.Load(jsonReader); + } + catch (IOException ex) + { + throw new WebApiException("IO Error", ex); + } + + return TimelineTweet.ExtractTimelineTweets(rootElm); + } + } +} diff --git a/OpenTween/Resources/ChangeLog.txt b/OpenTween/Resources/ChangeLog.txt index 7720ed28..d1dd214d 100644 --- a/OpenTween/Resources/ChangeLog.txt +++ b/OpenTween/Resources/ChangeLog.txt @@ -3,6 +3,7 @@ ==== Unreleased * NEW: Cookie使用時のツイート投稿・削除に対応 * NEW: Cookie使用時のリツイートおよびリツイートの取消に対応 + * NEW: Cookie使用時の個別ツイートの取得に対応 * NEW: graphqlエンドポイントを使用しているタブでの「前データを取得」に対応 * CHG: Google画像検索のURLの変更に対応 diff --git a/OpenTween/Twitter.cs b/OpenTween/Twitter.cs index 307f029d..8f93db0b 100644 --- a/OpenTween/Twitter.cs +++ b/OpenTween/Twitter.cs @@ -681,8 +681,21 @@ namespace OpenTween { this.CheckAccountState(); - var status = await this.Api.StatusesShow(id) - .ConfigureAwait(false); + TwitterStatus status; + if (this.Api.AppToken.AuthType == APIAuthType.TwitterComCookie) + { + var request = new TweetDetailRequest + { + FocalTweetId = id, + }; + var tweets = await request.Send(this.Api.Connection).ConfigureAwait(false); + status = tweets.Select(x => x.ToTwitterStatus()).Where(x => x.IdStr == id.Id).First(); + } + else + { + status = await this.Api.StatusesShow(id) + .ConfigureAwait(false); + } var item = this.CreatePostsFromStatusData(status); -- 2.11.0