Class Pleroma

Implements

Constructors

Properties

Methods

acceptFollowRequest addAccountsToList addReactionToAnnouncement blockAccount blockDomain bookmarkStatus cancel cancelScheduledStatus createApp createEmojiReaction createFeaturedTag createFilter createList deleteAccountsFromList deleteConversation deleteEmojiReaction deleteFeaturedTag deleteFilter deleteList deletePushSubscription deleteStatus directStreaming dismissInstanceAnnouncement dismissNotification dismissNotifications editStatus favouriteStatus fetchAccessToken followAccount followTag generateAuthUrl getAccount getAccountFavourites getAccountFollowers getAccountFollowing getAccountLists getAccountStatuses getAccountsInList getBlocks getBookmarks getConversationTimeline getDomainBlocks getEmojiReaction getEmojiReactions getEndorsements getFavourites getFeaturedTags getFilter getFilters getFollowRequests getFollowedTags getHomeTimeline getIdentityProof getInstance getInstanceActivity getInstanceAnnouncements getInstanceCustomEmojis getInstanceDirectory getInstancePeers getInstanceTrends getList getListTimeline getLists getLocalTimeline getMarkers getMedia getMutes getNotification getNotifications getPoll getPreferences getPublicTimeline getPushSubscription getRelationship getRelationships getScheduledStatus getScheduledStatuses getStatus getStatusContext getStatusFavouritedBy getStatusRebloggedBy getStatusSource getSuggestedTags getSuggestions getTag getTagTimeline listStreaming localStreaming lookupAccount muteAccount muteStatus pinAccount pinStatus postStatus publicStreaming readConversation readNotifications reblogStatus refreshToken registerAccount registerApp rejectFollowRequest removeReactionFromAnnouncement report revokeToken saveMarkers scheduleStatus search searchAccount streamingURL subscribeAccount subscribePushNotification tagStreaming unblockAccount unblockDomain unbookmarkStatus unfavouriteStatus unfollowAccount unfollowTag unmuteAccount unmuteStatus unpinAccount unpinStatus unreblogStatus unsubscribeAccount updateCredentials updateFilter updateList updateMedia updatePushSubscription uploadMedia userStreaming verifyAccountCredentials verifyAppCredentials votePoll

Constructors

  • Parameters

    • baseUrl: string

      hostname or base URL

    • accessToken: null | string = null

      access token from OAuth2 authorization

    • userAgent: null | string = DEFAULT_UA

      UserAgent is specified in header on request.

    Returns Pleroma

Properties

baseUrl: string
client: Interface

