Constructors

  • Creates an instance of the UtilApi class.

    Parameters

    • apiClient: Record<string, any>

      The API client instance used to send requests.

    Returns UtilApi

Methods

  • Retrieves content items for a specific language. This method fetches the content items by first searching for a game and then getting its associated items. This way, items are more complete in regards of data and are also already properly organized.

    Parameters

    • Optionallang: string = "en"

      The language for which to retrieve the complete content items (default is English).

    Returns Promise<any>

    • A promise resolving to the complete content items associated with the game.
  • Retrieves content items for a specific language. The content items include various game elements such as units, upgrades, ranks, awards, etc.

    Parameters

    • Optionallang: string = "en"

      The language for which to retrieve the content items (default is English).

    Returns Promise<any>

    • A promise resolving to the content items in the specified language.
  • Loads the complete content items and stores them in the contentItems property. This method calls getCompleteContentItems and updates the contentItems state.

    Parameters

    • Optionallang: string = "en"

      The language for which to load the complete content items (default is English).

    Returns Promise<Record<string, any>>

    • A promise resolving to the loaded content items.