Package 'Rtumblr'

Title: Collecting and Analyzing 'Tumblr' Data
Description: An implementation of calls designed to collect 'Tumblr' data via its Application Program Interfaces (API), which can be found at the following URL: <https://www.tumblr.com/docs/en/api/v2>.
Authors: David Schoch [aut, cre]
Maintainer: David Schoch <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-10-25 02:44:19 UTC
Source: https://github.com/schochastics/Rtumblr

Help Index


Retrieve a Blog Avatar You can get a blog's avatar in 9 different sizes

Description

Retrieve a Blog Avatar You can get a blog's avatar in 9 different sizes

Usage

get_blog_avatar(blog, size = 64)

Arguments

blog

name of the blog

size

Integer. The size of the avatar (square, one value for both length and width). Must be one of the values: 16, 24, 30, 40, 48, 64, 96, 128, 512

Value

png of avatar

Examples

## Not run: 
avatar <- get_blog_avatar("schochastics")
png::writePNG("avatar_schochastics.png")

## End(Not run)

Retrieve Blogs Blocks

Description

Get the blogs that the requested blog is currently blocking. The requesting user must be an admin of the blog to retrieve this list. Note that this endpoint is rate limited to 60 requests per minute.

Usage

get_blog_blocks(blog, limit = 20, offset = 0, app_credentials = NULL)

Arguments

blog

name of the blog

limit

number of blocks to retrieve (1-20)

offset

block number to start at (default 0)

app_credentials

a named list containing the consumer key and consumer secret. If NULL, attempts to load from an env variable

Value

tibble of blocked blogs

Examples

## Not run: 
# replace "your-blog-name" with your Tumblr username
get_blog_blocks(blog = "your-blog-name")

## End(Not run)

Check If Followed By Blog This method can be used to check if one of your blogs is followed by another blog.

Description

Check If Followed By Blog This method can be used to check if one of your blogs is followed by another blog.

Usage

get_blog_followed_by(blog, query, app_credentials = NULL)

Arguments

blog

name of the blog

query

string. The name of the blog that may be following your blog

app_credentials

a named list containing the consumer key and consumer secret. If NULL, attempts to load from an env variable

Value

logical

Examples

## Not run: 
# replace "your-blog-name" with your Tumblr username
get_blog_followed_by(blog = "your-blog-name", query = "blog-to-check")

## End(Not run)

Retrieve followers

Description

This method can be used to retrieve the publicly exposed list of blogs that follow a blog, in order from most recently-followed to first. Only works with your own blog

Usage

get_blog_followers(blog, limit = 50, offset = 0, app_credentials = NULL, ...)

Arguments

blog

name of the blog

limit

The number of results to return: 1–50

offset

post index to start at

app_credentials

a named list containing the consumer key and consumer secret. If NULL, attempts to load from an env variable

...

further parameters as described here: https://www.tumblr.com/docs/en/api/v2

Value

a tibble of blogs

Examples

## Not run: 
# replace "your-blog-name" with your Tumblr username
get_blog_followers(blog = "your-blog-name")

## End(Not run)

Retrieve following

Description

This method can be used to retrieve the publicly exposed list of blogs that a blog follows, in order from most recently-followed to first. Only works with your own account

Usage

get_blog_following(blog, limit = 50, offset = 0, app_credentials = NULL, ...)

Arguments

blog

name of the blog

limit

The number of results to return: 1–50

offset

post index to start at

app_credentials

a named list containing the consumer key and consumer secret. If NULL, attempts to load from an env variable

...

further parameters as described here: https://www.tumblr.com/docs/en/api/v2

Value

a tibble of blogs

Examples

## Not run: 
# replace "your-blog-name" with your Tumblr username
get_blog_following(blog = "your-blog-name")

## End(Not run)

Retrieve Blog Info

Description

This method returns general information about the blog, such as the title, number of posts, and other high-level data.

Usage

get_blog_info(blog, api_key = NULL)

Arguments

blog

name of the blog

api_key

app consumer key. If NULL, attempts to load from the environment variable RTUMBLR_TOKEN

Value

tibble of information about blog

Examples

## Not run: 
get_blog_info("schochastics")

## End(Not run)

Retrieve Blog's Likes

Description

This method can be used to retrieve the publicly exposed likes from a blog. Seems to work only for your own blog

Usage

get_blog_likes(
  blog,
  limit = 20,
  offset = 0,
  after,
  before,
  api_key = NULL,
  ...
)

Arguments

blog

name of the blog

limit

The number of results to return: 1–50

offset

post index to start at

after

integer. Retrieve posts liked after the specified timestamp

before

integer. Retrieve posts liked before the specified timestamp

api_key

app consumer key. If NULL, attempts to load from the environment variable RTUMBLR_TOKEN

...

further parameters as described here: https://www.tumblr.com/docs/en/api/v2

Details

You can only provide either before, after, or offset. If you provide more than one of these options together you will get an error. You can still use limit with any of those three options to limit your result set. When using the offset parameter the maximum limit on the offset is 1000. If you would like to get more results than that use either before or after.

Value

tibble of liked posts

Examples

## Not run: 
# replace "your-blog-name" with your Tumblr username
get_blog_likes(blog = "your-blog-name")

## End(Not run)

Retrieve Published Posts

Description

Retrieve Published Posts

Usage

get_blog_posts(blog, limit = 50, offset = 0, api_key = NULL, ...)

Arguments

blog

name of the blog

limit

The number of results to return: 1–50

offset

post index to start at

api_key

app consumer key. If NULL, attempts to load from the environment variable RTUMBLR_TOKEN

...

further parameters as described here: https://www.tumblr.com/docs/en/api/v2

Details

this function uses the new post format (npf: https://www.tumblr.com/docs/npf)

Value

a tibble of blog posts

Examples

## Not run: 
# replace "blog-name" with a Tumblr username
get_blog_posts(blog = "blog-name")

## End(Not run)

Get Posts with Tag

Description

Get Posts with Tag

Usage

get_posts_tag(tag, before, limit = 20, api_key = NULL, ...)

Arguments

tag

tag to search for

before

the timestamp of when you'd like to see posts before

limit

The number of results to return: 1–50

api_key

app consumer key. If NULL, attempts to load from the environment variable RTUMBLR_TOKEN

...

further parameters as described here: https://www.tumblr.com/docs/en/api/v2

Details

This function uses the legacy post format since it appears to not support the new post format

Value

a list of tibbles of blog posts by format of posts

Examples

## Not run: 
get_posts_tag(tag="meme")

## End(Not run)