Methods

  • Call /api/v1/apps

    Create an application.

    Parameters

    • client_name: string

      your application's name

    • options: Partial<{
          redirect_uris: string;
          scopes: string[];
          website: string;
      }>

      Form Data

    Returns Promise<AppData>

  • POST /api/v1/filters

    Parameters

    • phrase: string

      Text to be filtered.

    • context: string[]

      Array of enumerable strings home, notifications, public, thread, account. At least one context must be specified.

    • Optional options: {
          expires_in?: string;
          irreversible?: boolean;
          whole_word?: boolean;
      }
      • Optional expires_in?: string

        ISO 8601 Datetime for when the filter expires.

      • Optional irreversible?: boolean

        Should the server irreversibly drop matching entities from home and notifications?

      • Optional whole_word?: boolean

        Consider word boundaries?

    Returns Promise<Response<Filter>>

    Filter

  • PUT /api/v1/statuses/:id * *

    Parameters

    • id: string

      The target status id. *

    • options: {
          media_ids?: string[];
          poll?: {
              expires_in?: number;
              hide_totals?: boolean;
              multiple?: boolean;
              options?: string[];
          };
          sensitive?: boolean;
          spoiler_text?: string;
          status?: string;
      }
      • Optional media_ids?: string[]
      • Optional poll?: {
            expires_in?: number;
            hide_totals?: boolean;
            multiple?: boolean;
            options?: string[];
        }
        • Optional expires_in?: number
        • Optional hide_totals?: boolean
        • Optional multiple?: boolean
        • Optional options?: string[]
      • Optional sensitive?: boolean
      • Optional spoiler_text?: string
      • Optional status?: string

    Returns Promise<Response<Status>>

    Status

  • POST /oauth/token

    Fetch OAuth access token. Get an access token based client_id and client_secret and authorization code.

    Parameters

    • client_id: null | string

      will be generated by #createApp or #registerApp

    • client_secret: string

      will be generated by #createApp or #registerApp

    • code: string

      will be generated by the link of #generateAuthUrl or #registerApp

    • redirect_uri: string = NO_REDIRECT

      must be the same uri as the time when you register your OAuth application

    Returns Promise<TokenData>

  • Generate authorization url using OAuth2.

    Parameters

    • clientId: string

      your OAuth app's client ID

    • clientSecret: string

      your OAuth app's client Secret

    • options: Partial<{
          redirect_uri: null | string;
          scope: string[];
      }>

      as property, redirect_uri and scope are available, and must be the same as when you register your app

    Returns Promise<string>

  • GET /api/v1/pleroma/accounts/:id/favourites

    Parameters

    • id: string

      Target account ID.

    • Optional options: {
          limit?: number;
          max_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return.

      • Optional max_id?: string

        Return results order than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/accounts/:id/followers

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          limit?: number;
          max_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Account[]>>

    The array of accounts.

  • GET /api/v1/accounts/:id/following

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          limit?: number;
          max_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Account[]>>

    The array of accounts.

  • GET /api/v1/accounts/:id/statuses

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          exclude_reblogs?: boolean;
          exclude_replies?: boolean;
          limit?: number;
          max_id?: string;
          only_media?: boolean;
          pinned?: boolean;
          since_id?: string;
      }
      • Optional exclude_reblogs?: boolean

        Return statuses which exclude reblogs.

      • Optional exclude_replies?: boolean

        Return statuses which exclude replies.

      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: string

        Return results older than ID.

      • Optional only_media?: boolean

        Show only statuses with media attached? Defaults to false.

      • Optional pinned?: boolean

        Return statuses which include pinned statuses.

      • Optional since_id?: string

        Return results newer than ID but starting with most recent.

    Returns Promise<Response<Status[]>>

    Account's statuses.

  • GET /api/v1/lists/:id/accounts

    Parameters

    • id: string

      Target list ID.

    • Optional options: {
          limit?: number;
          max_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return.

      • Optional max_id?: string

        Return results older than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Account[]>>

    Array of accounts.

  • GET /api/v1/blocks

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

    Returns Promise<Response<Account[]>>

    Array of accounts.

  • GET /api/v1/bookmarks

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/conversations

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Conversation[]>>

    Array of statuses.

  • GET /api/v1/domain_blocks

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

    Returns Promise<Response<string[]>>

    Array of domain name.

  • GET /api/v1/endorsements

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Account[]>>

    Array of accounts.

  • GET /api/v1/favourites

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/timelines/home

    Parameters

    • Optional options: {
          limit?: number;
          local?: boolean;
          max_id?: string;
          min_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional local?: boolean

        Show only local statuses? Defaults to false.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/directory

    Parameters

    • Optional options: {
          limit?: number;
          local?: boolean;
          offset?: number;
          order?: "active" | "new";
      }
      • Optional limit?: number

        How many accounts to load. Default 40.

      • Optional local?: boolean

        Only return local accounts.

      • Optional offset?: number

        How many accounts to skip before returning results. Default 0.

      • Optional order?: "active" | "new"

        Order of results.

    Returns Promise<Response<Account[]>>

    Array of accounts.

  • GET /api/v1/timelines/list/:list_id

    Parameters

    • list_id: string

      Local ID of the list in the database.

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/timelines/public

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
          only_media?: boolean;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional only_media?: boolean

        Show only statuses with media attached? Defaults to false.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/mutes

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

    Returns Promise<Response<Account[]>>

    Array of accounts.

  • GET /api/v1/notifications

    Parameters

    • Optional options: {
          account_id?: string;
          exclude_types?: string[];
          limit?: number;
          max_id?: string;
          min_id?: string;
          since_id?: string;
      }
      • Optional account_id?: string

        Return only notifications received from this account.

      • Optional exclude_types?: string[]

        Array of types to exclude.

      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Notification[]>>

    Array of notifications.

  • GET /api/v1/timelines/public

    Parameters

    • Optional options: {
          limit?: number;
          max_id?: string;
          min_id?: string;
          only_media?: boolean;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional only_media?: boolean

        Show only statuses with media attached? Defaults to false.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • GET /api/v1/scheduled_statuses

    Parameters

    • Optional options: {
          limit?: null | number;
          max_id?: null | string;
          min_id?: null | string;
          since_id?: null | string;
      }
      • Optional limit?: null | number

        Max number of results to return. Defaults to 20.

      • Optional max_id?: null | string

        Return results older than ID.

      • Optional min_id?: null | string

        Return results immediately newer than ID.

      • Optional since_id?: null | string

        Return results newer than ID.

    Returns Promise<Response<ScheduledStatus[]>>

    Array of scheduled statuses.

  • GET /api/v1/statuses/:id/context

    Get parent and child statuses.

    Parameters

    • id: string

      The target status id.

    • Optional options: {
          limit?: number;
          max_id?: string;
          since_id?: string;
      }
      • Optional limit?: number
      • Optional max_id?: string
      • Optional since_id?: string

    Returns Promise<Response<Context>>

    Context

  • GET /api/v1/timelines/tag/:hashtag

    Parameters

    • hashtag: string

      Content of a #hashtag, not including # symbol.

    • Optional options: {
          limit?: number;
          local?: boolean;
          max_id?: string;
          min_id?: string;
          only_media?: boolean;
          since_id?: string;
      }
      • Optional limit?: number

        Max number of results to return. Defaults to 20.

      • Optional local?: boolean

        Show only local statuses? Defaults to false.

      • Optional max_id?: string

        Return results older than ID.

      • Optional min_id?: string

        Return results immediately newer than ID.

      • Optional only_media?: boolean

        Show only statuses with media attached? Defaults to false.

      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Status[]>>

    Array of statuses.

  • POST /api/v1/statuses

    Parameters

    • status: string

      Text content of status.

    • options: {
          in_reply_to_id?: string;
          language?: string;
          media_ids?: string[];
          poll?: {
              expires_in: number;
              hide_totals?: boolean;
              multiple?: boolean;
              options: string[];
          };
          quote_id?: string;
          scheduled_at?: string;
          sensitive?: boolean;
          spoiler_text?: string;
          visibility?: "direct" | "private" | "public" | "unlisted";
      }
      • Optional in_reply_to_id?: string

        ID of the status being replied to, if status is a reply.

      • Optional language?: string

        ISO 639 language code for this status.

      • Optional media_ids?: string[]

        Array of Attachment ids.

      • Optional poll?: {
            expires_in: number;
            hide_totals?: boolean;
            multiple?: boolean;
            options: string[];
        }

        Poll object.

        • expires_in: number
        • Optional hide_totals?: boolean
        • Optional multiple?: boolean
        • options: string[]
      • Optional quote_id?: string

        ID of the status being quoted to, if status is a quote.

      • Optional scheduled_at?: string

        ISO 8601 Datetime at which to schedule a status.

      • Optional sensitive?: boolean

        Mark status and attached media as sensitive?

      • Optional spoiler_text?: string

        Text to be shown as a warning or subject before the actual content.

      • Optional visibility?: "direct" | "private" | "public" | "unlisted"

        Visibility of the posted status.

    Returns Promise<Response<Status | ScheduledStatus>>

    Status. When options.scheduled_at is present, ScheduledStatus is returned instead.

  • POST /api/v1/pleroma/notifcations/read

    Parameters

    • options: {
          id?: string;
          max_id?: string;
      }
      • Optional id?: string
      • Optional max_id?: string

    Returns Promise<Response<Notification | Notification[]>>

    Array of notifications

  • POST /oauth/token

    Refresh OAuth access token. Send refresh token and get new access token.

    Parameters

    • client_id: string

      will be generated by #createApp or #registerApp

    • client_secret: string

      will be generated by #createApp or #registerApp

    • refresh_token: string

      will be get #fetchAccessToken

    Returns Promise<TokenData>

  • POST /api/v1/accounts

    Parameters

    • username: string

      Username for the account.

    • email: string

      Email for the account.

    • password: string

      Password for the account.

    • agreement: boolean

      Whether the user agrees to the local rules, terms, and policies.

    • locale: string

      The language of the confirmation email that will be sent

    • Optional reason: null | string

      Text that will be reviewed by moderators if registrations require manual approval.

    Returns Promise<Response<Token>>

    An account token.

  • First, call createApp to get client_id and client_secret. Next, call generateAuthUrl to get authorization url.

    Parameters

    • client_name: string

      Form Data, which is sent to /api/v1/apps

    • options: Partial<{
          redirect_uris: string;
          scopes: string[];
          website: string;
      }>

      Form Data, which is sent to /api/v1/apps. and properties should be snake_case

    Returns Promise<AppData>

  • POST /api/v1/reports

    Parameters

    • account_id: string

      Target account ID.

    • Optional options: {
          category?: Category;
          comment: string;
          forward?: boolean;
          rule_ids?: number[];
          status_ids?: string[];
      }
      • Optional category?: Category

        Specify if the report is due to spam, violation of enumerated instance rules, or some other reason. Defaults to other. Will be set to violation if rule_ids[] is provided (regardless of any category value you provide).

      • comment: string

        The reason for the report. Default maximum of 1000 characters.

      • Optional forward?: boolean

        If the account is remote, should the report be forwarded to the remote admin?

      • Optional rule_ids?: number[]

        For violation category reports, specify the ID of the exact rules broken. Rules and their IDs are available via GET /api/v1/instance/rules and GET /api/v1/instance.

      • Optional status_ids?: string[]

        Array of Statuses ids to attach to the report.

    Returns Promise<Response<Report>>

    Report

  • POST /oauth/revoke

    Revoke an OAuth token.

    Parameters

    • client_id: string

      will be generated by #createApp or #registerApp

    • client_secret: string

      will be generated by #createApp or #registerApp

    • token: string

      will be get #fetchAccessToken

    Returns Promise<Response<{}>>

  • POST /api/v1/markers

    Parameters

    • Optional options: {
          home?: {
              last_read_id: string;
          };
          notifications?: {
              last_read_id: string;
          };
      }
      • Optional home?: {
            last_read_id: string;
        }

        Marker position of the last read status ID in home timeline.

        • last_read_id: string
      • Optional notifications?: {
            last_read_id: string;
        }

        Marker position of the last read notification ID in notifications.

        • last_read_id: string

    Returns Promise<Response<Marker>>

    Marker.

  • PUT /api/v1/scheduled_statuses/:id

    Parameters

    • id: string

      Target scheduled status ID.

    • Optional scheduled_at: null | string

      ISO 8601 Datetime at which the status will be published.

    Returns Promise<Response<ScheduledStatus>>

    ScheduledStatus.

  • GET /api/v2/search

    Parameters

    • q: string

      The search query.

    • Optional options: {
          account_id?: string;
          exclude_unreviewed?: boolean;
          following?: boolean;
          limit?: number;
          max_id?: string;
          min_id?: string;
          offset?: number;
          resolve?: boolean;
          type?: "accounts" | "hashtags" | "statuses";
      }
      • Optional account_id?: string

        If provided, statuses returned will be authored only by this account.

      • Optional exclude_unreviewed?: boolean

        Filter out unreviewed tags? Defaults to false.

      • Optional following?: boolean

        Only include accounts that the user is following. Defaults to false.

      • Optional limit?: number

        Maximum number of results to load, per type. Defaults to 20. Max 40.

      • Optional max_id?: string

        Return results older than this id.

      • Optional min_id?: string

        Return results immediately newer than this id.

      • Optional offset?: number
      • Optional resolve?: boolean

        Attempt WebFinger lookup. Defaults to false.

      • Optional type?: "accounts" | "hashtags" | "statuses"

        Enum of search target.

    Returns Promise<Response<Results>>

    Results.

  • GET /api/v1/accounts/search

    Parameters

    • q: string

      Search query.

    • Optional options: {
          following?: boolean;
          limit?: number;
          max_id?: string;
          resolve?: boolean;
          since_id?: string;
      }
      • Optional following?: boolean
      • Optional limit?: number

        Max number of results to return. Defaults to 40.

      • Optional max_id?: string

        Return results older than ID.

      • Optional resolve?: boolean
      • Optional since_id?: string

        Return results newer than ID.

    Returns Promise<Response<Account[]>>

    The array of accounts.

  • POST /api/v1/push/subscription

    Parameters

    • subscription: {
          endpoint: string;
          keys: {
              auth: string;
              p256dh: string;
          };
      }
      • endpoint: string
      • keys: {
            auth: string;
            p256dh: string;
        }
        • auth: string
        • p256dh: string
    • Optional data: null | {
          alerts: {
              favourite?: boolean;
              follow?: boolean;
              mention?: boolean;
              poll?: boolean;
              reblog?: boolean;
          };
      }

    Returns Promise<Response<PushSubscription>>

    PushSubscription.

  • PATCH /api/v1/accounts/update_credentials

    Parameters

    • Optional options: {
          avatar?: string;
          bot?: boolean;
          discoverable?: boolean;
          display_name?: string;
          fields_attributes?: {
              name: string;
              value: string;
          }[];
          header?: string;
          locked?: boolean;
          note?: string;
          source?: {
              language?: string;
              privacy?: string;
              sensitive?: boolean;
          };
      }
      • Optional avatar?: string
      • Optional bot?: boolean
      • Optional discoverable?: boolean
      • Optional display_name?: string
      • Optional fields_attributes?: {
            name: string;
            value: string;
        }[]
      • Optional header?: string
      • Optional locked?: boolean
      • Optional note?: string
      • Optional source?: {
            language?: string;
            privacy?: string;
            sensitive?: boolean;
        }
        • Optional language?: string
        • Optional privacy?: string
        • Optional sensitive?: boolean

    Returns Promise<Response<Account>>

    An account.

  • PUT /api/v1/filters/:id

    Parameters

    • id: string

      The filter ID.

    • phrase: string

      Text to be filtered.

    • context: string[]

      Array of enumerable strings home, notifications, public, thread, account. At least one context must be specified.

    • Optional options: {
          expires_in?: string;
          irreversible?: boolean;
          whole_word?: boolean;
      }
      • Optional expires_in?: string

        ISO 8601 Datetime for when the filter expires.

      • Optional irreversible?: boolean

        Should the server irreversibly drop matching entities from home and notifications?

      • Optional whole_word?: boolean

        Consider word boundaries?

    Returns Promise<Response<Filter>>

    Filter

  • PUT /api/v1/media/:id

    Parameters

    • id: string

      Target media ID.

    • Optional options: {
          description?: string;
          file?: any;
          focus?: string;
      }
      • Optional description?: string

        A plain-text description of the media.

      • Optional file?: any

        The file to be attached, using multipart form data.

      • Optional focus?: string

        Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0.

    Returns Promise<Response<Attachment>>

    Attachment

  • PUT /api/v1/push/subscription

    Parameters

    • Optional data: null | {
          alerts: {
              favourite?: boolean;
              follow?: boolean;
              mention?: boolean;
              poll?: boolean;
              reblog?: boolean;
          };
      }

    Returns Promise<Response<PushSubscription>>

    PushSubscription.

  • POST /api/v2/media

    Parameters

    • file: any

      The file to be attached, using multipart form data.

    • Optional options: {
          description?: string;
          focus?: string;
      }
      • Optional description?: string

        A plain-text description of the media.

      • Optional focus?: string

        Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0.

    Returns Promise<Response<Attachment | AsyncAttachment>>

    Attachment