Class for clan information.

Hierarchy

Constructors

  • new STClan(tag: string): STClan

Properties

fetched: boolean = false

True if the class was fetched

games?: STGame[]

The last 10 games that this clan participated in.

members?: STClanMember[]

The members of this clan.

points?: number

How many points the clan has. (wins + ties / 2)^2 / totalGames

rank?: number

The rank of this clan among other clans.

rate?: number

The win rate of this clan. (wins + ties / 2) / totalGames

tag: string

The clan's tag.

title?: string

The title of the clan.

website?: string

A link to the clan's website.

winstats?: STWinStats

The statistics on wins, losses, ties, and total games.

Methods

  • Fetches the data from the API, filling out the current object. This should be an asynchronous function.

    Returns

    This object after fetching

    Returns Promise<STClan>

  • isFetched(): boolean
  • Returns

    True if this object is fetched

    Returns boolean

  • Sets properties based on the response sent from a request

    Returns

    This object after setting properties

    Parameters

    • data: any

      The response data from the API

    Returns STClan

  • Get list of all clans with some info sorted by rank

    Returns Promise<STClan[]>

Generated using TypeDoc