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

Updated Release: Tweetinvi 0.9.1.x (Mar 30, 2014)

$
0
0

Support for Windows 8 and Window Phone 8!

Tweetinvi 0.9.1.0 allow you to use all the features of Tweetinvi 0.9.0.0 for both Windows Phone and Windows RT projects.
It introduces new async classes and methods for all the methods accessing the Twitter API.

Tweetinvi is now a Portable Class Library, it means that it can be used on multiple platforms and potentially on Mono/Android. It is also the only Twitter API that does not rely on any code specific to a platform.

Async classes

Static classes with async methods have the same name postfixed with the 'Async' keyword.

// Classic invokevar user = User.GetLoggedUser(); 

// Async invokevar user = await UserAsync.GetLoggedUser();

Async Methods

var user = User.GetLoggedUser();

// Get timeline synchronouslyvar timeline = user.user.GetUserTimeline();

// Get timeline asyncrhonouslyvar timeline = await user.GetUserTimelineAsync();

What is the difference with the previous version?

No change of code is required for a migration from Tweetinvi 0.9.0.0 to 0.9.1.0.

Namespaces have been slightly renamed for a better readabilty.
  • TweetinviXXX -> Tweetinvi.XXX
  • Streaminvi -> Tweetinvi.Streams.
Please not that if a method is not available as an async method it means it can safely be invoked synchronously.

Because Tweetinvi is now a portable class library you need to reference the following libraries:
  • Autofac for dependency injection
  • Microsoft.Threading.Tasks for async/await
  • Microsoft.Threading.Tasks.Extensions for async/await
  • Newtonsoft.Json for parsing json
  • PCLWebUtility for WebUtility methods

All these projects are available from nuget.

Stream : Get Json

Instead of receiving objects from the different streams, you can now get the json objects directly.

var stream = Stream.CreateSampleStream();
stream.JsonObjectReceived += (sender, args) => { Console.WriteLine(args.Json); };
stream.StartStream();

Viewing all articles
Browse latest Browse all 4126

Trending Articles



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