Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • UsersService

Index

Constructors

constructor

Methods

getAllPosts

  • getAllPosts(username: string): Promise<RemoteReference[]>

getSubscriptions

  • getSubscriptions(id: string): Promise<RemoteReference[]>
  • Fetches an array of references to the communities a user is subscribed to.

    internal

    Parameters

    • id: string

      ID of the user.

    Returns Promise<RemoteReference[]>

    Array of subscribed communities. Empty array if the user does not exist.

subscribe

  • subscribe(userId: string, host: string, communityId: string): Promise<boolean>
  • Allows a user to subscribe to a community. Adds a reference to the subscribed community for the user.

    internal

    Parameters

    • userId: string

      The user subscribing.

    • host: string

      The host of the community.

    • communityId: string

      The id of the community on the federated network.

    Returns Promise<boolean>

    True on success.

unsubscribe

  • unsubscribe(userId: string, host: string, communityId: string): Promise<boolean>
  • Allows a user to unsubscribe from a community. If there is an existing reference to the community, it is removed.

    internal

    Parameters

    • userId: string

      ID of the user.

    • host: string

      The server hosting the community.

    • communityId: string

      The id of the community on the federated network.

    Returns Promise<boolean>

    True on success.

updateProfile

  • updateProfile(id: string, name: string): Promise<boolean>

Generated using TypeDoc