Learn Data & AI Skills | 50% off
Get 50% off unlimited learning

tumblR (version 1.2)

likes: Retrieve Blog's Likes

Description

Retrieve the publicly exposed likes from a blog.

Usage

likes(base_hostname = NA, limit = 20, offset = 0, api_key = NA)

Arguments

base_hostname

The standard or custom blog hostname. See Details.

limit

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

offset

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

api_key

Your OAuth Consumer Key. See Details.

Value

A list object with the following fields:

liked_posts

An Array. An array of post objects (posts liked by the user).

liked_count

A number. Total number of liked posts.

Details

Each blog has a unique hostname. The hostname can be standard or custom. Standard hostname: the blog short name + .tumblr.com. Custom hostname: Anything at all, as determined by a DNS CNAME entry. The API uses three different levels of authentication, depending on the method. None: No authentication. Anybody can query the method. API key: Requires an API key. Use your OAuth Consumer Key as your api_key. OAuth: Requires a signed request that meets the OAuth 1.0a Protocol.

References

https://www.tumblr.com/docs/en/api/v2

Examples

Run this code
# NOT RUN {
## An example of an authenticated request,
## where api_key is fictitious.
## You can obtain your own at https://www.tumblr.com/oauth/apps
api_key <- "key"

## you must specify a real blog for base_hostname
base_hostname <- "blogname.tumblr.com"


likes(base_hostname = base_hostname, limit = 20, offset = 0, api_key = api_key)
# }

Run the code above in your browser using DataLab