Method: HalcyonAPI::Client#matches

Defined in:
lib/halcyon_api/client.rb

#matches(filter_params = {}) ⇒ OpenStruct

Gets data from matches (multiple)

Examples:

Get matches

client = VaingloryAPI::Client.new('API_KEY', 'na')
client.matches

Get matches with a filter

client = VaingloryAPI::Client.new('API_KEY', 'na')
client.matches('filter[playerNames]' => 'player_name')

Options Hash (filter_params):

  • 'page[offset]' (String) — default: 0

    Allows paging over results

  • 'page[limit]' (String) — default: 50

    Values less than 50 and great than 2 are supported.

  • 'sort' (String) — default: createdAt

    By default, Matches are sorted by creation time ascending.

  • 'filter[createdAt-start]' (String) — default: 3hrs ago

    Must occur before end time. Format is iso8601

  • 'filter[createdAt-end]' (String) — default: Now

    Queries search the last 3 hrs. Format is iso8601

  • 'filter[playerNames]' (String)

    Filters by player name, separated by commas.

  • 'filter[playerIds]' (String)

    Filters by player Id, separated by commas.

  • 'filter[teamNames]' (String)

    Filters by team names. Team names are the same as the in game team tags.

  • 'filter[gameMode]' (String)

    Filters by Game Mode

See Also:



74
75
76
# File 'lib/halcyon_api/client.rb', line 74

def matches(filter_params = {})
  get_request(shard_endpoint_uri('matches', filter_params))
end