Class SkillsGameOnApiClient

GameOnApiClient extension providing additional convenience methods

Hierarchy

  • GameOnApiClient
    • SkillsGameOnApiClient

Index

Constructors

constructor

Properties

Protected apiConfiguration

apiConfiguration: ApiConfiguration

ApiConfiguration instance to provide dependencies for this service client

Methods

addAttempts

  • addAttempts(matchId: string, sessionId: string, xApiKey: string, addAttemptsRequest: AddAttemptsRequest): Promise<AddAttemptsResponse>
  • Parameters

    • matchId: string
    • sessionId: string
    • xApiKey: string
    • addAttemptsRequest: AddAttemptsRequest

    Returns Promise<AddAttemptsResponse>

addPlayerTournament

  • addPlayerTournament(sessionId: string, xApiKey: string, addPlayerTournamentRequest: AddPlayerTournamentRequest): Promise<AddPlayerTournamentResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • addPlayerTournamentRequest: AddPlayerTournamentRequest

    Returns Promise<AddPlayerTournamentResponse>

authPlayer

  • authPlayer(xApiKey: string, authPlayerRequest: AuthPlayerRequest): Promise<AuthPlayerResponse>
  • Parameters

    • xApiKey: string
    • authPlayerRequest: AuthPlayerRequest

    Returns Promise<AuthPlayerResponse>

claimPrizeList

  • claimPrizeList(sessionId: string, xApiKey: string, claimPrizeListRequest: ClaimPrizeListRequest): Promise<ClaimPrizeListResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • claimPrizeListRequest: ClaimPrizeListRequest

    Returns Promise<ClaimPrizeListResponse>

enterMatch

  • enterMatch(matchId: string, sessionId: string, xApiKey: string, enterMatchRequest: EnterMatchRequest): Promise<EnterMatchResponse>
  • Parameters

    • matchId: string
    • sessionId: string
    • xApiKey: string
    • enterMatchRequest: EnterMatchRequest

    Returns Promise<EnterMatchResponse>

enterMatchForPlayer

  • enterMatchForPlayer(enterMatchParams: EnterMatchParams): Promise<EnterMatchResponse>

enterPlayerTournament

  • enterPlayerTournament(sessionId: string, xApiKey: string, tournamentId: string, enterTournamentRequest: EnterTournamentRequest): Promise<EnterTournamentResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • tournamentId: string
    • enterTournamentRequest: EnterTournamentRequest

    Returns Promise<EnterTournamentResponse>

enterTournament

  • enterTournament(sessionId: string, xApiKey: string, tournamentId: string, enterTournamentRequest: EnterTournamentRequest): Promise<EnterTournamentResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • tournamentId: string
    • enterTournamentRequest: EnterTournamentRequest

    Returns Promise<EnterTournamentResponse>

enterTournamentForPlayer

  • enterTournamentForPlayer(enterTournamentParams: EnterTournamentParams): Promise<EnterTournamentResponse>
  • desc

    Enter a tournament for the first time. This finds an open match within the tournament based on the max number of matches per tournament and max number of players per match. In the case of a team tournament, a teamId must be provided when entering.

    Parameters

    Returns Promise<EnterTournamentResponse>

    EnterTournamentResponse

fulfillPrizeList

  • fulfillPrizeList(sessionId: string, xApiKey: string, fulfillPrizeListRequest: FulfillPrizeListRequest): Promise<FulfillPrizeListResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • fulfillPrizeListRequest: FulfillPrizeListRequest

    Returns Promise<FulfillPrizeListResponse>

getCombinationLeaderboards

  • desc

    Retrieves the top-player leaderboard and player-neighbor leaderboard. If the current player is in the top-player leaderboard, then the neighbor leaderboard will be empty.

    Parameters

    • __namedParameters: object
      • matchId: string
      • player: Player
      • playerNeighborsLimit: number
      • topScoresLimit: number

    Returns Promise<CombinationLeaderboard>

    CombinationLeaderboard

getMatchDetails

  • getMatchDetails(matchId: string, sessionId: string, xApiKey: string, playerAttributes?: undefined | string): Promise<GetMatchDetailsResponse>
  • Parameters

    • matchId: string
    • sessionId: string
    • xApiKey: string
    • Optional playerAttributes: undefined | string

    Returns Promise<GetMatchDetailsResponse>

