Module: RelicLink::Coh3::Api::Endpoints::Matches
- Included in:
- RelicLink::Coh3::Api::Endpoints
- Defined in:
- lib/relic_link/coh3/api/endpoints/matches.rb
Overview
Endpoint definitions for the CoH3 recent matches API.
Instance Method Summary collapse
-
#recent_match_history(options = {}) ⇒ Object
Retrieve the match history information for the given player identifiers.
-
#recent_match_history_by_profile_id(profile_id) ⇒ Object
Retrieve the match history information for the given profile ID.
Instance Method Details
#recent_match_history(options = {}) ⇒ Object
Retrieve the match history information for the given player identifiers. Note that multiple combinations of identifier types (such as profile_ids
and aliases
or aliases
and profile_names
) are technically supported but produce undefined behaviour on Relic’s API. Therefore, it is recommended to choose one identifier type when making requests to this endpoint.
31 32 33 34 35 36 37 |
# File 'lib/relic_link/coh3/api/endpoints/matches.rb', line 31 def recent_match_history( = {}) unless .keys.intersect?(%i[profile_ids aliases profile_names]) raise ArgumentError, 'Missing one of required arguments :profile_ids, :aliases, or :profile_names' end get(stats, 'getRecentMatchHistory', array_params()) end |
#recent_match_history_by_profile_id(profile_id) ⇒ Object
Retrieve the match history information for the given profile ID. Profile ID is an internal Relic player identifier that can be pulled from leaderboard results (such as by calling Leaderboards#leaderboard) or match history results (like #recent_match_history) using other known parameters such as aliases
or profile_names
.
51 52 53 54 55 |
# File 'lib/relic_link/coh3/api/endpoints/matches.rb', line 51 def recent_match_history_by_profile_id(profile_id) raise ArgumentError, 'Required argument :profile_id missing' if profile_id.nil? get(stats, 'getRecentMatchHistoryByProfileId', { profile_id: }) end |