View Source Tumbloire (Tumbloire v0.1.0)
A thin wrapper around the Tumblr API v2.
You can find more information on in the Tumblr API v2 official documentation.
Authentication
Tumbloire offers two ways to authenticate:
- by explicitly passing the API key to the endpoints
- by using the application's configuration
Refer to each endpoint function and Tumblr documentation to know which endpoints can be accessed with an API key.
To configure the application:
import Config
config :tumbloire,
consumer_key: "YOUR_CONSUMER_KEY",
consumer_secret: "YOUR_CONSUMER_SECRET",
access_token: "YOUR_ACCESS_TOKEN",
refresh_token: "YOUR_REFRESH_TOKEN"Req configuration
Tumbloire uses Req as its HTTP client, and can be configured in two ways:
- by passing Req options to an endpoint function, via the
:paramsargument - by using the application's configuration
To configure Req via the application's configuration:
import Config
config :tumbloire,
req_options: [
...
]Examples
Simple console OAuth 2.0 authorization flow
iex> scope = [:write, :offline_access]
iex> state =
...> :crypto.strong_rand_bytes(32)
...> |> Base.url_encode64()
...> |> binary_part(0, 32)
iex> IO.write("Allow the application at the following URL: ")
iex> Tumbloire.Auth.authorization_url(scope, state) |> IO.puts()
iex> IO.write("Paste the callback URL: ")
iex> {:ok, {code, ^state}} =
...> IO.read(:stdio, :line) |> String.trim() |> Tumbloire.Auth.parse_callback()
iex> {:ok, {access_token, refresh_token}} = Tumbloire.Auth.request_token(code) Request with explicit API key and Req option retry
iex> Tumbloire.blog_info("someblog", api_key: "YOUR_API_KEY", retry: false)
Summary
Blog
Blocks a blog.
Returns a blog's avatar.
Returns a blog's blocks.
Returns a blog's draft posts.
Returns if a blog is followed by another blog.
Returns a blog's followers.
Returns a blog's following.
Returns general information about a blog.
Returns a blog's liked posts.
Returns a blog's activity items, in reverse chronological order.
Returns a blog's published posts.
Returns a blog's queued posts.
Reorders a blog's queue.
Shuffles a blog's queue.
Returns a blog's submission posts.
Blocks multiple blogs.
Creates or reblogs a post.
Deletes a blog's post.
Edits a blog's post.
Mutes a blog's post.
Returns a post's notes.
Remove a blog's block.
Unmutes a blog's post.
User
Adds one or more contents to filter.
Returns the user's filtered tags.
Returns the user's filtered content.
Returns the user's filtered tags.
Follows a blog.
Likes a post.
Removes a content filter.
Removes a tag filter.
Unfollows a blog.
Unlikes a post.
Returns the user's dashboard.
Returns the user's liked posts.
Returns the user's account information.
Returns the user's liked posts.
Returns the user's various limits.
Tagged
Returns posts with a specific tag.
Communities
Cancels a pending community invitation for a blog.
Changes a community member's role.
Returns the list of joined communities.
Returns information about a community.
Returns a community invitation status for a blog.
Returns members of a community.
Returns a community pending invites.
Returns posts from a community.
Edits a community.
Invites a blog to a community.
Joins a community.
Leaves a community.
Mutes a community.
Adds a reaction to a community post.
Returns an invitation link with a new hash, invalidating the previous one.
Removes a member from a community.
Removes a reaction from a community post.
Unmutes a community.
Blog
@spec block_blog( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Blocks a blog.
See /blocks - Block a Blog (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
blocked_tumblelog: the tumblelog to blockpost_id: the anonymous post ID to block
Only one parameter is required at a time.
@spec blog_avatar( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's avatar.
See /avatar - Retrieve Blog Avatar (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
size: the size of the avatar, must be one of 16, 24, 30, 40, 48, 64, 96, 128, 512 (default 64)
@spec blog_blocks( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's blocks.
See /blocks - Retrieve Blog's Blocks (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of blocks to retrieve, 1-20 (default 20)offset: block number to start at (default 0)
@spec blog_drafts( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's draft posts.
See /posts/draft — Retrieve Draft Posts (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
before_id: returns posts that have appeared before this ID (default 0)filter: the post format to return other than HTML, one of "text", "raw"
@spec blog_followed_by(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns if a blog is followed by another blog.
See /followed_by — Check If Followed By Blog (on Tumblr) for more information.
Parameters
blogname: a blog identifierother_blogname: a blog identifierparams: a keyword list of Req options
@spec blog_followers( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's followers.
See /followers — Retrieve Blog's followers (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of followers to retrieve, 1-20 (default 20)offset: result number to start at (default 0)
@spec blog_following( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's following.
See /following — Retrieve Blog's following (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of results to retrieve, 1-20 (default 20)offset: followed blog number to start at (default 0)
@spec blog_info( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns general information about a blog.
See /info - Retrieve Blog Info (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
api_key: the application OAuth Consumer Keyfields[blogs]: a list of fields for partial responses
@spec blog_likes( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's liked posts.
See /likes — Retrieve Blog's Likes (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
api_key: the application OAuth Consumer Keylimit: number of liked posts to retrieve, 1-20 (default 20)offset: liked post number to start at (default 0)before: retrieves posts liked before this timestampafter: retrieves posts liked after this timestamp
@spec blog_notifications( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's activity items, in reverse chronological order.
See /notifications — Retrieve Blog's Activity Feed (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
before: UNIX epoch timestamp that begins the page (defaults to request time)types: a list of one or more types to filter by, one of "like", "reply", "follow", "mention_in_reply", "mention_in_post", "reblog_naked", "reblog_with_content", "ask", "answered_ask", "new_group_blog_member", "post_attribution", "post_flagged", "post_appeal_accepted", "post_appeal_rejected", "what_you_missed", "conversational_note"rollups: whether to "roll up" similar activity items into single itemsomit_post_ids: a list of your own post IDs to filter out
@spec blog_posts( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's published posts.
See /posts – Retrieve Published Posts (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
api_key: the application OAuth Consumer Keytype: the type of post to return, one of "text", "quote", "link", "answer", "video", "audio", "photo", "chat"id: a specific post IDtag: limits the response to posts with the specified tag(s), can be a string or a list of stringslimit: number of blocks to retrieve, 1-20 (default 20)offset: block number to start at (default 0)reblog_info: whether to return reblog informationnotes_info: whether to return notes informationfilter: the post format to return other than HTML, one of "text", "raw"before: retrieves posts liked before this timestamp, in secondsafter: retrieves posts liked after this timestamp, in secondssort: sort order, one of "desc", "asc"npf: whether to return posts' content in NPF format
@spec blog_queue( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's queued posts.
See /posts/queue — Retrieve Queued Posts (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of blocks to retrieve, 1-20 (default 20)offset: block number to start at (default 0)filter: the post format to return other than HTML, one of "text", "raw"
@spec blog_reorder_queue(String.t(), String.t() | integer(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Reorders a blog's queue.
See /posts/queue/reorder — Reorder Queued Posts (on Tumblr) for more information.
Parameters
blogname: a blog identifierpost_id: ID of the post to moveparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
insert_after: which post ID to move it after (default 0, moves the post to the top)
@spec blog_shuffle_queue( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Shuffles a blog's queue.
See /posts/queue/shuffle - Shuffle Queued Posts (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of Req options
@spec blog_submissions( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a blog's submission posts.
See /posts/submission — Retrieve Submission Posts (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
offset: block number to start at (default 0)filter: the post format to return other than HTML, one of "text", "raw"
@spec bulk_block_blogs(String.t(), [String.t()], keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Blocks multiple blogs.
See /blocks/bulk - Block a list of Blogs (on Tumblr) for more information.
Parameters
blogname: a blog identifierblocked_blogs: a list of tumblelogs to blockparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
force: whether to force the block even if it requires canceling a Post+ Subscription
@spec create_post( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Creates or reblogs a post.
See /posts - Create/Reblog a Post (Neue Post Format) (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
content: an array of NPF content blocks to be used to make the post; in a reblog, this is any content you want to addlayout: an array of NPF layout objects to be used to lay out the post contentstate: the initial state of the new post, one of "published" or "queued" (default "published")publish_on: a future date and time in ISO 8601 format to publish the post, only ifstateis "queued"date: a past date and time in ISO 8601 format to backdate the posttags: a list of tags to associate with the postsource_url: a source attribution for the post contentsend_to_twitter: whether or not to share this via any connected Twitter account on post publish (defaults to the blog's global setting)is_private: whether this should be a private answer, if this is an answerslug: a custom URL slug to use in the post's permalink URLinteractability_reblog: who can interact with this when reblogging, one of 'everyone' or 'noone'parent_tumblelog_uuid: the unique public identifier of the Tumblelog that's being reblogged from, required if reblogging a postparent_post_id: the unique public post ID being reblogged, required if reblogging a postreblog_key: the unique per-post hash validating that this is a genuine reblog action, required if reblogging a posthide_trail: whether or not to hide the reblog trail with this new post (default false)exclude_trail_items: instead ofhide_trail, use this to specify a list of specific reblog trail item indexes to exclude from your reblog
@spec delete_post(String.t(), integer(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Deletes a blog's post.
See /post/delete – Delete a Post (on Tumblr) for more information.
Parameters
blogname: a blog identifierpost_id: ID of the post to deleteparams: a keyword list of Req options
@spec edit_post(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Edits a blog's post.
See /posts/{post-id} - Editing a Post (Neue Post Format) (on Tumblr) for more information.
Parameters
blogname: a blog identifierpost_id: ID of the post to editparams: a keyword list of Req options
@spec mute_post(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Mutes a blog's post.
See /posts/{post-id}/mute – Muting a Post's Notifications (on Tumblr) for more information.
Parameters
blogname: a blog identifierpost_id: ID of the post to muteparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
mute_length_seconds: how many seconds the mute should last (default 0, mutes the post forever)
@spec post_notes(String.t(), integer(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a post's notes.
See /notes - Get notes for a specific Post (on Tumblr) for more information.
Parameters
blogname: a blog identifierpost_id: ID of the post to fetch notes forparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
api_key: the application OAuth Consumer Keybefore_timestamp: fetch notes created before this timestamp; this is a UNIX timestamp in seconds precision, but microseconds precision for "conversation"modemode: the response formatting mode, one of "all", "likes", "conversation", "rollup", "reblogs_with_tags"
@spec remove_blog_block( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Remove a blog's block.
See /blocks – Remove a Block (on Tumblr) for more information.
Parameters
blogname: a blog identifierparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
blocked_tumblelog: the tumblelog whose block to removeanonymous_only: clear all anonymous IP blocks
Only one parameter is required at a time.
@spec unmute_post(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Unmutes a blog's post.
See /posts/{post-id}/mute – Muting a Post's Notifications (on Tumblr) for more information.
Parameters
blogname: a blog identifierpost_id: ID of the post to unmuteparams: a keyword list of Req options
User
@spec add_filtered_content( [String.t()], keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Adds one or more contents to filter.
See /user/filtered_content - Content Filtering (on Tumblr) for more information.
Parameters
content: the content(s) to add, can be a string or a list of stringsparams: a keyword list of Req options
@spec add_filtered_tags( [String.t()], keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's filtered tags.
See /user/filtered_tags - Tag Filtering (on Tumblr) for more information.
Parameters
tags: the tag(s) to add, can be a string or a list of stringsparams: a keyword list of Req options
@spec filtered_content(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's filtered content.
See /user/filtered_content - Content Filtering (on Tumblr) for more information.
Parameters
params: a keyword list of Req options
@spec filtered_tags(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's filtered tags.
See /user/filtered_tags - Tag Filtering (on Tumblr) for more information.
Parameters
params: a keyword list of Req options
@spec follow_blog(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Follows a blog.
See /user/follow – Follow a blog (on Tumblr) for more information.
Parameters
params: a keyword list of endpoint parameters or Req options
Endpoint parameters
url: the blog to followemail: the email of the blog to follow
@spec like_post(integer(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Likes a post.
See /user/like – Like a Post (on Tumblr) for more information.
Parameters
params: a keyword list of Req optionspost_id: the id of the post to likereblog_key: the reblog key for the post ID
@spec remove_filtered_content( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Removes a content filter.
See /user/filtered_content - Content Filtering (on Tumblr) for more information.
Parameters
content: the content to removeparams: a keyword list of Req options
@spec remove_filtered_tag( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Removes a tag filter.
See /user/filtered_tags - Tag Filtering (on Tumblr) for more information.
Parameters
tag: the tag to removeparams: a keyword list of Req options
@spec unfollow_blog( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Unfollows a blog.
See /user/unfollow – Unfollow a blog (on Tumblr) for more information.
Parameters
params: a keyword list of endpoint parameters or Req options
Endpoint parameters
url: the blog to follow
@spec unlike_post(integer(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Unlikes a post.
See /user/unlike – Unlike a Post (on Tumblr) for more information.
Parameters
params: a keyword list of Req optionspost_id: the id of the post to likereblog_key: the reblog key for the post ID
@spec user_dashboard(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's dashboard.
See /user/dashboard – Retrieve a User's Dashboard (on Tumblr) for more information.
Parameters
params: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of results to retrieve, 1-20 (default 20)offset: post number to start at (default 0)type: the type of post to return, one of "text", "quote", "link", "answer", "video", "audio", "photo", "chat"since_id: returns posts that have appeared after this post IDreblog_info: whether to return reblog informationnotes_info: whether to return notes informationnpf: whether to return posts' content in NPF format
@spec user_following(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's liked posts.
See /user/following – Retrieve the Blogs a User Is Following (on Tumblr) for more information.
Parameters
params: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of liked posts to retrieve, 1-20 (default 20)offset: liked post number to start at (default 0)
@spec user_info(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's account information.
See /user/info – Get a User's Information (on Tumblr) for more information.
Parameters
params: a keyword list of Req options
@spec user_likes(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's liked posts.
See /user/likes — Retrieve a User's Likes (on Tumblr) for more information.
Parameters
params: a keyword list of endpoint parameters or Req options
Endpoint parameters
limit: number of liked posts to retrieve, 1-20 (default 20)offset: liked post number to start at (default 0)before: retrieves posts liked before this timestampafter: retrieves posts liked after this timestamp
@spec user_limits(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the user's various limits.
See /user/limits – Get a User's Limits (on Tumblr) for more information.
Parameters
params: a keyword list of Req options
Tagged
@spec tagged_posts( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns posts with a specific tag.
See /tagged – Get Posts with Tag (on Tumblr) for more information.
Parameters
tag: the tagparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
api_key: the application OAuth Consumer Keylimit: number of posts to retrieve, 1-20 (default 20)before: retrieves posts before this timestampfilter: the post format to return other than HTML, one of "text", "raw"
Communities
@spec cancel_community_invitation(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Cancels a pending community invitation for a blog.
See DELETE /v2/communities/{community-handle}/invitations/{blog-identifier} - Cancel an invitation (on Tumblr) for more information.
Parameters
community: the community handleblogname: the blog to cancel the invitation forparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
do_not_invite: whether to disallow any future re-invitations
@spec change_member_role(String.t(), String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Changes a community member's role.
See PUT /v2/communities/{community-handle}/members/{blog-identifier} - Change a member's role (on Tumblr) for more information.
Parameters
community: the community handleblogname: the blog to changeparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
role: the member's new role, one of "member", "moderator", "admin"
@spec communities(keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns the list of joined communities.
See GET /v2/communities - List joined communities (on Tumblr) for more information.
Parameters
params: a keyword list of Req options
@spec community_info( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns information about a community.
See GET /v2/communities/{community-handle} - Get info about a community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
context: the context of what the info will be used for; at the moment, only "edit" is available
@spec community_invitation_status(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a community invitation status for a blog.
See GET /v2/communities/{community-handle}/invitations/{blog-identifier} - Check invitation status (on Tumblr) for more information.
Parameters
community: the community handleblogname: the blog to checkparams: a keyword list of Req options
@spec community_members( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns members of a community.
See GET /v2/communities/{community-handle}/members - Get community members (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
page: the page of results to fetchfilter: filters to a specific set of members, one of "all", "admin", "moderator", "following", "mutual"
@spec community_pending_invites( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns a community pending invites.
See GET /v2/communities/{community-handle}/invitations - View pending invites (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
before: the timestamp to use for the next page boundary
@spec community_timeline( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns posts from a community.
See GET /v2/communities/{community-handle}/timeline - Get posts from a community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
type: the type of timeline to visit, one of "recent", "polls", "discover"
@spec edit_community( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Edits a community.
See PUT /v2/communities/{community-handle} - Edit your community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
title: the title of the communitydescription: the description of the communitycommunity_name: the handle/URL of the communityprivacy: the privacy level of the community (0 for public, 1 for private)tags: the list of tags ysed to describe the communityabout: more information about the communityguidelines: a list of guidelines that members need to followinvite_links_enabled: whether invite links are enabled for the communityjoin_type: the type of options for joining, one of "invite", "free"
@spec invite_to_community(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Invites a blog to a community.
See PUT /v2/communities/{community-handle}/invitations - Invite someone to the community (on Tumblr) for more information.
Parameters
community: the community handleblogname: the blog to inviteparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
message: a message to send with the invite, max length 100 characters
@spec join_community( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Joins a community.
See PUT /v2/communities/{community-handle}/members - Join a community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
invite_hash: the invite code/hash
@spec leave_community( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Leaves a community.
See DELETE /v2/communities/{community-handle}/members - Leave a community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of Req options
@spec mute_community( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Mutes a community.
See PUT /v2/communities/{community-handle}/mute - Mute a community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of Req options
@spec react_community_post(String.t(), String.t() | integer(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Adds a reaction to a community post.
See PUT /v2/communities/{community-handle}/posts/{post-id}/reactions - Add reaction to post (on Tumblr) for more information.
Parameters
community: the community handlepost_id: the ID of the post to react toparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
slug: a specific slug to use, i.e. :thumbs_up:grapheme: a unicode emoji to use, i.e. 👍
@spec regenerate_community_invite( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Returns an invitation link with a new hash, invalidating the previous one.
See POST /v2/communities/{community-handle}/invite_hash - Regenerate the invite URL} - Cancel an invitation (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of Req options
@spec remove_member(String.t(), String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Removes a member from a community.
See DELETE /v2/communities/{community-handle}/members/{blog-identifier} - Remove a member (on Tumblr) for more information.
Parameters
community: the community handleblogname: the blog to removeparams: a keyword list of endpoint parameters or Req options
Endpoint parameters
reason: the reason for removing the member, one of "community_guidelines", "offtopic", "spam", "inappropriate_behavior", "tumblr_guidelines", "other"note: why the member is being removed, max length 1,000 characters, required ifreasonis "other"ban_user: whether to also ban the user permanently from rejoining
remove_reaction_community_post(community, post_id, reaction_id, params \\ [])
View Source@spec remove_reaction_community_post( String.t(), String.t() | integer(), String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Removes a reaction from a community post.
See DELETE /v2/communities/{community-handle}/posts/{post-id}/reactions/{reaction-id} - Remove reaction from post (on Tumblr) for more information.
Parameters
community: the community handlepost_id: the ID of the post to react toreaction_id: the ID or grapheme of the reaction to removeparams: a keyword list of Req options
@spec unmute_community( String.t(), keyword() ) :: {:ok, map()} | {:error, Tumbloire.Error.t()}
Unmutes a community.
See DELETE /v2/communities/{community-handle}/mute - Unmute a community (on Tumblr) for more information.
Parameters
community: the community handleparams: a keyword list of Req options