module Halo

Public Class Methods

custom_slots() click to toggle source
# File lib/alexa_halo/custom_slots.rb, line 2
def self.custom_slots
  File.read(File.expand_path('../../../skills_config/custom_slots.txt', __FILE__))
end
intent_schema() click to toggle source
# File lib/alexa_halo/intent_schema.rb, line 2
def self.intent_schema
  File.read(File.expand_path('../../../skills_config/intent_schema.txt', __FILE__))
end
sample_utterances() click to toggle source
# File lib/alexa_halo/sample_utterances.rb, line 2
def self.sample_utterances
  File.read(File.expand_path('../../../skills_config/sample_utterances.txt', __FILE__))
end

Public Instance Methods

check_headshot() click to toggle source
# File lib/alexa_halo.rb, line 15
def check_headshot
  service_record = get_arena_service_record
end
check_kill_death() click to toggle source
# File lib/alexa_halo.rb, line 10
def check_kill_death
  service_record = get_arena_service_record
  AlexaObjects::Response.new(spoken_response: "Your Kill Death Ratio is currently #{service_record["TotalKills"].to_f/service_record["TotalDeaths"].to_f}").to_json
end
get_arena_service_record() click to toggle source
# File lib/alexa_halo.rb, line 22
def get_arena_service_record
  halo_stats_client.get_arena_service_record(settings.config.halo.gamertag)["Results"].first["Result"]["ArenaStats"]
end
halo_metadata_client() click to toggle source
# File lib/alexa_halo.rb, line 30
def halo_metadata_client
  @halo_metadata_client ||= HaloStats::Metadata.new(api_key: settings.config.halo.api_key)
end
halo_stats_client() click to toggle source
# File lib/alexa_halo.rb, line 26
def halo_stats_client
  @halo_stats_client ||= HaloStats::Stats.new(api_key: settings.config.halo.api_key)
end
last_match() click to toggle source
# File lib/alexa_halo.rb, line 19
def last_match
end