TumblrKit is a Cocoa interface for Tumblr
Objective-C
Switch branches/tags
Nothing to show
Latest commit 6e73342 Jul 31, 2012 Igor Sutton Lopes Updates project file to Xcode 4.4.
Permalink
Failed to load latest commit information.
.idea Added TumblrKit Tests for iOS May 31, 2012
English.lproj initial import. Jul 13, 2010
TumblrKit Tests for Mac Introduced ARC support May 30, 2012
TumblrKit Tests for iOS Added tests. Also fixed some warnings. May 31, 2012
TumblrKit for Mac Added iOS and Mac targets Dec 13, 2011
TumblrKit for iOS Added iOS and Mac targets Dec 13, 2011
TumblrKit.xcodeproj Updates project file to Xcode 4.4. Jul 31, 2012
.gitignore Added iOS and Mac targets Dec 13, 2011
Info.plist Changed license to MIT Jan 13, 2011
MIT-LICENSE.txt Changed license to MIT Jan 13, 2011
NSDictionary+TumblrKit.h Added iOS and Mac targets Dec 13, 2011
NSDictionary+TumblrKit.m Using \r\n instead of \n Jan 14, 2011
NSString+TumblrKit.h Changed license to MIT Jan 13, 2011
NSString+TumblrKit.m Introduced ARC support May 30, 2012
README.md Updated README.md Jan 14, 2011
TKPost.h Added TumblrKit Tests for iOS May 31, 2012
TKPost.m Added TumblrKit Tests for iOS May 31, 2012
TKPostsRequest.h Added TumblrKit Tests for iOS May 31, 2012
TKPostsRequest.m Ignores arc-performSelector-leaks messages. Jul 31, 2012
TKPostsResponse.h Introduced ARC support May 30, 2012
TKPostsResponse.m Introduced ARC support May 30, 2012
TKRequest.h Moving towards a more framework-ish way. Dec 15, 2011
TKRequest.m Added tests. Also fixed some warnings. May 31, 2012
TKTumblelog.h Introduced ARC support May 30, 2012
TKTumblelog.m Introduced ARC support May 30, 2012
TKTumblelogsRequest.h Added tests. Also fixed some warnings. May 31, 2012
TKTumblelogsRequest.m Added tests. Also fixed some warnings. May 31, 2012
TKTumblelogsResponse.h Introduced ARC support May 30, 2012
TKTumblelogsResponse.m Introduced ARC support May 30, 2012
TKTumblr.h Introduced ARC support May 30, 2012
TKTumblr.m Fixes Content-Length string format argument. Jul 31, 2012
TKTumblrReadRequest.h Changed license to MIT Jan 13, 2011
TKTumblrReadRequest.m Introduced ARC support May 30, 2012
doxygen.config added doxygen configuration file Sep 7, 2010

README.md

TumblrKit

TumblrKit is a light-weight wrapper around Tumblr's API in Objective-C.

Currently you can:

  • Fetch posts from Tumblr (regular, conversation, quote and link)
  • Upload posts to Tumblr (regular, conversation, quote, link and photo)

Usage

You can fetch a post with a specific POST_ID using the following:

TKTumblr *tumblr = [[TKTumblr alloc] initWithEmail:EMAIL andPassword:PASSWORD];
TKPost *thePost = [tumblr postWithID:[NSNumber numberWithInt:POST_ID] andDomain:@"example.tumblr.com"];
NSLog(@"thePost: %@", thePost);

If you want to fetch more than one post:

// Instantiate a new TKTumblr object.
TKTumblr *tumblr = [[TKTumblr alloc] initWithEmail:EMAIL andPassword:PASSWORD];

// Configure a delegate implementing the TKTumblrDelegate protocol.
tumblr.delegate = aDelegate;

// Configure the read request object.
TKTumblrReadRequest *theReadRequest = [[TKTumblrReadRequest alloc] init];

// Return the post in raw text (if you wrote using Markdown).
theReadRequest.filter = TKPostFilterNone;

// Execute the read request. For each post, TKTumblr will send the
// tumblrDidReceivePost:withDomain: message to the delegate object.
[tumblr postsWithReadRequest:theReadRequest];

To upload a TKPost:

// Create a new TKPost
TKPostRegular *thePost = [[TKPostRegular alloc] init];
thePost.title = @"The title";
thePost.body = @"The body";

// Upload it to Tumblr. The delegate will receive either
// tumblrDidUploadPost:withDomain:postId: or
// tumblrDidFailToUploadPost:withDomain:returnCode:
[tumblr uploadPost:thePost withDomain:@"another-example.tumblr.com"];

// If you're lazy, you can dismiss the withDomain to upload to your main
// Tumblelog.
[tumblr uploadPost:thePost];

To Do

  • Currently network connections are synchronous. Need to add support for asynchronous connections, and respective delegate methods.