README.md

tumblR

tumblR is an R package which provides access to the Tumblr API. At the moment only API calls which get information are supported.

The following functions are supported:

General
No Authentication
API Key

Note that in order to call any of these functions setup_tumblr_apikey must be called first.

OAuth

Note that in order to call these methods both setup_tumblr_apikey and setup_tumblr_oauth must be called first.

Authentication

To use this library (except to get avatars) you will require a Tumblr api key. These can be gotten from Tumblr. In order to get an api key (consumer key) you:

  1. Go to the tumblr applications page (Log in may be required)
  2. Click + Register application
  3. Your OAuth Consumer Key is your API Key.

Examples

library(tumblR)
library(wordcloud)

setup_tumblr_apikey("MyAPIKey")

superBowlPosts <- get_tagged("superbowl")
staffInfo <- get_info("staff.tumblr.com")

all = get_posts("staff.tumblr.com")
posts = all$posts
corpus =  unlist(sapply(posts, function(x) x$tags))
wordcloud(corpus,colors=brewer.pal(8, "Dark2")) 

Installation

This package can be installed directly from Github using the devtools package.

library(devtools)

install_github("tumblR",username="klapaukh")


klapaukh/tumblR documentation built on May 20, 2019, 11:06 a.m.