Module: OneApiSdk::Client::Characters
- Included in:
- OneApiSdk::Client
- Defined in:
- lib/one_api_sdk/characters.rb
Instance Method Summary collapse
-
#character(id, query_params = "") ⇒ Hash
Request one specific character.
-
#character_quotes(id, query_params = "") ⇒ Hash
Request all movie quotes for one specific character (only working for the LotR trilogy).
-
#characters(query_params = "") ⇒ Array<Hash>
List of characters including metadata like name, gender, realm, race and more.
Instance Method Details
#character(id, query_params = "") ⇒ Hash
Request one specific character
23 24 25 26 |
# File 'lib/one_api_sdk/characters.rb', line 23 def character(id,query_params="") response = call_with_token("#{Constants::CHARACTER_BASE_PATH}/#{id}#{query_params}") JSON.parse(response.body) end |
#character_quotes(id, query_params = "") ⇒ Hash
Request all movie quotes for one specific character (only working for the LotR trilogy)
33 34 35 36 |
# File 'lib/one_api_sdk/characters.rb', line 33 def character_quotes(id, query_params="") response = call_with_token("#{Constants::CHARACTER_BASE_PATH}/#{id}/quote#{query_params}") JSON.parse(response.body) end |
#characters(query_params = "") ⇒ Array<Hash>
List of characters including metadata like name, gender, realm, race and more
13 14 15 16 |
# File 'lib/one_api_sdk/characters.rb', line 13 def characters(query_params="") response = call_with_token("#{Constants::CHARACTER_BASE_PATH}#{query_params}") JSON.parse(response.body) end |