Last data update: 2014.03.03

R: Retrieve a User's Dashboard.
dashboardR Documentation

Retrieve a User's Dashboard.

Description

Use this method to retrieve the dashboard that matches the OAuth credentials submitted with the request.

Usage

dashboard(limit = 20, offset = 0, type = NA, since_id = 0, reblog_info = FALSE, 
notes_info = FALSE, token = NA, consumer_key = NA, consumer_secret = NA)

Arguments

limit

The number of results to return: 1-20, inclusive.

offset

Post number to start at. 0 is the first post.

type

The type of post to return. The available values are: text, photo, quote, link, chat, audio, video, answer. If no values are specified, all types are returned.

since_id

Return posts that have appeared after this ID.

reblog_info

Indicates whether to return reblog information (specify TRUE or FALSE). Returns the various reblogged_fields.

notes_info

Indicates whether to return notes information (specify TRUE or FALSE). Returns note count and note metadata.

token

Represents the complete set of data needed for OAuth access: an app, an endpoint, cached credentials and parameters. See Details.

consumer_key

The consumer key provided by your application.

consumer_secret

The consumer secret provided by your application.

Details

The API supports the OAuth 1.0a Protocol, accepting parameters via the Authorization header, with the HMAC-SHA1 signature method only.

Value

A serialized JSON object with the following fields:

blog_name

A string. The short name used to uniquely identify a blog.

id

A number. The unique ID of the post.

post_url

A string. The location of the post.

type

A string. The type of post.

timestamp

A number. The time of the post, in seconds since the epoch.

date

A string. The GMT date and time of the post, as a string.

format

A string. The post format: html or markdown.

reblog_key

A string. The key used to reblog this post.

tags

An array (string). Tags applied to the post.

bookmarklet

A boolean. Indicates whether the post was created via the Tumblr bookmarklet. Exists only if true.

mobile

A boolean. Indicates whether the post was created via mobile/email publishing. Exists only if true.

source_url

A string. The URL for the source of the content for quotes, reblogs, etc.. Exists only if there is a content source.

source_title

A string. The title of the source site. Exists only if there is a content source.

liked

A boolean. Indicates if a user has already liked a post or not.Exists only if the request is fully authenticated with OAuth.

state

A string. Indicates the current state of the post. States are: published, queued, draft and private.

total_posts

A number. The total number of post available for this request, useful for paginating through results.

Author(s)

Andrea Capozio

References

https://www.tumblr.com/docs/en/api/v2#common-fields

Examples

## Not run: 
## An example of an authenticated request using the httr package,
## where consumer_key, consumer_secret and appname are fictitious.
## You can obtain your own at https://www.tumblr.com/oauth/apps

consumer_key <-'key'
consumer_secret <- 'secret'
appname <- Tumblr_App
tokenURL <- 'http://www.tumblr.com/oauth/request_token'
accessTokenURL <- 'http://www.tumblr.com/oauth/access_token'
authorizeURL <- 'http://www.tumblr.com/oauth/authorize'

app <- oauth_app(appname, consumer_key, consumer_secret)
endpoint <- oauth_endpoint(tokenURL, authorizeURL, accessTokenURL)
token <- oauth1.0_token(endpoint, app)
sig <- sign_oauth1.0(app, 
					token = token$credentials$oauth_token, 
					token_secret = token$credentials$oauth_token_secret)


dashboard(limit = 15, offset = 3, token = token,
consumer_key = consumer_key, consumer_secret = consumer_secret)


## End(Not run)

Results