Yet Another .NET Twitter Library
Yet Another .NET Twitter Library...
Simplest authorizing:
csharp var session = OAuth.Authorize("consumer_key", "consumer_secret"); var tokens = OAuth.GetTokens(session, "PINCODE");
Tweeting is very easy:
csharp tokens.Statuses.Update(status => "hello");
We provide the most modern way to use Twitter's API asynchronously:
csharp var tokenSource = new CancellationTokenSource(); var task = tokens.Statuses.UpdateWithMediaAsync( new { status = "Yummy!", media = new FileInfo(@"C:\test.jpg") }, tokenSource.Token ); // oh! that was a photo of my dog!! tokenSource.Cancel();
Go with the Streaming API and LINQ:
csharp var sampleStream = tokens.Streaming.Sample() .OfType() .Select(x => x.Status); foreach(var status in sampleStream) Console.WriteLine("{0}: {1}", status.User.ScreenName, status.Text);
Get fantastic experiences with Rx: ```csharp var disposable = tokens.Streaming.FilterAsObservable(track => "tea") .OfType() .Subscribe(x => Console.WriteLine("{0} says about tea: {1}", x.Status.User.ScreenName, x.Status.Text));
await Task.Delay(30 * 1000); disposable.Dispose(); ```
Various types of method overloads: ```csharp tokens.Statuses.Update(status => "hello");
tokens.Statuses.Update(new { status = "hello" });
tokens.Statuses.Update(new YourClass("hello"));
tokens.Statuses.Update(status: "hello");
tokens.Statuses.Update(new Dictionary() { {"status", "hello"} }); ```
Oh yes why don't you throw away any
StatusUpdateOptionsand it kinds???
We support both of Windows .NET and Mono, and CoreTweet works on following platforms:
Documents of API is here.
Visit Wiki to get more information such as examples.
Now available on NuGet!
PM> Install-Package CoreTweet
Or please download a binary from Releases.
You can't build PCL/WindowsRT binaries on Mono (on Linux) because they require non-free libraries.
Set-ExecutionPolicy AllSigned
Please report to Issues if you find any problems.
We seriously need your help for writing documents.
Please go to Wiki and write API documentation, articles and/or some tips!
Pull requests are welcome.
This software is licensed under the MIT License.