public string GetStatusMessage(long id, TwitterStatusMessageOptions options) { // Define the query string NameValueCollection qs = new NameValueCollection { { "id", id.ToString(CultureInfo.InvariantCulture) } }; if (options != null) { if (options.TrimUser) qs.Add("trim_user", "true"); if (options.IncludeMyRetweet) qs.Add("include_my_retweet", "true"); if (options.IncludeEntities) qs.Add("include_entities", "true"); } // Make the call to the API return Client.DoHttpRequestAsString("GET", "https://api.twitter.com/1.1/statuses/show.json", qs); }
/// <summary> /// Gets the raw API response for a status message (tweet) with the specified ID. /// </summary> /// <param name="options">The options used when making the call to the API.</param> /// <see> /// <cref>https://dev.twitter.com/docs/api/1.1/get/statuses/show/:id</cref> /// </see> public SocialHttpResponse GetStatusMessage(TwitterStatusMessageOptions options) { if (options == null) throw new ArgumentNullException("options"); return Client.DoHttpGetRequest("https://api.twitter.com/1.1/statuses/show.json", options); }
/// <summary> /// Gets information about a status message (tweet) with the specified ID. /// </summary> /// <param name="statusId">The ID of the status message.</param> /// <param name="options">Options affecting the response from the Twitter API.</param> public TwitterStatusMessage GetStatusMessage(long statusId, TwitterStatusMessageOptions options = null) { return TwitterStatusMessage.ParseJson(Raw.GetStatusMessage(statusId, options)); }
/// <summary> /// Alias of GetStatusMessage(). Gets information about a status message (tweet) with the specified ID. /// </summary> /// <param name="statusId">The ID of the status message.</param> /// <param name="options">Options affecting the response from the Twitter API.</param> public TwitterStatusMessage GetTweet(long statusId, TwitterStatusMessageOptions options = null) { return GetStatusMessage(statusId, options); }
public string GetTweet(long id, TwitterStatusMessageOptions options) { return GetStatusMessage(id, options); }