megalodon
    Preparing search index...

    Interface MegalodonInterface

    interface MegalodonInterface {
        acceptFollowRequest(id: string): Promise<Response<Relationship>>;
        addAccountsToList(id: string, account_ids: string[]): Promise<Response<{}>>;
        addReactionToAnnouncement(
            id: string,
            name: string,
        ): Promise<Response<Record<never, never>>>;
        blockAccount(id: string): Promise<Response<Relationship>>;
        blockDomain(domain: string): Promise<Response<{}>>;
        bookmarkStatus(id: string): Promise<Response<Status>>;
        cancel(): void;
        cancelScheduledStatus(id: string): Promise<Response<{}>>;
        createApp(
            client_name: string,
            options: Partial<
                { redirect_uris: string; scopes: string[]; website: string },
            >,
        ): Promise<AppData>;
        createEmojiReaction(id: string, emoji: string): Promise<Response<Status>>;
        createFeaturedTag(name: string): Promise<Response<FeaturedTag>>;
        createFilter(
            phrase: string,
            context: string[],
            options?: {
                expires_in?: string;
                irreversible?: boolean;
                whole_word?: boolean;
            },
        ): Promise<Response<Filter>>;
        createList(title: string): Promise<Response<List>>;
        deleteAccountsFromList(
            id: string,
            account_ids: string[],
        ): Promise<Response<{}>>;
        deleteConversation(id: string): Promise<Response<{}>>;
        deleteEmojiReaction(id: string, emoji: string): Promise<Response<Status>>;
        deleteFeaturedTag(id: string): Promise<Response<{}>>;
        deleteFilter(id: string): Promise<Response<Filter>>;
        deleteList(id: string): Promise<Response<{}>>;
        deletePushSubscription(): Promise<Response<{}>>;
        deleteStatus(id: string): Promise<Response<{}>>;
        directStreaming(): Promise<WebSocketInterface>;
        dismissInstanceAnnouncement(
            id: string,
        ): Promise<Response<Record<never, never>>>;
        dismissNotification(id: string): Promise<Response<{}>>;
        dismissNotifications(): Promise<Response<{}>>;
        editStatus(
            id: string,
            options: {
                media_ids?: string[];
                poll?: {
                    expires_in?: number;
                    hide_totals?: boolean;
                    multiple?: boolean;
                    options?: string[];
                };
                sensitive?: boolean;
                spoiler_text?: string;
                status?: string;
            },
        ): Promise<Response<Status>>;
        favouriteStatus(id: string): Promise<Response<Status>>;
        fetchAccessToken(
            client_id: null | string,
            client_secret: string,
            code: string,
            redirect_uri?: string,
        ): Promise<TokenData>;
        followAccount(
            id: string,
            options?: { reblog?: boolean },
        ): Promise<Response<Relationship>>;
        followTag(id: string): Promise<Response<Tag>>;
        getAccount(id: string): Promise<Response<Account>>;
        getAccountFavourites(
            id: string,
            options?: { limit?: number; max_id?: string; since_id?: string },
        ): Promise<Response<Status[]>>;
        getAccountFollowers(
            id: string,
            options?: {
                get_all?: boolean;
                limit?: number;
                max_id?: string;
                since_id?: string;
                sleep_ms?: number;
            },
        ): Promise<Response<Account[]>>;
        getAccountFollowing(
            id: string,
            options?: {
                get_all?: boolean;
                limit?: number;
                max_id?: string;
                since_id?: string;
                sleep_ms?: number;
            },
        ): Promise<Response<Account[]>>;
        getAccountLists(id: string): Promise<Response<List[]>>;
        getAccountsInList(
            id: string,
            options?: { limit?: number; max_id?: string; since_id?: string },
        ): Promise<Response<Account[]>>;
        getAccountStatuses(
            id: string,
            options?: {
                exclude_reblogs?: boolean;
                exclude_replies?: boolean;
                limit?: number;
                max_id?: string;
                min_id?: string;
                only_media?: boolean;
                only_public?: boolean;
                pinned?: boolean;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        getBlocks(
            options?: { limit?: number; max_id?: string; min_id?: string },
        ): Promise<Response<Account[]>>;
        getBookmarks(
            options?: {
                limit?: number;
                max_id?: string;
                min_id?: string;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        getConversationTimeline(
            options?: {
                limit?: number;
                max_id?: string;
                min_id?: string;
                since_id?: string;
            },
        ): Promise<Response<Conversation[]>>;
        getDomainBlocks(
            options?: { limit?: number; max_id?: string; min_id?: string },
        ): Promise<Response<string[]>>;
        getEmojiReaction(id: string, emoji: string): Promise<Response<Reaction>>;
        getEmojiReactions(id: string): Promise<Response<Reaction[]>>;
        getEndorsements(
            options?: { limit?: number; max_id?: string; since_id?: string },
        ): Promise<Response<Account[]>>;
        getFavourites(
            options?: { limit?: number; max_id?: string; min_id?: string },
        ): Promise<Response<Status[]>>;
        getFeaturedTags(): Promise<Response<FeaturedTag[]>>;
        getFilter(id: string): Promise<Response<Filter>>;
        getFilters(): Promise<Response<Filter[]>>;
        getFollowedTags(): Promise<Response<Tag[]>>;
        getFollowRequests(
            limit?: number,
        ): Promise<Response<(Account | FollowRequest)[]>>;
        getHomeTimeline(
            options?: {
                limit?: number;
                local?: boolean;
                max_id?: string;
                min_id?: string;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        getIdentityProof(id: string): Promise<Response<IdentityProof[]>>;
        getInstance(): Promise<Response<Instance>>;
        getInstanceActivity(): Promise<Response<Activity[]>>;
        getInstanceAnnouncements(): Promise<Response<Announcement[]>>;
        getInstanceCustomEmojis(): Promise<Response<Emoji[]>>;
        getInstanceDirectory(
            options?: {
                limit?: number;
                local?: boolean;
                offset?: number;
                order?: "active" | "new";
            },
        ): Promise<Response<Account[]>>;
        getInstancePeers(): Promise<Response<string[]>>;
        getInstanceTrends(limit?: null | number): Promise<Response<Tag[]>>;
        getList(id: string): Promise<Response<List>>;
        getLists(): Promise<Response<List[]>>;
        getListTimeline(
            list_id: string,
            options?: {
                limit?: number;
                max_id?: string;
                min_id?: string;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        getLocalTimeline(
            options?: {
                limit?: number;
                max_id?: string;
                min_id?: string;
                only_media?: boolean;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        getMarkers(
            timeline: string[],
        ): Promise<Response<Marker | Record<never, never>>>;
        getMedia(id: string): Promise<Response<Attachment>>;
        getMutes(
            options?: { limit?: number; max_id?: string; min_id?: string },
        ): Promise<Response<Account[]>>;
        getNotification(id: string): Promise<Response<Notification>>;
        getNotifications(
            options?: {
                account_id?: string;
                exclude_types?: string[];
                limit?: number;
                max_id?: string;
                min_id?: string;
                since_id?: string;
            },
        ): Promise<Response<Notification[]>>;
        getPoll(id: string): Promise<Response<Poll>>;
        getPreferences(): Promise<Response<Preferences>>;
        getPublicTimeline(
            options?: {
                limit?: number;
                max_id?: string;
                min_id?: string;
                only_media?: boolean;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        getPushSubscription(): Promise<Response<PushSubscription>>;
        getRelationship(id: string): Promise<Response<Relationship>>;
        getRelationships(ids: string[]): Promise<Response<Relationship[]>>;
        getScheduledStatus(id: string): Promise<Response<ScheduledStatus>>;
        getScheduledStatuses(
            options?: {
                limit?: number;
                max_id?: string;
                min_id?: string;
                since_id?: string;
            },
        ): Promise<Response<ScheduledStatus[]>>;
        getStatus(id: string): Promise<Response<Status>>;
        getStatusContext(
            id: string,
            options?: { limit?: number; max_id?: string; since_id?: string },
        ): Promise<Response<Context>>;
        getStatusFavouritedBy(id: string): Promise<Response<Account[]>>;
        getStatusRebloggedBy(id: string): Promise<Response<Account[]>>;
        getStatusSource(id: string): Promise<Response<StatusSource>>;
        getSuggestedTags(): Promise<Response<Tag[]>>;
        getSuggestions(limit?: number): Promise<Response<Account[]>>;
        getTag(id: string): Promise<Response<Tag>>;
        getTagTimeline(
            hashtag: string,
            options?: {
                limit?: number;
                local?: boolean;
                max_id?: string;
                min_id?: string;
                only_media?: boolean;
                since_id?: string;
            },
        ): Promise<Response<Status[]>>;
        listStreaming(list_id: string): Promise<WebSocketInterface>;
        localStreaming(): Promise<WebSocketInterface>;
        lookupAccount(acct: string): Promise<Response<Account>>;
        muteAccount(
            id: string,
            notifications: boolean,
        ): Promise<Response<Relationship>>;
        muteStatus(id: string): Promise<Response<Status>>;
        pinAccount(id: string): Promise<Response<Relationship>>;
        pinStatus(id: string): Promise<Response<Status>>;
        postStatus(
            status: string,
            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;
            },
        ): Promise<Response<Status | ScheduledStatus>>;
        publicStreaming(): Promise<WebSocketInterface>;
        readConversation(id: string): Promise<Response<Conversation>>;
        readNotifications(
            options: { id?: string; max_id?: string },
        ): Promise<Response<{}>>;
        reblogStatus(id: string): Promise<Response<Status>>;
        refreshToken(
            client_id: string,
            client_secret: string,
            refresh_token: string,
        ): Promise<TokenData>;
        registerAccount(
            username: string,
            email: string,
            password: string,
            agreement: boolean,
            locale: string,
            reason?: null | string,
        ): Promise<Response<Token>>;
        registerApp(
            client_name: string,
            options: Partial<
                { redirect_uris: string; scopes: string[]; website: string },
            >,
        ): Promise<AppData>;
        rejectFollowRequest(id: string): Promise<Response<Relationship>>;
        removeReactionFromAnnouncement(
            id: string,
            name: string,
        ): Promise<Response<Record<never, never>>>;
        report(
            account_id: string,
            options?: {
                category?: Category;
                comment: string;
                forward?: boolean;
                rule_ids?: number[];
                status_ids?: string[];
            },
        ): Promise<Response<Report>>;
        revokeToken(
            client_id: string,
            client_secret: string,
            token: string,
        ): Promise<Response<{}>>;
        saveMarkers(
            options?: {
                home?: { last_read_id: string };
                notifications?: { last_read_id: string };
            },
        ): Promise<Response<Marker>>;
        scheduleStatus(
            id: string,
            scheduled_at?: null | string,
        ): Promise<Response<ScheduledStatus>>;
        search(
            q: string,
            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";
            },
        ): Promise<Response<Results>>;
        searchAccount(
            q: string,
            options?: {
                following?: boolean;
                limit?: number;
                max_id?: string;
                resolve?: boolean;
                since_id?: string;
            },
        ): Promise<Response<Account[]>>;
        setAccountNote(id: string, note?: string): Promise<Response<Relationship>>;
        streamingURL(): Promise<string>;
        subscribeAccount(id: string): Promise<Response<Relationship>>;
        subscribePushNotification(
            subscription: {
                endpoint: string;
                keys: { auth: string; p256dh: string };
            },
            data?:
                | null
                | {
                    alerts: {
                        favourite?: boolean;
                        follow?: boolean;
                        mention?: boolean;
                        poll?: boolean;
                        reblog?: boolean;
                    };
                },
        ): Promise<Response<PushSubscription>>;
        tagStreaming(tag: string): Promise<WebSocketInterface>;
        unblockAccount(id: string): Promise<Response<Relationship>>;
        unblockDomain(domain: string): Promise<Response<{}>>;
        unbookmarkStatus(id: string): Promise<Response<Status>>;
        unfavouriteStatus(id: string): Promise<Response<Status>>;
        unfollowAccount(id: string): Promise<Response<Relationship>>;
        unfollowTag(id: string): Promise<Response<Tag>>;
        unmuteAccount(id: string): Promise<Response<Relationship>>;
        unmuteStatus(id: string): Promise<Response<Status>>;
        unpinAccount(id: string): Promise<Response<Relationship>>;
        unpinStatus(id: string): Promise<Response<Status>>;
        unreblogStatus(id: string): Promise<Response<Status>>;
        unsubscribeAccount(id: string): Promise<Response<Relationship>>;
        updateCredentials(
            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 };
            },
        ): Promise<Response<Account>>;
        updateFilter(
            id: string,
            phrase: string,
            context: string[],
            options?: {
                expires_in?: string;
                irreversible?: boolean;
                whole_word?: boolean;
            },
        ): Promise<Response<Filter>>;
        updateList(id: string, title: string): Promise<Response<List>>;
        updateMedia(
            id: string,
            options?: {
                description?: string;
                file?: any;
                focus?: string;
                is_sensitive?: boolean;
            },
        ): Promise<Response<Attachment>>;
        updatePushSubscription(
            data?:
                | null
                | {
                    alerts: {
                        favourite?: boolean;
                        follow?: boolean;
                        mention?: boolean;
                        poll?: boolean;
                        reblog?: boolean;
                    };
                },
        ): Promise<Response<PushSubscription>>;
        uploadMedia(
            file: any,
            options?: { description?: string; focus?: string },
        ): Promise<Response<Attachment | AsyncAttachment>>;
        userStreaming(): Promise<WebSocketInterface>;
        verifyAccountCredentials(): Promise<Response<Account>>;
        verifyAppCredentials(): Promise<Response<Application>>;
        votePoll(
            id: string,
            choices: number[],
            status_id?: null | string,
        ): Promise<Response<Poll>>;
    }

    Implemented by

    Index

    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 getAccountsInList getAccountStatuses getBlocks getBookmarks getConversationTimeline getDomainBlocks getEmojiReaction getEmojiReactions getEndorsements getFavourites getFeaturedTags getFilter getFilters getFollowedTags getFollowRequests getHomeTimeline getIdentityProof getInstance getInstanceActivity getInstanceAnnouncements getInstanceCustomEmojis getInstanceDirectory getInstancePeers getInstanceTrends getList getLists getListTimeline 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 setAccountNote 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.

    • Promote a hashtag on your profile.

      Parameters

      • name: string

        Target hashtag name.

      Returns Promise<Response<FeaturedTag>>

      FeaturedTag.

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

      • Optionaloptions: { expires_in?: string; irreversible?: boolean; whole_word?: boolean }
        • Optionalexpires_in?: string

          ISO 8601 Datetime for when the filter expires.

        • Optionalirreversible?: boolean

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

        • Optionalwhole_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;
        }
        • Optionalmedia_ids?: string[]

          Array of Attachment ids.

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

          Poll object.

        • Optionalsensitive?: boolean

          Mark status and attached media as sensitive?

        • Optionalspoiler_text?: string

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

        • Optionalstatus?: 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

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

      • Optionaloptions: { 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.

      • Optionaloptions: { limit?: number; max_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return.

        • Optionalmax_id?: string

          Return results order than ID.

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

      • Optionaloptions: {
            get_all?: boolean;
            limit?: number;
            max_id?: string;
            since_id?: string;
            sleep_ms?: number;
        }
        • Optionalget_all?: boolean
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

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

      • Optionaloptions: {
            get_all?: boolean;
            limit?: number;
            max_id?: string;
            since_id?: string;
            sleep_ms?: number;
        }
        • Optionalget_all?: boolean
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

        • Optionalsleep_ms?: number

      Returns Promise<Response<Account[]>>

      The array of accounts.

    • User lists that you have added this account to.

      Parameters

      • id: string

        The account ID.

      Returns Promise<Response<List[]>>

      The array of lists.

    • View accounts in a list.

      Parameters

      • id: string

        Target list ID.

      • Optionaloptions: { limit?: number; max_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Account[]>>

      Array of accounts.

    • Statuses posted to the given account.

      Parameters

      • id: string

        The account ID.

      • Optionaloptions: {
            exclude_reblogs?: boolean;
            exclude_replies?: boolean;
            limit?: number;
            max_id?: string;
            min_id?: string;
            only_media?: boolean;
            only_public?: boolean;
            pinned?: boolean;
            since_id?: string;
        }
        • Optionalexclude_reblogs?: boolean

          Return statuses which exclude reblogs.

        • Optionalexclude_replies?: boolean

          Return statuses which exclude replies.

        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results newer than ID.

        • Optionalonly_media?: boolean

          Show only statuses with media attached? Defaults to false.

        • Optionalonly_public?: boolean

          Return statuses with public visibility only.

        • Optionalpinned?: boolean

          Return statuses which include pinned statuses.

        • Optionalsince_id?: string

          Return results newer than ID but starting with most recent.

      Returns Promise<Response<Status[]>>

      Account's statuses.

    • View blocked users.

      Parameters

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

      Returns Promise<Response<Account[]>>

      Array of accounts.

    • Statuses the user has bookmarked.

      Parameters

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Status[]>>

      Array of statuses.

    • View all conversations.

      Parameters

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Conversation[]>>

      Array of statuses.

    • View domains the user has blocked.

      Parameters

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

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

      • Optionaloptions: { limit?: number; max_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Account[]>>

      Array of accounts.

    • Statuses the user has favourited.

      Parameters

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

      Returns Promise<Response<Status[]>>

      Array of statuses.

    • Get pending follow requests.

      Parameters

      • Optionallimit: number

        Maximum number of results.

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

      Array of account or follow request.

    • View home timeline.

      Parameters

      • Optionaloptions: {
            limit?: number;
            local?: boolean;
            max_id?: string;
            min_id?: string;
            since_id?: string;
        }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionallocal?: boolean

          Show only local statuses? Defaults to false.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Status[]>>

      Array of statuses.

    • Returns an IdentityProof.

      Parameters

      • id: string

        The account ID.

      Returns Promise<Response<IdentityProof[]>>

      Array of IdentityProof

    • View profile directory.

      Parameters

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

          How many accounts to load. Default 40.

        • Optionallocal?: boolean

          Only return local accounts.

        • Optionaloffset?: number

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

        • Optionalorder?: "active" | "new"

          Order of results.

      Returns Promise<Response<Account[]>>

      Array of accounts.

    • View trending tags.

      Parameters

      • Optionallimit: 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.

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Status[]>>

      Array of statuses.

    • View local timeline.

      Parameters

      • Optionaloptions: {
            limit?: number;
            max_id?: string;
            min_id?: string;
            only_media?: boolean;
            since_id?: string;
        }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalonly_media?: boolean

          Show only statuses with media attached? Defaults to false.

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

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

      Returns Promise<Response<Account[]>>

      Array of accounts.

    • Get all notifications.

      Parameters

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

          Return only notifications received from this account.

        • Optionalexclude_types?: string[]

          Array of types to exclude.

        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Notification[]>>

      Array of notifications.

    • View public timeline.

      Parameters

      • Optionaloptions: {
            limit?: number;
            max_id?: string;
            min_id?: string;
            only_media?: boolean;
            since_id?: string;
        }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalonly_media?: boolean

          Show only statuses with media attached? Defaults to false.

        • Optionalsince_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 a single scheduled status.

      Parameters

      • id: string

        Target status ID.

      Returns Promise<Response<ScheduledStatus>>

      ScheduledStatus.

    • View scheduled statuses.

      Parameters

      • Optionaloptions: { limit?: number; max_id?: string; min_id?: string; since_id?: string }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

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

      • Optionaloptions: { limit?: number; max_id?: string; 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

      • Optionallimit: 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.

      • Optionaloptions: {
            limit?: number;
            local?: boolean;
            max_id?: string;
            min_id?: string;
            only_media?: boolean;
            since_id?: string;
        }
        • Optionallimit?: number

          Max number of results to return. Defaults to 20.

        • Optionallocal?: boolean

          Show only local statuses? Defaults to false.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalmin_id?: string

          Return results immediately newer than ID.

        • Optionalonly_media?: boolean

          Show only statuses with media attached? Defaults to false.

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

      • Optionaloptions: {
            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;
        }
        • Optionalin_reply_to_id?: string

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

        • Optionallanguage?: string

          ISO 639 language code for this status.

        • Optionalmedia_ids?: string[]

          Array of Attachment ids.

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

          Poll object.

        • Optionalquote_id?: string

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

        • Optionalscheduled_at?: string

          ISO 8601 Datetime at which to schedule a status.

        • Optionalsensitive?: boolean

          Mark status and attached media as sensitive?

        • Optionalspoiler_text?: string

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

        • Optionalvisibility?: 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 }

      Returns Promise<Response<{}>>

    • 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

      • Optionalreason: 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.

      • Optionaloptions: {
            category?: Category;
            comment: string;
            forward?: boolean;
            rule_ids?: number[];
            status_ids?: string[];
        }
        • Optionalcategory?: 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.

        • Optionalforward?: boolean

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

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

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

      • Optionaloptions: { home?: { last_read_id: string }; notifications?: { last_read_id: string } }
        • Optionalhome?: { last_read_id: string }

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

        • Optionalnotifications?: { last_read_id: string }

          Marker position of the last read notification ID in notifications.

      Returns Promise<Response<Marker>>

      Marker.

    • Update a scheduled status’s publishing date.

      Parameters

      • id: string

        Target scheduled status ID.

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

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

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

        • Optionalexclude_unreviewed?: boolean

          Filter out unreviewed tags? Defaults to false.

        • Optionalfollowing?: boolean

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

        • Optionallimit?: number

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

        • Optionalmax_id?: string

          Return results older than this id.

        • Optionalmin_id?: string

          Return results immediately newer than this id.

        • Optionaloffset?: number
        • Optionalresolve?: boolean

          Attempt WebFinger lookup. Defaults to false.

        • Optionaltype?: "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.

      • Optionaloptions: {
            following?: boolean;
            limit?: number;
            max_id?: string;
            resolve?: boolean;
            since_id?: string;
        }
        • Optionalfollowing?: boolean
        • Optionallimit?: number

          Max number of results to return. Defaults to 40.

        • Optionalmax_id?: string

          Return results older than ID.

        • Optionalresolve?: boolean
        • Optionalsince_id?: string

          Return results newer than ID.

      Returns Promise<Response<Account[]>>

      The array of accounts.

    • Sets a private note on a user.

      Parameters

      • id: string

        The account ID.

      • Optionalnote: string

        The comment to be set on that user.

      Returns Promise<Response<Relationship>>

      Relationship

    • 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 } }
      • Optionaldata:
            | 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

      • Optionaloptions: {
            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 };
        }
        • Optionalavatar?: string

          Avatar image encoded using multipart/form-data.

        • Optionalbot?: boolean

          Whether the account has a bot flag.

        • Optionaldiscoverable?: boolean

          Whether the account should be shown in the profile directory.

        • Optionaldisplay_name?: string

          The display name to use for the profile.

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

        • Optionalheader?: string

          Header image encoded using multipart/form-data.

        • Optionallocked?: boolean

          Whether manual approval of follow requests is required.

        • Optionalnote?: string

          The account bio.

        • Optionalsource?: { language?: string; privacy?: string; sensitive?: boolean }
          • Optionallanguage?: string

            Default language to use for authored statuses (ISO 6391).

          • Optionalprivacy?: string

            Default post privacy for authored statuses. Can be public, unlisted, or private.

          • Optionalsensitive?: boolean

            Whether to mark authored statuses as sensitive by default.

      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.

      • Optionaloptions: { expires_in?: string; irreversible?: boolean; whole_word?: boolean }
        • Optionalexpires_in?: string

          ISO 8601 Datetime for when the filter expires.

        • Optionalirreversible?: boolean

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

        • Optionalwhole_word?: boolean

          Consider word boundaries?

      Returns Promise<Response<Filter>>

      Filter

    • Update media attachment.

      Parameters

      • id: string

        Target media ID.

      • Optionaloptions: { description?: string; file?: any; focus?: string; is_sensitive?: boolean }
        • Optionaldescription?: string

          A plain-text description of the media.

        • Optionalfile?: any

          The file to be attached, using multipart form data.

        • Optionalfocus?: string

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

        • Optionalis_sensitive?: boolean

          Whether the media is sensitive.

      Returns Promise<Response<Attachment>>

      Attachment

    • Change types of notifications.

      Parameters

      • Optionaldata:
            | 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.

      • Optionaloptions: { description?: string; focus?: string }
        • Optionaldescription?: string

          A plain-text description of the media.

        • Optionalfocus?: 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).

      • Optionalstatus_id: null | string

      Returns Promise<Response<Poll>>

      Poll