Interface NotificationsUnreadCountResource

interface NotificationsUnreadCountResource {
    fetch(
        params?: mastodon.rest.v2.FetchUnreadCountParams,
        meta?: HttpMetaParams<"none">,
    ): Promise<{ count: number }>;
}

Methods

Methods

  • Get the (capped) number of unread notification groups for the current user. A notification is considered unread if it is more recent than the notifications read marker. Because the count is dependant on the parameters, it is computed every time and is thus a relatively slow operation (although faster than getting the full corresponding notifications), therefore the number of returned notifications is capped.

    Parameters

    Returns Promise<{ count: number }>