Interface MegalodonInterface

interface MegalodonInterface {
    acceptFollowRequest(id): Promise<Response<Relationship>>;
    addAccountsToList(id, account_ids): Promise<Response<{}>>;
    addReactionToAnnouncement(id, name): Promise<Response<Record<never, never>>>;
    blockAccount(id): Promise<Response<Relationship>>;
    blockDomain(domain): Promise<Response<{}>>;
    bookmarkStatus(id): Promise<Response<Status>>;
    cancel(): void;
    cancelScheduledStatus(id): Promise<Response<{}>>;
    createApp(client_name, options): Promise<AppData>;
    createEmojiReaction(id, emoji): Promise<Response<Status>>;
    createFeaturedTag(name): Promise<Response<FeaturedTag>>;
    createFilter(phrase, context, options?): Promise<Response<Filter>>;
    createList(title): Promise<Response<List>>;
    deleteAccountsFromList(id, account_ids): Promise<Response<{}>>;
    deleteConversation(id): Promise<Response<{}>>;
    deleteEmojiReaction(id, emoji): Promise<Response<Status>>;
    deleteFeaturedTag(id): Promise<Response<{}>>;
    deleteFilter(id): Promise<Response<Filter>>;
    deleteList(id): Promise<Response<{}>>;
    deletePushSubscription(): Promise<Response<{}>>;
    deleteStatus(id): Promise<Response<{}>>;
    directStreaming(): Promise<WebSocketInterface>;
    dismissInstanceAnnouncement(id): Promise<Response<Record<never, never>>>;
    dismissNotification(id): Promise<Response<{}>>;
    dismissNotifications(): Promise<Response<{}>>;
    editStatus(id, options): Promise<Response<Status>>;
    favouriteStatus(id): Promise<Response<Status>>;
    fetchAccessToken(client_id, client_secret, code, redirect_uri?): Promise<TokenData>;
    followAccount(id, options?): Promise<Response<Relationship>>;
    followTag(id): Promise<Response<Tag>>;
    getAccount(id): Promise<Response<Account>>;
    getAccountFavourites(id, options?): Promise<Response<Status[]>>;
    getAccountFollowers(id, options?): Promise<Response<Account[]>>;
    getAccountFollowing(id, options?): Promise<Response<Account[]>>;
    getAccountLists(id): Promise<Response<List[]>>;
    getAccountStatuses(id, options?): Promise<Response<Status[]>>;
    getAccountsInList(id, options?): Promise<Response<Account[]>>;
    getBlocks(options?): Promise<Response<Account[]>>;
    getBookmarks(options?): Promise<Response<Status[]>>;
    getConversationTimeline(options?): Promise<Response<Conversation[]>>;
    getDomainBlocks(options?): Promise<Response<string[]>>;
    getEmojiReaction(id, emoji): Promise<Response<Reaction>>;
    getEmojiReactions(id): Promise<Response<Reaction[]>>;
    getEndorsements(options?): Promise<Response<Account[]>>;
    getFavourites(options?): Promise<Response<Status[]>>;
    getFeaturedTags(): Promise<Response<FeaturedTag[]>>;
    getFilter(id): Promise<Response<Filter>>;
    getFilters(): Promise<Response<Filter[]>>;
    getFollowRequests(limit?): Promise<Response<(Account | FollowRequest)[]>>;
    getFollowedTags(): Promise<Response<Tag[]>>;
    getHomeTimeline(options?): Promise<Response<Status[]>>;
    getIdentityProof(id): Promise<Response<IdentityProof[]>>;
    getInstance(): Promise<Response<Instance>>;
    getInstanceActivity(): Promise<Response<Activity[]>>;
    getInstanceAnnouncements(): Promise<Response<Announcement[]>>;
    getInstanceCustomEmojis(): Promise<Response<Emoji[]>>;
    getInstanceDirectory(options?): Promise<Response<Account[]>>;
    getInstancePeers(): Promise<Response<string[]>>;
    getInstanceTrends(limit?): Promise<Response<Tag[]>>;
    getList(id): Promise<Response<List>>;
    getListTimeline(list_id, options?): Promise<Response<Status[]>>;
    getLists(): Promise<Response<List[]>>;
    getLocalTimeline(options?): Promise<Response<Status[]>>;
    getMarkers(timeline): Promise<Response<Marker | Record<never, never>>>;
    getMedia(id): Promise<Response<Attachment>>;
    getMutes(options?): Promise<Response<Account[]>>;
    getNotification(id): Promise<Response<Notification>>;
    getNotifications(options?): Promise<Response<Notification[]>>;
    getPoll(id): Promise<Response<Poll>>;
    getPreferences(): Promise<Response<Preferences>>;
    getPublicTimeline(options?): Promise<Response<Status[]>>;
    getPushSubscription(): Promise<Response<PushSubscription>>;
    getRelationship(id): Promise<Response<Relationship>>;
    getRelationships(ids): Promise<Response<Relationship[]>>;
    getScheduledStatus(id): Promise<Response<ScheduledStatus>>;
    getScheduledStatuses(options?): Promise<Response<ScheduledStatus[]>>;
    getStatus(id): Promise<Response<Status>>;
    getStatusContext(id, options?): Promise<Response<Context>>;
    getStatusFavouritedBy(id): Promise<Response<Account[]>>;
    getStatusRebloggedBy(id): Promise<Response<Account[]>>;
    getStatusSource(id): Promise<Response<StatusSource>>;
    getSuggestedTags(): Promise<Response<Tag[]>>;
    getSuggestions(limit?): Promise<Response<Account[]>>;
    getTag(id): Promise<Response<Tag>>;
    getTagTimeline(hashtag, options?): Promise<Response<Status[]>>;
    listStreaming(list_id): Promise<WebSocketInterface>;
    localStreaming(): Promise<WebSocketInterface>;
    lookupAccount(acct): Promise<Response<Account>>;
    muteAccount(id, notifications): Promise<Response<Relationship>>;
    muteStatus(id): Promise<Response<Status>>;
    pinAccount(id): Promise<Response<Relationship>>;
    pinStatus(id): Promise<Response<Status>>;
    postStatus(status, options?): Promise<Response<Status | ScheduledStatus>>;
    publicStreaming(): Promise<WebSocketInterface>;
    readConversation(id): Promise<Response<Conversation>>;
    readNotifications(options): Promise<Response<Notification | Notification[]>>;
    reblogStatus(id): Promise<Response<Status>>;
    refreshToken(client_id, client_secret, refresh_token): Promise<TokenData>;
    registerAccount(username, email, password, agreement, locale, reason?): Promise<Response<Token>>;
    registerApp(client_name, options): Promise<AppData>;
    rejectFollowRequest(id): Promise<Response<Relationship>>;
    removeReactionFromAnnouncement(id, name): Promise<Response<Record<never, never>>>;
    report(account_id, options?): Promise<Response<Report>>;
    revokeToken(client_id, client_secret, token): Promise<Response<{}>>;
    saveMarkers(options?): Promise<Response<Marker>>;
    scheduleStatus(id, scheduled_at?): Promise<Response<ScheduledStatus>>;
    search(q, options?): Promise<Response<Results>>;
    searchAccount(q, options?): Promise<Response<Account[]>>;
    streamingURL(): Promise<string>;
    subscribeAccount(id): Promise<Response<Relationship>>;
    subscribePushNotification(subscription, data?): Promise<Response<PushSubscription>>;
    tagStreaming(tag): Promise<WebSocketInterface>;
    unblockAccount(id): Promise<Response<Relationship>>;
    unblockDomain(domain): Promise<Response<{}>>;
    unbookmarkStatus(id): Promise<Response<Status>>;
    unfavouriteStatus(id): Promise<Response<Status>>;
    unfollowAccount(id): Promise<Response<Relationship>>;
    unfollowTag(id): Promise<Response<Tag>>;
    unmuteAccount(id): Promise<Response<Relationship>>;
    unmuteStatus(id): Promise<Response<Status>>;
    unpinAccount(id): Promise<Response<Relationship>>;
    unpinStatus(id): Promise<Response<Status>>;
    unreblogStatus(id): Promise<Response<Status>>;
    unsubscribeAccount(id): Promise<Response<Relationship>>;
    updateCredentials(options?): Promise<Response<Account>>;
    updateFilter(id, phrase, context, options?): Promise<Response<Filter>>;
    updateList(id, title): Promise<Response<List>>;
    updateMedia(id, options?): Promise<Response<Attachment>>;
    updatePushSubscription(data?): Promise<Response<PushSubscription>>;
    uploadMedia(file, options?): Promise<Response<Attachment | AsyncAttachment>>;
    userStreaming(): Promise<WebSocketInterface>;
    verifyAccountCredentials(): Promise<Response<Account>>;
    verifyAppCredentials(): Promise<Response<Application>>;
    votePoll(id, choices, status_id?): Promise<Response<Poll>>;
}

