Module: HotsApi

Defined in:
lib/hots_api.rb,
lib/hots_api/fetcher.rb,
lib/hots_api/version.rb,
lib/hots_api/models/model.rb,
lib/hots_api/models/player.rb,
lib/hots_api/models/replay.rb,
lib/hots_api/models/map_translation.rb,
lib/hots_api/models/uploaded_replay.rb,
lib/hots_api/models/hero_translation.rb,
lib/hots_api/repositories/repository.rb,
lib/hots_api/repositories/replay_repository.rb,
lib/hots_api/repositories/map_translation_repository.rb,
lib/hots_api/repositories/hero_translation_repository.rb

Defined Under Namespace

Modules: Models, Repositories Classes: Fetcher

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.fetcherObject



19
20
21
# File 'lib/hots_api.rb', line 19

def self.fetcher
  @fetcher ||= Fetcher.new
end

.get(path, params: {}) ⇒ Object



23
24
25
# File 'lib/hots_api.rb', line 23

def self.get(path, params: {})
  fetcher.get(path, params: params)
end

.hero_translationsObject



35
36
37
# File 'lib/hots_api.rb', line 35

def self.hero_translations
  Repositories::HeroTranslationRepository.new
end

.map_translationsObject



39
40
41
# File 'lib/hots_api.rb', line 39

def self.map_translations
  Repositories::MapTranslationRepository.new
end

.post(path, body: nil, file: nil) ⇒ Object



27
28
29
# File 'lib/hots_api.rb', line 27

def self.post(path, body: nil, file: nil)
  fetcher.post(path, body: body, file: file)
end

.replaysObject



31
32
33
# File 'lib/hots_api.rb', line 31

def self.replays
  Repositories::ReplayRepository.new
end