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 |
Retrieve a Blog Avatar You can get a blog's avatar in 9 different sizes
get_blog_avatar(blog, size = 64)
get_blog_avatar(blog, size = 64)
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 |
png of avatar
## Not run: avatar <- get_blog_avatar("schochastics") png::writePNG("avatar_schochastics.png") ## End(Not run)
## Not run: avatar <- get_blog_avatar("schochastics") png::writePNG("avatar_schochastics.png") ## End(Not run)
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.
get_blog_blocks(blog, limit = 20, offset = 0, app_credentials = NULL)
get_blog_blocks(blog, limit = 20, offset = 0, app_credentials = NULL)
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 |
tibble of blocked blogs
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_blocks(blog = "your-blog-name") ## End(Not run)
## 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.
get_blog_followed_by(blog, query, app_credentials = NULL)
get_blog_followed_by(blog, query, app_credentials = NULL)
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 |
logical
## 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)
## 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)
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
get_blog_followers(blog, limit = 50, offset = 0, app_credentials = NULL, ...)
get_blog_followers(blog, limit = 50, offset = 0, app_credentials = NULL, ...)
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 |
a tibble of blogs
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_followers(blog = "your-blog-name") ## End(Not run)
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_followers(blog = "your-blog-name") ## End(Not run)
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
get_blog_following(blog, limit = 50, offset = 0, app_credentials = NULL, ...)
get_blog_following(blog, limit = 50, offset = 0, app_credentials = NULL, ...)
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 |
a tibble of blogs
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_following(blog = "your-blog-name") ## End(Not run)
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_following(blog = "your-blog-name") ## End(Not run)
This method returns general information about the blog, such as the title, number of posts, and other high-level data.
get_blog_info(blog, api_key = NULL)
get_blog_info(blog, api_key = NULL)
blog |
name of the blog |
api_key |
app consumer key. If NULL, attempts to load from the environment variable RTUMBLR_TOKEN |
tibble of information about blog
## Not run: get_blog_info("schochastics") ## End(Not run)
## Not run: get_blog_info("schochastics") ## End(Not run)
This method can be used to retrieve the publicly exposed likes from a blog. Seems to work only for your own blog
get_blog_likes( blog, limit = 20, offset = 0, after, before, api_key = NULL, ... )
get_blog_likes( blog, limit = 20, offset = 0, after, before, api_key = NULL, ... )
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 |
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.
tibble of liked posts
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_likes(blog = "your-blog-name") ## End(Not run)
## Not run: # replace "your-blog-name" with your Tumblr username get_blog_likes(blog = "your-blog-name") ## End(Not run)
Retrieve Published Posts
get_blog_posts(blog, limit = 50, offset = 0, api_key = NULL, ...)
get_blog_posts(blog, limit = 50, offset = 0, api_key = NULL, ...)
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 |
this function uses the new post format (npf: https://www.tumblr.com/docs/npf)
a tibble of blog posts
## Not run: # replace "blog-name" with a Tumblr username get_blog_posts(blog = "blog-name") ## End(Not run)
## Not run: # replace "blog-name" with a Tumblr username get_blog_posts(blog = "blog-name") ## End(Not run)
Get Posts with Tag
get_posts_tag(tag, before, limit = 20, api_key = NULL, ...)
get_posts_tag(tag, before, limit = 20, api_key = NULL, ...)
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 |
This function uses the legacy post format since it appears to not support the new post format
a list of tibbles of blog posts by format of posts
## Not run: get_posts_tag(tag="meme") ## End(Not run)
## Not run: get_posts_tag(tag="meme") ## End(Not run)