Implemented by

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 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

Methods

  • Accept the follow request.

    Parameters

    • id: string

      Target account ID. Or follow request ID in Friendica.

    Returns Promise<Response<Relationship>>

    Relationship.

  • Add accounts to a list.

    Parameters

    • id: string

      Target list ID.

    • account_ids: string[]

      Array of account IDs to add to the list.

    Returns Promise<Response<{}>>

  • Add a reaction to an announcement.

    Parameters

    • id: string

      The ID of the Announcement in the database.

    • name: string

      Unicode emoji, or the shortcode of a custom emoji.

    Returns Promise<Response<Record<never, never>>>

  • lock the given account. Clients should filter statuses from this account if received.

    Parameters

    • id: string

      The account ID.

    Returns Promise<Response<Relationship>>

    Relationship

  • 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>

  • React to a post with a unicode emoji.

    Parameters

    • id: string

      Target status ID.

    • emoji: string

      Reaction emoji string. This string is raw unicode emoji or custom emoji name (not shortcode).

    Returns Promise<Response<Status>>

    Status.

  • Create a filter.

    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

  • Remove accounts from list.

    Parameters

    • id: string

      Target list ID.

    • account_ids: string[]

      Array of account IDs to add to the list.

    Returns Promise<Response<{}>>

  • Remove a reaction to a post with a unicode emoji.

    Parameters

    • id: string

      Target status ID.

    • emoji: string

      A unicode emoji you want to remove.

    Returns Promise<Response<Status>>

    Status.

  • Dismiss an announcement.

    Parameters

    • id: string

      The ID of the Announcement in the database.

    Returns Promise<Response<Record<never, never>>>

  • Edit a given status to change its text, sensitivity, media attachments, or poll. Note that editing a poll’s options will reset the votes.

    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[]

        Array of Attachment ids.

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

        Poll object.

        • Optional expires_in?: number
        • Optional hide_totals?: boolean
        • Optional multiple?: boolean
        • Optional options?: string[]
      • 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 status?: string

        Text context of status.

    Returns Promise<Response<Status>>

    Status

  • 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

    • Optional redirect_uri: string

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

    Returns Promise<TokenData>

  • Follow the given account. Can also be used to update whether to show reblogs or enable notifications.

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          reblog?: boolean;
      }
      • Optional reblog?: boolean

    Returns Promise<Response<Relationship>>

    Relationship

  • Follow a hashtag. Posts containing a followed hashtag will be inserted into your home timeline.

    Parameters

    • id: string

      Target hashtag id.

    Returns Promise<Response<Tag>>

    Tag

  • Favourites timeline of any user.

    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.

  • Accounts which follow the given account, if network is not hidden by the account owner.

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          get_all?: boolean;
          limit?: number;
          max_id?: string;
          since_id?: string;
          sleep_ms?: number;
      }
      • Optional get_all?: boolean
      • 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.

      • Optional sleep_ms?: number

    Returns Promise<Response<Account[]>>

    The array of accounts.

  • Accounts which the given account is following, if network is not hidden by the account owner.

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          get_all?: boolean;
          limit?: number;
          max_id?: string;
          since_id?: string;
          sleep_ms?: number;
      }
      • Optional get_all?: boolean
      • 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.

      • Optional sleep_ms?: number

    Returns Promise<Response<Account[]>>

    The array of accounts.

  • Statuses posted to the given account.

    Parameters

    • id: string

      The account ID.

    • Optional options: {
          exclude_reblogs?: boolean;
          exclude_replies?: boolean;
          limit?: number;
          max_id?: string;
          min_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 min_id?: string

        Return results newer 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.

  • View accounts in a list.

    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.

  • View blocked users.

    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.

  • Statuses the user has bookmarked.

    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.

  • View all 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.

  • View domains the user has blocked.

    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 an object of emoji to account mappings with accounts that reacted to the post for a specific emoji.

    Parameters

    • id: string

      Target status ID.

    • emoji: string

      A unicode emoji.

    Returns Promise<Response<Reaction>>

    Reaction.

  • Get an object of emoji to account mappings with accounts that reacted to the post.

    Parameters

    • id: string

      Target status ID.

    Returns Promise<Response<Reaction[]>>

    Array of reaction.

  • Accounts that the user is currently featuring on their profile.

    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.

  • Statuses the user has favourited.

    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 pending follow requests.

    Parameters

    • Optional limit: number

      Maximum number of results.

    Returns Promise<Response<(Account | FollowRequest)[]>>

    Array of account or follow request.

  • View home timeline.

    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.

  • View profile 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.

  • View trending tags.

    Parameters

    • Optional limit: null | number

      Maximum number of results to return. Defaults to 10.

    Returns Promise<Response<Tag[]>>

  • View list timeline.

    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.

  • View local timeline.

    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 saved timeline positions.

    Parameters

    • timeline: string[]

    Returns Promise<Response<Marker | Record<never, never>>>

    Marker or empty object.

  • Accounts the user has muted.

    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 all 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.

  • View public timeline.

    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.

  • Find out whether a given account is followed, blocked, muted, etc.

    Parameters

    • id: string

      The account ID.

    Returns Promise<Response<Relationship>>

    Relationship

  • Find out whether given accounts are followed, blocked, muted, etc.

    Parameters

    • ids: string[]

      Array of account IDs.

    Returns Promise<Response<Relationship[]>>

    Array of Relationship.

  • View scheduled statuses.

    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<ScheduledStatus[]>>

    Array of scheduled statuses.

  • Get parent and child statuses in context. View statuses above and below this status in the thread.

    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

  • View status source. Obtain the source properties for a status so that it can be edited.

    Parameters

    • id: string

      The target status id.

    Returns Promise<Response<StatusSource>>

    StatusSource

  • Accounts the user has had past positive interactions with, but is not yet following.

    Parameters

    • Optional limit: number

      Maximum number of results.

    Returns Promise<Response<Account[]>>

    Array of accounts.

  • View hashtag timeline.

    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.

  • Mute the given account. Clients should filter statuses and notifications from this account, if received,

    Parameters

    • id: string

      The account ID.

    • notifications: boolean

      Mute notifications in addition to statuses.

    Returns Promise<Response<Relationship>>

    Relationship

  • Add the given account to the user’s featured profiles.

    Parameters

    • id: string

      The account ID.

    Returns Promise<Response<Relationship>>

    Relationship

  • Publish a status with the given parameters.

    Parameters

    • status: string

      Text content of status.

    • Optional 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?: StatusVisibility;
      }
      • 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?: StatusVisibility

        Visibility of the posted status.

    Returns Promise<Response<Status | ScheduledStatus>>

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

  • Mark as read all unread notifications.

    Parameters

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

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

    Array of notifications

  • 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>

  • Creates a user and account records. Returns an account access token for the app that initiated the request. The app should save this token for later, and should wait for the user to confirm their account by clicking a link in their email inbox.

    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>

  • Reject the follow request.

    Parameters

    • id: string

      Target account ID. Or follow request ID in Friendica.

    Returns Promise<Response<Relationship>>

    Relationship.

  • Remove a reaction from an announcement.

    Parameters

    • id: string

      The ID of the Announcement in the database.

    • name: string

      Unicode emoji, or the shortcode of a custom emoji.

    Returns Promise<Response<Record<never, never>>>

  • File a report.

    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

  • 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<{}>>

  • Save your position in a timeline.

    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.

  • Update a scheduled status’s publishing date.

    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.

  • Perform a 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.

  • Search for matching accounts by username or display name.

    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.

  • Subscribe to receive notifications for all statuses posted by a user.

    Parameters

    • id: string

      Target account ID.

    Returns Promise<Response<Relationship>>

    Relationship.

  • Subscribe to push notifications.

    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.

  • Remove a domain block, if it exists in the user’s array of blocked domains.

    Parameters

    • domain: string

      Domain to unblock

    Returns Promise<Response<{}>>

  • Unfollow a hashtag. Posts containing this hashtag will no longer be inserted into your home timeline.

    Parameters

    • id: string

      Target hashtag id.

    Returns Promise<Response<Tag>>

    Tag

  • Remove the given account from the user’s featured profiles.

    Parameters

    • id: string

      The account ID.

    Returns Promise<Response<Relationship>>

    Relationship

  • Unsubscribe to stop receiving notifications from user statuses.

    Parameters

    • id: string

      Target account ID.

    Returns Promise<Response<Relationship>>

    Relationship.

  • Update the user’s display and preferences.

    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

        Avatar image encoded using multipart/form-data.

      • Optional bot?: boolean

        Whether the account has a bot flag.

      • Optional discoverable?: boolean

        Whether the account should be shown in the profile directory.

      • Optional display_name?: string

        The display name to use for the profile.

      • Optional fields_attributes?: {
            name: string;
            value: string;
        }[]

        The profile fields to be set. Inside this hash, the key is an integer cast to a string (although the exact integer does not matter), and the value is another hash including name and value. By default, max 4 fields.

      • Optional header?: string

        Header image encoded using multipart/form-data.

      • Optional locked?: boolean

        Whether manual approval of follow requests is required.

      • Optional note?: string

        The account bio.

      • Optional source?: {
            language?: string;
            privacy?: string;
            sensitive?: boolean;
        }
        • Optional language?: string
        • Optional privacy?: string
        • Optional sensitive?: boolean

    Returns Promise<Response<Account>>

    An account.

  • Replaces a filter’s parameters in-place.

    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

  • Update media attachment.

    Parameters

    • id: string

      Target media ID.

    • Optional options: {
          description?: string;
          file?: any;
          focus?: string;
          is_sensitive?: boolean;
      }
      • 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.

      • Optional is_sensitive?: boolean

        Whether the media is sensitive.

    Returns Promise<Response<Attachment>>

    Attachment

  • Change types of notifications.

    Parameters

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

    Returns Promise<Response<PushSubscription>>

    PushSubscription.

  • Upload media as an attachment.

    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

  • Vote on a poll.

    Parameters

    • id: string

      Target poll ID.

    • choices: number[]

      Array of own votes containing index for each option (starting from 0).

    • Optional status_id: null | string

    Returns Promise<Response<Poll>>

    Poll