Constructors

  • Creates an instance of the UserApi class.

    Parameters

    • apiClient: Record<string, any>

      The API client instance used to send requests.

    Returns UserApi

Methods

  • Retrieves detailed information for a specific user by their user ID. Allows for the selection of specific properties to retrieve.

    Parameters

    • userID: number

      The unique identifier of the user.

    • Optionaloptions: string[] = ...

      Optional list of user properties to include in the response.

    Returns Promise<any>

    • A promise resolving to the user details, including the requested properties.
  • Retrieves a ranking list based on a specified ranking type. Allows pagination and selection of the number of entries to return.

    Parameters

    • Optionaltype: string = "globalRank"

      The type of ranking to fetch. Types allowed: "monthRank", "weekRank", "globalRank", "highestMonthRank", "highestWeekRank", "lastMonthRank", "lastWeekRank".

    • Optionalpage: number = 0

      The page number for pagination.

    • OptionalnumEntries: number = 10

      The number of entries to retrieve per page.

    Returns Promise<any>

    • A promise resolving to the ranking data for the selected type.
  • Searches for a user by their username. Optionally allows for an exact match search.

    Parameters

    • username: string

      The username to search for.

    • OptionalexactResult: boolean = false

      Flag to indicate whether the search should return only an exact match.

    Returns Promise<any>

    • A promise resolving to the search results.
  • Sends a private message (PM) to a user.

    Parameters

    • targetUserID: number

      The user ID of the recipient.

    • subject: string

      The subject of the message.

    • body: string

      The body/content of the message.

    Returns Promise<any>

    • A promise resolving to the result of the message sending request.