pl-api
    Preparing search index...

    Function filteringCategory

    • Parameters

      Returns {
          addFilterKeyword: (
              filterId: string,
              keyword: string,
              whole_word?: boolean,
          ) => Promise<{ id: string; keyword: string; whole_word: boolean }>;
          addFilterStatus: (
              filterId: string,
              statusId: string,
          ) => Promise<{ id: string; status_id: string }>;
          blockAccount: (
              accountId: string,
              params?: BlockAccountParams,
          ) => Promise<
              {
                  blocked_by: boolean;
                  blocking: boolean;
                  domain_blocking: boolean;
                  endorsed: boolean;
                  followed_by: boolean;
                  following: boolean;
                  id: string;
                  languages: string[]
                  | null;
                  muting: boolean;
                  muting_notifications: boolean;
                  note: string;
                  notifying: boolean;
                  requested: boolean;
                  showing_reblogs: boolean;
              },
          >;
          blockDomain: (domain: string) => Promise<EmptyObject>;
          createFilter: (
              params: CreateFilterParams,
          ) => Promise<
              {
                  context: ("account" | "public" | "home" | "notifications" | "thread")[];
                  expires_at: string | null;
                  filter_action: "warn" | "hide" | "blur";
                  id: string;
                  keywords: { id: string; keyword: string; whole_word: boolean }[];
                  statuses: { id: string; status_id: string }[];
                  title: string;
              },
          >;
          deleteFilter: (filterId: string) => Promise<EmptyObject>;
          deleteFilterKeyword: (filterId: string) => Promise<EmptyObject>;
          deleteFilterStatus: (statusId: string) => Promise<EmptyObject>;
          getBlocks: (
              params?: GetBlocksParams,
          ) => Promise<PaginatedResponse<BlockedAccount, true>>;
          getDomainBlocks: (
              params?: PaginationParams,
          ) => Promise<PaginatedResponse<string, true>>;
          getFilter: (
              filterId: string,
          ) => Promise<
              {
                  context: ("account" | "public" | "home" | "notifications" | "thread")[];
                  expires_at: string | null;
                  filter_action: "warn" | "hide" | "blur";
                  id: string;
                  keywords: { id: string; keyword: string; whole_word: boolean }[];
                  statuses: { id: string; status_id: string }[];
                  title: string;
              },
          >;
          getFilterKeyword: (
              filterId: string,
          ) => Promise<{ id: string; keyword: string; whole_word: boolean }>;
          getFilterKeywords: (
              filterId: string,
          ) => Promise<{ id: string; keyword: string; whole_word: boolean }[]>;
          getFilters: () => Promise<
              {
                  context: ("account" | "public" | "home" | "notifications" | "thread")[];
                  expires_at: string | null;
                  filter_action: "warn" | "hide" | "blur";
                  id: string;
                  keywords: { id: string; keyword: string; whole_word: boolean }[];
                  statuses: { id: string; status_id: string }[];
                  title: string;
              }[],
          >;
          getFilterStatus: (
              statusId: string,
          ) => Promise<{ id: string; status_id: string }>;
          getFilterStatuses: (
              filterId: string,
          ) => Promise<{ id: string; status_id: string }[]>;
          getMutes: (
              params?: GetMutesParams,
          ) => Promise<PaginatedResponse<MutedAccount, true>>;
          muteAccount: (
              accountId: string,
              params?: MuteAccountParams,
          ) => Promise<
              {
                  blocked_by: boolean;
                  blocking: boolean;
                  domain_blocking: boolean;
                  endorsed: boolean;
                  followed_by: boolean;
                  following: boolean;
                  id: string;
                  languages: string[]
                  | null;
                  muting: boolean;
                  muting_notifications: boolean;
                  note: string;
                  notifying: boolean;
                  requested: boolean;
                  showing_reblogs: boolean;
              },
          >;
          unblockAccount: (
              accountId: string,
          ) => Promise<
              {
                  blocked_by: boolean;
                  blocking: boolean;
                  domain_blocking: boolean;
                  endorsed: boolean;
                  followed_by: boolean;
                  following: boolean;
                  id: string;
                  languages: string[]
                  | null;
                  muting: boolean;
                  muting_notifications: boolean;
                  note: string;
                  notifying: boolean;
                  requested: boolean;
                  showing_reblogs: boolean;
              },
          >;
          unblockDomain: (domain: string) => Promise<EmptyObject>;
          unmuteAccount: (
              accountId: string,
          ) => Promise<
              {
                  blocked_by: boolean;
                  blocking: boolean;
                  domain_blocking: boolean;
                  endorsed: boolean;
                  followed_by: boolean;
                  following: boolean;
                  id: string;
                  languages: string[]
                  | null;
                  muting: boolean;
                  muting_notifications: boolean;
                  note: string;
                  notifying: boolean;
                  requested: boolean;
                  showing_reblogs: boolean;
              },
          >;
          updateFilter: (
              filterId: string,
              params: UpdateFilterParams,
          ) => Promise<
              {
                  context: ("account" | "public" | "home" | "notifications" | "thread")[];
                  expires_at: string | null;
                  filter_action: "warn" | "hide" | "blur";
                  id: string;
                  keywords: { id: string; keyword: string; whole_word: boolean }[];
                  statuses: { id: string; status_id: string }[];
                  title: string;
              },
          >;
          updateFilterKeyword: (
              filterId: string,
              keyword: string,
              whole_word?: boolean,
          ) => Promise<{ id: string; keyword: string; whole_word: boolean }>;
      }

      • addFilterKeyword: (
            filterId: string,
            keyword: string,
            whole_word?: boolean,
        ) => Promise<{ id: string; keyword: string; whole_word: boolean }>

        Add a keyword to a filter Add the given keyword to the specified filter group

        Requires features['filtersV2'].

      • addFilterStatus: (
            filterId: string,
            statusId: string,
        ) => Promise<{ id: string; status_id: string }>

        Add a status to a filter group Add a status filter to the current filter group.

        Requires features['filtersV2'].

      • blockAccount: (
            accountId: string,
            params?: BlockAccountParams,
        ) => Promise<
            {
                blocked_by: boolean;
                blocking: boolean;
                domain_blocking: boolean;
                endorsed: boolean;
                followed_by: boolean;
                following: boolean;
                id: string;
                languages: string[]
                | null;
                muting: boolean;
                muting_notifications: boolean;
                note: string;
                notifying: boolean;
                requested: boolean;
                showing_reblogs: boolean;
            },
        >

        Block account Block the given account. Clients should filter statuses from this account if received (e.g. due to a boost in the Home timeline)

        https://docs.joinmastodon.org/methods/accounts/#block duration parameter requires featuresFeatures.blocksDuration.

      • blockDomain: (domain: string) => Promise<EmptyObject>

        Block a domain Block a domain to:

        • hide all public posts from it
        • hide all notifications from it
        • remove all followers from it
        • prevent following new users from it (but does not remove existing follows)
      • createFilter: (
            params: CreateFilterParams,
        ) => Promise<
            {
                context: ("account" | "public" | "home" | "notifications" | "thread")[];
                expires_at: string | null;
                filter_action: "warn" | "hide" | "blur";
                id: string;
                keywords: { id: string; keyword: string; whole_word: boolean }[];
                statuses: { id: string; status_id: string }[];
                title: string;
            },
        >

        Create a filter Create a filter group with the given parameters.

        Requires featuresFeatures.filters or features['filtersV2'].

      • deleteFilter: (filterId: string) => Promise<EmptyObject>

        Delete a filter Delete a filter group with the given id.

        Requires featuresFeatures.filters or features['filtersV2'].

      • deleteFilterKeyword: (filterId: string) => Promise<EmptyObject>

        Remove keywords from a filter Deletes the given filter keyword.

        Requires features['filtersV2'].

      • deleteFilterStatus: (statusId: string) => Promise<EmptyObject>

        Remove a status from a filter group Remove a status filter from the current filter group.

        Requires features['filtersV2'].

      • getBlocks: (params?: GetBlocksParams) => Promise<PaginatedResponse<BlockedAccount, true>>

        View blocked users

      • getDomainBlocks: (params?: PaginationParams) => Promise<PaginatedResponse<string, true>>

        Get domain blocks View domains the user has blocked.

      • getFilter: (
            filterId: string,
        ) => Promise<
            {
                context: ("account" | "public" | "home" | "notifications" | "thread")[];
                expires_at: string | null;
                filter_action: "warn" | "hide" | "blur";
                id: string;
                keywords: { id: string; keyword: string; whole_word: boolean }[];
                statuses: { id: string; status_id: string }[];
                title: string;
            },
        >

        View a specific filter Obtain a single filter group owned by the current user.

        Requires featuresFeatures.filters or features['filtersV2'].

      • getFilterKeyword: (
            filterId: string,
        ) => Promise<{ id: string; keyword: string; whole_word: boolean }>

        View a single keyword Get one filter keyword by the given id.

        Requires features['filtersV2'].

      • getFilterKeywords: (
            filterId: string,
        ) => Promise<{ id: string; keyword: string; whole_word: boolean }[]>

        View keywords added to a filter List all keywords attached to the current filter group.

        Requires features['filtersV2'].

      • getFilters: () => Promise<
            {
                context: ("account" | "public" | "home" | "notifications" | "thread")[];
                expires_at: string | null;
                filter_action: "warn" | "hide" | "blur";
                id: string;
                keywords: { id: string; keyword: string; whole_word: boolean }[];
                statuses: { id: string; status_id: string }[];
                title: string;
            }[],
        >

        View all filters Obtain a list of all filter groups for the current user.

        Requires featuresFeatures.filters or features['filtersV2'].

      • getFilterStatus: (statusId: string) => Promise<{ id: string; status_id: string }>

        View a single status filter Obtain a single status filter.

        Requires features['filtersV2'].

      • getFilterStatuses: (filterId: string) => Promise<{ id: string; status_id: string }[]>

        View all status filters Obtain a list of all status filters within this filter group.

        Requires features['filtersV2'].

      • getMutes: (params?: GetMutesParams) => Promise<PaginatedResponse<MutedAccount, true>>

        View muted accounts Accounts the user has muted.

        Requires featuresFeatures.mutes.

      • muteAccount: (
            accountId: string,
            params?: MuteAccountParams,
        ) => Promise<
            {
                blocked_by: boolean;
                blocking: boolean;
                domain_blocking: boolean;
                endorsed: boolean;
                followed_by: boolean;
                following: boolean;
                id: string;
                languages: string[]
                | null;
                muting: boolean;
                muting_notifications: boolean;
                note: string;
                notifying: boolean;
                requested: boolean;
                showing_reblogs: boolean;
            },
        >

        Mute account Mute the given account. Clients should filter statuses and notifications from this account, if received (e.g. due to a boost in the Home timeline).

        Requires featuresFeatures.mutes.

      • unblockAccount: (
            accountId: string,
        ) => Promise<
            {
                blocked_by: boolean;
                blocking: boolean;
                domain_blocking: boolean;
                endorsed: boolean;
                followed_by: boolean;
                following: boolean;
                id: string;
                languages: string[]
                | null;
                muting: boolean;
                muting_notifications: boolean;
                note: string;
                notifying: boolean;
                requested: boolean;
                showing_reblogs: boolean;
            },
        >

        Unblock account Unblock the given account.

      • unblockDomain: (domain: string) => Promise<EmptyObject>

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

      • unmuteAccount: (
            accountId: string,
        ) => Promise<
            {
                blocked_by: boolean;
                blocking: boolean;
                domain_blocking: boolean;
                endorsed: boolean;
                followed_by: boolean;
                following: boolean;
                id: string;
                languages: string[]
                | null;
                muting: boolean;
                muting_notifications: boolean;
                note: string;
                notifying: boolean;
                requested: boolean;
                showing_reblogs: boolean;
            },
        >

        Unmute account Unmute the given account.

        Requires featuresFeatures.mutes.

      • updateFilter: (
            filterId: string,
            params: UpdateFilterParams,
        ) => Promise<
            {
                context: ("account" | "public" | "home" | "notifications" | "thread")[];
                expires_at: string | null;
                filter_action: "warn" | "hide" | "blur";
                id: string;
                keywords: { id: string; keyword: string; whole_word: boolean }[];
                statuses: { id: string; status_id: string }[];
                title: string;
            },
        >

        Update a filter Update a filter group with the given parameters.

        Requires featuresFeatures.filters or features['filtersV2'].

      • updateFilterKeyword: (
            filterId: string,
            keyword: string,
            whole_word?: boolean,
        ) => Promise<{ id: string; keyword: string; whole_word: boolean }>

        Edit a keyword within a filter Update the given filter keyword.

        Requires features['filtersV2'].