Constructors

Properties

baseUrl: string

Base URL to API requests

blogPosts: BlogPosts<Client> = ...
version: "5.0.0"

Package version

version: "5.0.0" = '5.0.0'

Package version

Methods

  • Gets the avatar URL for a blog

    Parameters

    • blogIdentifier: string

      blog name or URL

    • OptionalsizeOrCallback: TumblrClientCallback | 16 | 24 | 30 | 40 | 48 | 64 | 96 | 128 | 512

      optional data sent with the request

    • OptionalmaybeCallback: TumblrClientCallback

      invoked when the request completes

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the drafts for a blog

    Parameters

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the followers for a blog

    Parameters

    • blogIdentifier: string

      blog name or URL

    • OptionalparamsOrCallback: TumblrClientCallback | { limit?: number; offset?: number }

      optional data sent with the request

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets information about a given blog

    Parameters

    • blogIdentifier: string

      blog name or URL

    • OptionalparamsOrCallback: TumblrClientCallback | { "fields[blogs]"?: string }

      query parameters

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the likes for a blog

    Parameters

    • blogIdentifier: string

      blog name or URL

    • OptionalparamsOrCallback:
          | TumblrClientCallback
          | { after?: number; before?: number; limit?: number; offset?: number }

      optional data sent with the request

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the queue for a blog

    Parameters

    • blogIdentifier: string

      blog name or URL

    • OptionalparamsOrCallback:
          | TumblrClientCallback
          | { filter?: "text"
          | "raw"; limit?: number; offset?: number }

      optional data sent with the request

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the submissions for a blog

    Parameters

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Creates a post on the given blog.

    Parameters

    • blogIdentifier: string

      blog name or URL

    • params: Record<string, any>
    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

    Legacy post creation methods are deprecated. Use NPF methods.

  • Create or reblog an NPF post

    Parameters

    Returns undefined | Promise<any>

    Promise if no callback is provided

    await client.createPost(blogName, {
    content: [
    {
    type: 'image',
    // Node's fs module, e.g. `import fs from 'node:fs';`
    media: fs.createReadStream(new URL('./image.jpg', import.meta.url)),
    alt_text: '…',
    },
    ],
    });
  • Deletes a given post

    Parameters

    • blogIdentifier: string

      blog name or URL

    • postId: string

      Post ID to delete

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Edits a given post

    Parameters

    • blogIdentifier: string

      blog name or URL

    • params: Record<string, any>
    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

    Legacy post creation methods are deprecated. Use NPF methods.

  • Follows a blog as the authenticating user

    Parameters

    • params: { url: string } | { email: string }

      parameters sent with the request

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Performs a GET request

    Parameters

    • apiPath: string

      URL path for the request

    • OptionalparamsOrCallback: Record<string, any> | TumblrClientCallback

      query parameters

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Likes a post as the authenticating user

    Parameters

    • postId: string

      ID of post to like

    • reblogKey: string

      Reblog key of post to like

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Performs a POST request

    Parameters

    • apiPath: string

      URL path for the request

    • OptionalparamsOrCallback: Record<string, any> | TumblrClientCallback
    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback was provided

  • Performs a PUT request

    Parameters

    • apiPath: string

      URL path for the request

    • OptionalparamsOrCallback: Record<string, any> | TumblrClientCallback
    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback was provided

  • Reblogs a given post

    Parameters

    • blogIdentifier: string

      blog name or URL

    • params: Record<string, any>

      parameters sent with the request

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

    Legacy post creation methods are deprecated. Use NPF methods.

  • Returns void

    Promises are returned if no callback is provided

  • Gets posts tagged with the specified tag

    Parameters

    • tag: string

      The tag on the posts you'd like to retrieve

    • OptionalparamsOrCallback: Record<string, any> | TumblrClientCallback

      query parameters

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Unfollows a blog as the authenticating user

    Parameters

    • params: { url: string }

      parameters sent with the request

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Unlikes a post as the authenticating user

    Parameters

    • postId: string

      ID of post to like

    • reblogKey: string

      Reblog key of post to like

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the dashboard posts for the authenticating user

    Parameters

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the blogs the authenticating user follows

    Parameters

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets information about the authenticating user and their blogs

    Parameters

    Returns undefined | Promise<any>

    Promise if no callback is provided

  • Gets the likes for the authenticating user

    Parameters

    • OptionalparamsOrCallback:
          | TumblrClientCallback
          | { after?: number; before?: number; limit?: number; offset?: number }

      query parameters

    • Optionalcallback: TumblrClientCallback

      Deprecated Omit the callback and use the promise form

    Returns undefined | Promise<any>

    Promise if no callback is provided