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

Library Changes

  • The static TweetList class has been renamed TwitterList
  • Please be aware of the changes affecting the methods that used "subjects" into their parameter objects (e.g. UserTimeline). More information.

Twitter Lists

The most obvious update is that the static class TweetList has been renamed into TwitterList.
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.
  • IDENTIFIERS : TweetIdentifier, TwitterListIdentifier, UserIdentifier
  • OBJECTS : Coordinates, GeoCode
  • TIMELINE PARAMETERS : HomeTimelineParameters; UserTimelineParameters; MentionsTimelineParameters; RetweetsOfMeTimelineRequestParameter;
  • SEARCH PARAMETERS : TweetSearchParameters; UserSearchParameters;
  • ACCOUNT PARAMETERS : AccountSettingsRequestParameters;
  • MESSAGE PARAMETERS : MessageGetLatestsReceivedRequestParameters; MessageGetLatestsSentRequestParameters;
  • TWITTER LIST PARAMETERS : GetTweetsFromListParameters; TwitterListUpdateParameters

Parameters no longer store operation "subjects"

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);

User Suggestions

Developers can now access user's suggestions.

var suggestedUsers = Account.GetSuggestedUsers("tweetinvi", Language.English);
var suggestedCategories = Account.GetSuggestedCategories(Language.Japanese);
var suggestedUsersWithHydratedStatus = Account.GetSuggestedUsersWithTheirLatestTweet("tweetinvi");

Bug Fixes

  • Fixed MultiThreading issue that resulted in streams to behave incorrectly when stopped and restarted.
  • SearchJson no longer throws a NullReferenceException when invoked from a thread that is not the main thread.

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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