Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: GetSavedSearches - Does not work

$
0
0
Hehe good good good,

Well you can have a look into the post just right after yours (https://tweetinvi.codeplex.com/discussions/588444).

It depends on whether the Model that you are trying to get already exist in Tweetinvi.
  • If it does, then you can simply do the following:
// Getting Tweets from Timelinevar tweets = TwitterAccessor.ExecuteGETQuery<IEnumerable<ITweetDTO>>("https://api.twitter.com/1.1/statuses/home_timeline.json");
  • If it does not exist then you need to create a model where you specify some JsonProperty as followed
// Modelpublicclass TwitterConfiguration
{
    // Basic property
    [JsonProperty("characters_reserved_per_media")]
    publicint CharactersReservedPerMedia { get; privateset; }

    // List of items
    [JsonProperty("non_username_paths")]
    publicstring[] NonUsernamePaths { get; privateset; }

    // Using existing Tweetinvi Models
    [JsonProperty("photo_sizes")]
    public Dictionary<string, MediaEntitySize> PhotoSizes { get; privateset; }
}
And then do the same as the first example but with your Model :
var configuration = TwitterAccessor.ExecuteGETQuery<TwitterConfiguration>("https://api.twitter.com/1.1/help/configuration.json");
Fairly easy right?

Cheers,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>