getMatchDetailsForPlayer

  • getMatchDetailsForPlayer(getMatchDetailsParams: GetMatchDetailsParams): Promise<GetMatchDetailsResponse>

getMatchLeaderboard

  • getMatchLeaderboard(matchId: string, xApiKey: string, sessionId?: undefined | string, limit?: undefined | string, currentPlayerNeighbors?: undefined | string, cursor?: undefined | string): Promise<GetMatchLeaderboardResponse>
  • Parameters

    • matchId: string
    • xApiKey: string
    • Optional sessionId: undefined | string
    • Optional limit: undefined | string
    • Optional currentPlayerNeighbors: undefined | string
    • Optional cursor: undefined | string

    Returns Promise<GetMatchLeaderboardResponse>

getMatchLeaderboardForPlayer

  • getMatchLeaderboardForPlayer(getLeaderboardParams: GetLeaderboardParams): Promise<GetMatchLeaderboardResponse>
  • desc

    Get the top n participants for a match with the option to get participant's position in the leaderboard. In the case where the tournament participantType is INDIVIDUAL the leaderboard will be representative of the players and their positions with-in the tournament. If the tournament participantType is TEAM the leaderboard will be representative of the teams and their positions with-in the tournament.

    Parameters

    Returns Promise<GetMatchLeaderboardResponse>

    GetMatchLeaderboardResponse

getMatchList

  • getMatchList(xApiKey: string, sessionId: string, matchType?: undefined | string, limit?: undefined | string, playerAttributes?: undefined | string, period?: undefined | string, filterBy?: undefined | string): Promise<GetMatchListResponse>
  • Parameters

    • xApiKey: string
    • sessionId: string
    • Optional matchType: undefined | string
    • Optional limit: undefined | string
    • Optional playerAttributes: undefined | string
    • Optional period: undefined | string
    • Optional filterBy: undefined | string

    Returns Promise<GetMatchListResponse>

getMatchListForPlayer

  • getMatchListForPlayer(getMatchesParams: GetMatchesParams): Promise<GetMatchListResponse>

getPlayerScore

getPlayerTournamentDetails

  • getPlayerTournamentDetails(sessionId: string, xApiKey: string, tournamentId: string): Promise<GetPlayerTournamentDetailsResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • tournamentId: string

    Returns Promise<GetPlayerTournamentDetailsResponse>

getPlayerTournamentList

  • getPlayerTournamentList(xApiKey: string, sessionId: string, queryBy?: undefined | string, limit?: undefined | string, cursor?: undefined | string, streamingPlatform?: undefined | string, period?: undefined | string, filterBy?: undefined | string): Promise<GetPlayerTournamentListResponse>
  • Parameters

    • xApiKey: string
    • sessionId: string
    • Optional queryBy: undefined | string
    • Optional limit: undefined | string
    • Optional cursor: undefined | string
    • Optional streamingPlatform: undefined | string
    • Optional period: undefined | string
    • Optional filterBy: undefined | string

    Returns Promise<GetPlayerTournamentListResponse>

getPrizeDetails

  • getPrizeDetails(sessionId: string, xApiKey: string, prizeId: string): Promise<GetPrizeDetailsResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • prizeId: string

    Returns Promise<GetPrizeDetailsResponse>

getTeamDetails

  • getTeamDetails(sessionId: string, xApiKey: string, teamId: string): Promise<GetTeamDetailsResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • teamId: string

    Returns Promise<GetTeamDetailsResponse>

getTournamentDetails

  • getTournamentDetails(sessionId: string, tournamentId: string, xApiKey: string, playerAttributes?: undefined | string): Promise<GetTournamentDetailsResponse>
  • Parameters

    • sessionId: string
    • tournamentId: string
    • xApiKey: string
    • Optional playerAttributes: undefined | string

    Returns Promise<GetTournamentDetailsResponse>

getTournamentDetailsForPlayer

getTournamentList

  • getTournamentList(xApiKey: string, sessionId: string, limit?: undefined | string, participantType?: undefined | string, playerAttributes?: undefined | string, period?: undefined | string, filterBy?: undefined | string): Promise<GetTournamentListResponse>
  • Parameters

    • xApiKey: string
    • sessionId: string
    • Optional limit: undefined | string
    • Optional participantType: undefined | string
    • Optional playerAttributes: undefined | string
    • Optional period: undefined | string
    • Optional filterBy: undefined | string

    Returns Promise<GetTournamentListResponse>

