Class: PUBG::Player::Season
- Inherits:
-
Object
- Object
- PUBG::Player::Season
- Defined in:
- lib/pubg/player/season.rb,
lib/pubg/player/season/data.rb,
lib/pubg/player/season/attributes.rb,
lib/pubg/player/season/data/stats.rb,
lib/pubg/player/season/data/attributes.rb,
lib/pubg/player/season/data/relationships.rb,
lib/pubg/player/season/data/game_mode_stats.rb,
lib/pubg/player/season/data/relationships/player.rb,
lib/pubg/player/season/data/relationships/season.rb,
lib/pubg/player/season/data/relationships/matches.rb
Defined Under Namespace
Classes: Data
Instance Method Summary collapse
- #data ⇒ Object
- #get_season ⇒ Object
-
#initialize(platform_region = $platform_region, player_id, season_id) ⇒ Season
constructor
A new instance of Season.
- #links ⇒ Object
- #meta ⇒ Object
- #original ⇒ Object
Constructor Details
#initialize(platform_region = $platform_region, player_id, season_id) ⇒ Season
Returns a new instance of Season.
6 7 8 9 10 11 12 |
# File 'lib/pubg/player/season.rb', line 6 def initialize(platform_region=$platform_region, player_id, season_id) @platform_region = platform_region @player_id = player_id @season_id = season_id @args = get_season end |
Instance Method Details
#data ⇒ Object
18 19 20 |
# File 'lib/pubg/player/season.rb', line 18 def data Data.new(@args["data"]) end |
#get_season ⇒ Object
30 31 32 33 |
# File 'lib/pubg/player/season.rb', line 30 def get_season path = "/shards/#{@platform_region}/players/#{@player_id}/seasons/#{@season_id}" Client.request(path) end |
#links ⇒ Object
22 23 24 |
# File 'lib/pubg/player/season.rb', line 22 def links Links.new(@args["links"]) end |
#meta ⇒ Object
26 27 28 |
# File 'lib/pubg/player/season.rb', line 26 def @args["meta"] end |
#original ⇒ Object
14 15 16 |
# File 'lib/pubg/player/season.rb', line 14 def original @args end |