Class: Smiten::Paladins

Inherits:
Core
  • Object
show all
Defined in:
lib/smiten/paladins.rb

Overview

The Paladins class implements those calls that are specific to the Paladins endpoint

Instance Attribute Summary

Attributes inherited from Core

#authKey, #calls, #connector, #developerId, #language_code, #portal_id

Instance Method Summary collapse

Methods inherited from Core

#boilerplate, #core_api, #for_champion, #get, #in_language, #incept, #session_id, #signature, #textify, #timestamp

Constructor Details

#initialize(options) ⇒ Paladins

See Core for details



5
6
7
# File 'lib/smiten/paladins.rb', line 5

def initialize(options)
  super(options)
end

Instance Method Details

#build_apisObject

:nodoc:



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/smiten/paladins.rb', line 9

def build_apis # :nodoc:
  # Obsolete: get_champion_recommended_items: [nil,            -> { "#{boilerplate('getchampionrecommendeditems')}/#{champion_id}/#{language_code}" }, {champion_id: 2056}],
  @calls = {
    get_champions:                          ['Champion',     -> { "#{boilerplate('getchampions')}/#{language_code}" }],
    get_champion_cards:                     ['ChampionCard', -> { "#{boilerplate('getchampioncards')}/#{champion_id}/#{language_code}" }],
    get_champion_skins:                     ['ChampionSkin', -> { "#{boilerplate('getchampionskins')}/#{champion_id}/#{language_code}" }],
    get_champion_leaderboard:               [nil,            -> { "#{boilerplate('getchampionleaderboard')}/#{champion_id}/#{queue_id}" }],
    get_champion_ranks:                     [nil,            -> { "#{boilerplate('getchampionranks')}/#{player_id}" }],
    get_player_id_info_for_xbox_and_switch: [nil,            -> { "#{boilerplate('getplayeridinfoforxboxandswitch')}/#{player_name}" }],
    get_player_loadouts:                    [nil,            -> { "#{boilerplate('getplayerloadouts')}/#{player_id}/#{language_code}" }],
  }
  super
end