A C# kit for accessing Tumblr's unauthenticated V1 API
Tumblr provides a few ways of accessing content. Their new V2 API is great for a rich user app, but it requires authentication and may not be the best solution for simple projects.
TumblrSharp.Simple is a PCL that allows for browsing Tumblr without authenticating.
Search for TumblrSharp.Simple
in NuGet, or use your Package Manager Console.
PM> Install-Package TumblrSharp.Simple
For an example application using the TumblrSharp.Simple library, see the example repository.
For simple code examples, continue reading.
TumblrSharp.Simple provides a stateless static class, TumblrClient
.
var result = await TumblrClient.GetAllAsync("myblog");
var result = await TumblrClient.GetPostsAsync<AudioPost>("myblog");
Console.WriteLine(result.Album);
var result = await TumblrClient.GetPostsAsync("myblog");
var result = await TumblrClient.GetPostAsync("myblog", 1237923847234);
Tumblr's V1 API provides only one endpoint with all information. Everything but the GetAllAsync
method is just a helper method extracting requested data from GetAllAsync
.
This means that GetPostsAsync
will be as fast (or as slow) as GetAllAsync
.