Class: ChessApi::MonthlyGameArchiveResource

Inherits:
Resource
  • Object
show all
Includes:
InputHelpers
Defined in:
lib/chess_api/resources/monthly_game_archives.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods included from InputHelpers

#downcased_username, #upcased_title_abbreviation

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from ChessApi::Resource

Instance Method Details

#list(username:) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/chess_api/resources/monthly_game_archives.rb', line 5

def list(username:)
  @username = username
  result = get_request("player/#{downcased_username}/games/archives")

  Collection.from_response(
    result,
    key: "archives",
    type: ChessApi::MonthlyGameArchive
  )
end