PackageDescription: Tumblr(Bundle)


Tumblr

Last published: June 15, 2009 by 'jamesr'


The domain models and interface to the Tumblr API. Here are example usages:

| emailAddress password username |
emailAddress := 'username@someAddress.com'.
password := 'yourPasswordHere'.
username := 'yourTumblrUserNameHere'.

"regular post"
post := RegularPost new.
post email: emailAddress.
post password: password.
post tags: (Array with: 'smalltalk' with: 'tumblr').
post title: 'First Tumblr Post'.
post body: 'This should be posted to Tumblr'.
post post.

"edit a post - note that the post object should have the postId filled in now"
post email: emailAddress.
post password: password.
post title: 'First Tumblr Post'.
post body: 'We just edited the post'.
post post

"photo post"
post := PhotoPost new.
post email: emailAddress.
post password: password.
post tags: (Array with: 'smalltalk' with: 'tumblr' with: 'photo').
post caption: 'This is me presenting in Cologne, Germany'.
post clickThroughUrl: 'http://www.cincomsmalltalk.com/blog/blogView'.
post data: 'PathAndFilenameForPhoto.jpg'.
post post.

"quote post"
post := QuotePost new.
post email: emailAddress.
post password: password.
post tags: (Array with: 'smalltalk' with: 'tumblr' with: 'quote').
post quote: 'A fanatic is one who can''t change his mind and won''t change the subject.'.
post source: 'http://www.quotationspage.com/quotes/Sir_Winston_Churchill/'.
post post.

"link post"
post := LinkPost new.
post email: emailAddress.
post password: password.
post tags: (Array with: 'smalltalk' with: 'tumblr' with: 'link').
post url: 'http://www.cincomsmalltalk.com/scripts/CommunityDownloadPage.ssp'.
post name: 'Cincom Smalltalk NC Download'.
post description: 'Here''s the free Cincom Smalltalk Non-Commercial download - grab ObjectStudio 8.1 and/or VisualWorks 7.6'.
post post.


"authenticate - a misnomer, as it answers info on your permissions, does not authenticate you"
post := RegularPost new.
post email: emailAddress.
post password: password.
post authenticate.

"get the JSON read results"
post := RegularPost new.
post read: username