Sha256: c72b37b604e83263b949ee42ec843ab26b9593a9b59c5e6f4eb9d68cc6332419

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

module Halo
  module HaloWars2
    class Stats < APIResponse

      def initialize(options = {})
        @endpoint = '/stats/hw2'

        super(options)
      end

      def leaderboard_player_csr(season_id, playlist_id, options = {})
        get_data("#{@endpoint}/player-leaderboards/csr/#{season_id}/#{playlist_id}", options)
      end

      def match_events(match_id, options = {})
        get_data("#{@endpoint}/matches/#{match_id}/events", options)
      end

      def match_result(match_id, options = {})
        get_data("#{@endpoint}/matches/#{match_id}", options)
      end

      def player_campaign_progress(player, options = {})
        get_data("#{@endpoint}players/#{player}/campaign-progress", options)
      end

      def player_match_history(player, options = {})
        get_data("#{@endpoint}/players/#{player}/matches", options)
      end

      def player_playlist_ratings(playlist_id, players, options = {})
        get_data("#{@endpoint}/playlist/#{playlist_id}/rating", options.merge(players: players))
      end

      def player_season_stats_summary(player, season_id, options = {})
        get_data("#{@endpoint}/players/#{player}/stats/seasons/#{season_id}", options)
      end

      def player_stats_summary(player, options = {})
        get_data("#{@endpoint}/players/#{player}/stats", options)
      end

      def player_xp(players, options = {})
        get_data("#{@endpoint}/xp", options.merge(players: players))
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
halo-api-0.3.0 lib/halo-api/modules/halo_wars2/stats.rb