This is like tumblr_client except it doesn't do OAuth and thus is easier to configure, but only accesses public data, making it appropriate for making backups or archiving tags.
The API key supplied here appears in the examples in the official Tumblr API V2 documentation, and you can your own in the params hash if they pull it, or you just feel like doing that or something, I don't care. I am many hundreds of years old.
The methods accept all the parameters described in the appropriate sections in the Tumblr API V2 documentation:
Below are some very clear examples of how to use this module. These examples could not possibly be any clearer.
Get a hash representing the first 20 posts from demo.tumblr.com (except it's only got 7 posts total):
TungleClient::posts('demo.tumblr.com')
Get the first 5 posts tagged 'doge' from snarp.tumblr.com:
TungleClient::posts('snarp.tumblr.com', tag: 'doge', limit: 5)
Get the second 5 posts tagged 'doge' from snarp.tumblr.com:
TungleClient::posts('snarp.tumblr.com', tag: 'doge', limit: 5, offset: 5)
Get all 10 of those doge posts again, this time with notes and reblog info:
TungleClient::posts('snarp.tumblr.com', tag: 'doge', limit: 10, notes_info: true, reblog_info: true)
Get the first 20 posts tagged 'doge' site-wide:
TungleClient::tagged('doge')
Get the latest posts tagged 'homestuck' as of 11:59 PM, October 25th 2011:
TungleClient::tagged('homestuck', before: 1319587199)
Gets the userinfo for demo.tumblr.com:
TungleClient::blog_info('demo.tumblr.com')['blog']
Gets the url for the avatar for demo.tumblr.com:
TungleClient::avatar('demo.tumblr.com')
Get demo.tumblr.com posts as a JSON string rather than a hash:
TungleClient::posts_json('demo.tumblr.com')['posts']
And the userinfo as a JSON string rather than a hash:
TungleClient::blog_info_json('demo.tumblr.com')
And exactly two posts from the 'bats' tag:
TungleClient::tagged_json('bats', limit: 2)