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

Updated Release: Tweetinvi 0.9.8.x

$
0
0

Tweetinvi Update 0.9.8.0

Quick Overview

Twitter Lists

This new version complete the implementation of all the methods related with Twitter Lists.
It includes the following :
  • User Owned Lists
  • User Subscribed Lists
  • Create a new List
  • Read/Get an existing List
  • Update an existing List
  • Delete an existing List
  • Get Tweets From List
  • Get List Members
  • Add Member to List
  • Remove Member from List
  • Verify user membership
  • Get List Subscribers
  • Subscribe Current Logged User to List
  • Unsubscribe Current Logged User from List
  • Verify user subscription

Parameters

New them up!

Parameters have been updated so that developers no longer need to use a factory to generate them.
Any type of parameter can now be created using the "new" keyword easily. In addition, the parameters classes now live in Tweetinvi.Core.Parameters. This mean that you will no longer need to reference the Tweetinvi.Logic dll to new these up.

I hope this change will improve the readability and ease of access of 'advanced' requests.

// Example with update Account Settings// *****    Tweetinvi 0.9.7.1 - OLD    *****var updateAccountParameter = Account.CreateUpdateAccountSettingsRequestParameters();

// *****    Tweetinvi 0.9.8.0 - NEW    *****var updateAccountParameter = new AccountSettingsRequestParameters { Languages = new List<Language> { Language.English }};

Please find the objects you can now simply "new" up.
  • TweetIdentifier, TwitterListIdentifier, UserIdentifier
  • Coordinates, GeoCode
  • HomeTimelineParameters; UserTimelineParameters; MentionsTimelineParameters; RetweetsOfMeTimelineRequestParameter;
  • TweetSearchParameters; UserSearchParameters;
  • AccountSettingsRequestParameters;
  • MessageGetLatestsReceivedRequestParameters; MessageGetLatestsSentRequestParameters;
  • GetTweetsFromListParameters; TwitterListUpdateParameters

Remove the "subject"" from the Parameters

Parameters classes no longer contains the subject of a request. Instead they now only contain the parameters affecting the method.

Let's see what this changes with an example:

var tweetinvi = User.GetUserFromScreenName("TweetinviAPI");
            
// *****    Tweetinvi 0.9.7.1 - OLD    *****// We create a parameters class that contains the subject which is the user 'tweetinvi'.var userTimelineParameters = Timeline.CreateUserTimelineRequestParameter(tweetinvi)

// The request is performed only with the parameters class.var tweets = Timeline.GetUserTimeline(userTimelineParameters);

// *****    Tweetinvi 0.9.8.0 - NEW    *****// We create parameters class that only contains the parameters that affect how the query is performed. // Not the subject of this query.var userTimelineParameters = new UserTimelineParameters { MaximumNumberOfTweetsToRetrieve = 100 };

// The request is performed by specifying both the subject (the user 'tweetinvi') and the parameters.var tweets = Timeline.GetUserTimeline(tweetinvi, userTimelineParameters);

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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