Class: ChessApi::TitledPlayerResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/chess_api/resources/titled_players.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from ChessApi::Resource

Instance Method Details

#with_title(title_abbreviation:) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/chess_api/resources/titled_players.rb', line 3

def with_title(title_abbreviation:)
  Collection.from_response(
    get_request("titled/#{title_abbreviation&.upcase}"),
    key: "players",
    type: ChessApi::TitledPlayer
  )
end