valorant_daily_store 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.commitlintrc.json +3 -0
- data/.husky/commit-msg +4 -0
- data/.husky/pre-commit +4 -0
- data/.rspec +3 -0
- data/.standard.yml +2 -0
- data/.tool-versions +1 -0
- data/.versionrc.json +24 -0
- data/.vscode/settings.json +4 -0
- data/CHANGELOG.md +52 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +100 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +10 -0
- data/bin/console +12 -0
- data/bin/setup +9 -0
- data/bin/valorant_daily_store +5 -0
- data/gem-version-updater.js +16 -0
- data/gemfile-lock-updater.js +16 -0
- data/lib/valorant_daily_store/cli.rb +25 -0
- data/lib/valorant_daily_store/consts.rb +3 -0
- data/lib/valorant_daily_store/data.rb +163 -0
- data/lib/valorant_daily_store/errors.rb +49 -0
- data/lib/valorant_daily_store/skin.rb +26 -0
- data/lib/valorant_daily_store/version.rb +5 -0
- data/lib/valorant_daily_store.rb +10 -0
- data/package-lock.json +5070 -0
- data/package.json +26 -0
- data/sig/valorant_daily_store.rbs +4 -0
- data/valorant_daily_store.gemspec +42 -0
- data/vcr_cassettes/entitlements_token_could_not_be_acquired.json +127 -0
- data/vcr_cassettes/everything_went_fine.json +530 -0
- data/vcr_cassettes/offers_could_not_be_acquired.json +274 -0
- data/vcr_cassettes/player_id_could_not_be_acquired.json +175 -0
- data/vcr_cassettes/skin_ids_could_not_be_acquired.json +231 -0
- data/vcr_cassettes/username_or_password_is_invalid.json +123 -0
- data/vcr_cassettes/valorant_api_fail.json +530 -0
- metadata +224 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
module ValorantDailyStore
|
2
|
+
class UnsupportedLanguage < StandardError
|
3
|
+
def message
|
4
|
+
"Unsupported language was specified"
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
class AuthorizationCookiesError < StandardError
|
9
|
+
def message
|
10
|
+
"Couldn't get the authorization cookies"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class AuthorizaionTokenError < StandardError
|
15
|
+
def message
|
16
|
+
"Couldn't get the authorization token"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class EntitlementsTokenError < StandardError
|
21
|
+
def message
|
22
|
+
"Couldn't get the entitlements token"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class PlayerIdError < StandardError
|
27
|
+
def message
|
28
|
+
"Couldn't get the player id"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class SkinIdsError < StandardError
|
33
|
+
def message
|
34
|
+
"Couldn't get the skin ids"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class OffersError < StandardError
|
39
|
+
def message
|
40
|
+
"Couldn't get the offers"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class ValorantApiError < StandardError
|
45
|
+
def message
|
46
|
+
"Couldn't connect to Valorant API"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "pry"
|
2
|
+
module ValorantDailyStore
|
3
|
+
class Skin
|
4
|
+
def initialize(name:, price:, photo:, video:)
|
5
|
+
@name = name
|
6
|
+
@price = price
|
7
|
+
@photo = photo
|
8
|
+
@video = video
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_hash
|
12
|
+
{
|
13
|
+
name:,
|
14
|
+
price:,
|
15
|
+
photo:,
|
16
|
+
video:
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_json(...)
|
21
|
+
to_hash.to_json(...)
|
22
|
+
end
|
23
|
+
|
24
|
+
attr_reader :name, :price, :photo, :video
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "valorant_daily_store/version"
|
4
|
+
require_relative "valorant_daily_store/data"
|
5
|
+
|
6
|
+
module ValorantDailyStore
|
7
|
+
def self.get_data(username:, password:, region:, language: "en-US")
|
8
|
+
Data.new(username:, password:, region:, language:).get
|
9
|
+
end
|
10
|
+
end
|