getTournamentListForPlayer

  • getTournamentListForPlayer(getTournamentsParams: GetTournamentsParams): Promise<GetTournamentListResponse>
  • desc

    Get the list of tournaments for the desired period optionally filtered by tournament status. This will return both individual and team tournaments unless otherwise filtered.

    Parameters

    Returns Promise<GetTournamentListResponse>

    GetTournamentListResponse

getTournamentsByTitle

  • getTournamentsByTitle(tournamentName: string, player: Player): Promise<GetTournamentListResponseTournament[]>
  • desc

    Retrieves a list of tournaments with the specified title. Useful for recurring tournaments.

    Parameters

    • tournamentName: string

      Name of tournament

    • player: Player

      Basic player representation

    Returns Promise<GetTournamentListResponseTournament[]>

    Array of GetTournamentListResponseTournament.

initializeNewAugmentedPlayer

  • initializeNewAugmentedPlayer(__namedParameters: object): Promise<AugmentedPlayer>

initializeNewPlayer

  • initializeNewPlayer(__namedParameters: object): Promise<Player>
  • desc

    Registers and authenticates a new player.

    Parameters

    • __namedParameters: object
      • appBuildType: "development" | "release"
      • deviceOSType: undefined | "alexa" | "fireos" | "android" | "ios" | "pc" | "mac" | "linux" | "xbox" | "playstation" | "nintendo" | "html"
      • gameApiKey: string

    Returns Promise<Player>

    Player

Protected invoke

  • invoke(method: string, endpoint: string, path: string, pathParams: Map<string, string>, queryParams: Map<string, string>, headerParams: Array<object>, bodyParam: any, errors: Map<number, string>): Promise<any>
  • Invocation wrapper to implement service operations in generated classes

    Parameters

    • method: string

      HTTP method, such as 'POST', 'GET', 'DELETE', etc.

    • endpoint: string

      base API url

    • path: string

      the path pattern with possible placeholders for path parameters in form {paramName}

    • pathParams: Map<string, string>

      path parameters collection

    • queryParams: Map<string, string>

      query parameters collection

    • headerParams: Array<object>

      headers collection

    • bodyParam: any

      if body parameter is present it is provided here, otherwise null or undefined

    • errors: Map<number, string>

      maps recognized status codes to messages

    Returns Promise<any>

matchesMatchIdAttemptsOptions

  • matchesMatchIdAttemptsOptions(): Promise<void>
  • Returns Promise<void>

matchesMatchIdEnterOptions

  • matchesMatchIdEnterOptions(): Promise<void>
  • Returns Promise<void>

matchesMatchIdLeaderboardOptions

  • matchesMatchIdLeaderboardOptions(): Promise<void>
  • Returns Promise<void>

matchesMatchIdOptions

  • matchesMatchIdOptions(): Promise<void>
  • Returns Promise<void>

matchesMatchIdScoreOptions

  • matchesMatchIdScoreOptions(): Promise<void>
  • Returns Promise<void>

matchesOptions

  • matchesOptions(): Promise<void>
  • Returns Promise<void>

playerTournamentsOptions

  • playerTournamentsOptions(): Promise<void>
  • Returns Promise<void>

playerTournamentsTournamentIdEnterOptions

  • playerTournamentsTournamentIdEnterOptions(): Promise<void>
  • Returns Promise<void>

playerTournamentsTournamentIdOptions

  • playerTournamentsTournamentIdOptions(): Promise<void>
  • Returns Promise<void>

playersAuthOptions

  • playersAuthOptions(): Promise<void>
  • Returns Promise<void>

playersOptions

  • playersOptions(): Promise<void>
  • Returns Promise<void>

playersPatch

  • playersPatch(xApiKey: string, sessionId?: undefined | string): Promise<void>
  • Parameters

    • xApiKey: string
    • Optional sessionId: undefined | string

    Returns Promise<void>

playersPut

  • playersPut(sessionId: string, xApiKey: string): Promise<void>
  • Parameters

    • sessionId: string
    • xApiKey: string

    Returns Promise<void>

