valorant_daily_store 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ValorantDailyStore
4
+ VERSION = "1.0.3"
5
+ 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