Class: ValorantDailyStore::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/valorant_daily_store/data.rb

Instance Method Summary collapse

Constructor Details

#initialize(region:, username:, password:, language: "en-US") ⇒ Data

Returns a new instance of Data.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/valorant_daily_store/data.rb', line 9

def initialize(region:, username:, password:, language: "en-US")
  @region = region
  @username = username
  @password = password

  if ValorantDailyStore::VALORANT_API_LANGUAGES.include?(language)
    @language = language
  else
    raise UnsupportedLanguage
  end
end

Instance Method Details

#getObject



21
22
23
24
25
26
27
28
29
# File 'lib/valorant_daily_store/data.rb', line 21

def get
  set_starting_cookies
  get_token
  get_entitlements_token
  get_player_id
  get_skin_ids
  get_offers
  prepare_skins
end