playersRegisterOptions

  • playersRegisterOptions(): Promise<void>
  • Returns Promise<void>

playersStreamingPlatformAccountLinkingCodeOptions

  • playersStreamingPlatformAccountLinkingCodeOptions(): Promise<void>
  • Returns Promise<void>

prizesClaimOptions

  • prizesClaimOptions(): Promise<void>
  • Returns Promise<void>

prizesFulfillOptions

  • prizesFulfillOptions(): Promise<void>
  • Returns Promise<void>

prizesPrizeIdOptions

  • prizesPrizeIdOptions(): Promise<void>
  • Returns Promise<void>

refreshPlayerSession

  • refreshPlayerSession<U>(__namedParameters: object): Promise<U>
  • desc

    Refresh a player session by retrieving a new sessionId and sessionApiKey from Gameon. If the session has not expired, then do nothing. If the refreshBufferInMinutes is specified, then the session will be refreshed in advance by the specified time in minutes.

    Type parameters

    Parameters

    • __namedParameters: object
      • appBuildType: "development" | "release"
      • deviceOSType: undefined | "alexa" | "fireos" | "android" | "ios" | "pc" | "mac" | "linux" | "xbox" | "playstation" | "nintendo" | "html"
      • gameApiKey: string
      • player: U
      • refreshBufferInMinutes: undefined | number

    Returns Promise<U>

    Player

registerPlayer

  • registerPlayer(xApiKey: string, registerPlayerRequest: RegisterPlayerRequest): Promise<RegisterPlayerResponse>
  • Parameters

    • xApiKey: string
    • registerPlayerRequest: RegisterPlayerRequest

    Returns Promise<RegisterPlayerResponse>

submitScore

  • submitScore(matchId: string, sessionId: string, xApiKey: string, submitScoreRequest: SubmitScoreRequest): Promise<void>
  • Parameters

    • matchId: string
    • sessionId: string
    • xApiKey: string
    • submitScoreRequest: SubmitScoreRequest

    Returns Promise<void>

submitScoreForPlayer

  • desc

    Submit player's score for each match attempt. For a team tournament, the score will contribute to the team that the player is representing. Adds optional convenience functionality to check if the player has entered the match. If not entered, attempts to enter match for player. Makes up to 3 calls to GameOn (getMatchDetails, enterMatch, and submitScore)

    Parameters

    Returns Promise<void>

teamsTeamIdOptions

  • teamsTeamIdOptions(): Promise<void>
  • Returns Promise<void>

tournamentsOptions

  • tournamentsOptions(): Promise<void>
  • Returns Promise<void>

tournamentsTournamentIdEnterOptions

  • tournamentsTournamentIdEnterOptions(): Promise<void>
  • Returns Promise<void>

tournamentsTournamentIdOptions

  • tournamentsTournamentIdOptions(): Promise<void>
  • Returns Promise<void>

updatePlayerTournament

  • updatePlayerTournament(sessionId: string, xApiKey: string, tournamentId: string, updatePlayerTournamentRequest: UpdatePlayerTournamentRequest): Promise<UpdatePlayerTournamentResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • tournamentId: string
    • updatePlayerTournamentRequest: UpdatePlayerTournamentRequest

    Returns Promise<UpdatePlayerTournamentResponse>

updatePlayerTournament_0

  • updatePlayerTournament_0(sessionId: string, xApiKey: string, tournamentId: string, updatePlayerTournamentRequest: UpdatePlayerTournamentRequest): Promise<UpdatePlayerTournamentResponse>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • tournamentId: string
    • updatePlayerTournamentRequest: UpdatePlayerTournamentRequest

    Returns Promise<UpdatePlayerTournamentResponse>

useStreamingPlatformAccountLinkingCode

  • useStreamingPlatformAccountLinkingCode(sessionId: string, xApiKey: string, useStreamingPlatformAccountLinkingCodeRequest: UseStreamingPlatformAccountLinkingCodeRequest): Promise<void>
  • Parameters

    • sessionId: string
    • xApiKey: string
    • useStreamingPlatformAccountLinkingCodeRequest: UseStreamingPlatformAccountLinkingCodeRequest

    Returns Promise<void>

Brought to you with ❤ by the Alexa Games team at Amazon. © 2019, Amazon.com, Inc. or its affiliates. All Rights Reserved.