fortniteapi 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fortniteapi/api.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9356d56bb89faa1c7b3c786ba9ca46ec20bdd6e018b6cbc6a85aa31e68aad532
|
4
|
+
data.tar.gz: 3db50bb8c90b4e6807fe742f808f3c1baf0d5c25b8705cbc92abf0b29c3674d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e07b7de916d4898889c2de430289901010a5fefd9b73daf0ff509c523a521cf3f228f61b258fc988c4eaa48481ad28deb3a36afd4f288c930e49d4a749a09261
|
7
|
+
data.tar.gz: 81c63bed578fd95a5aae101406c7f207826f0182e2a0a54456a112d9b51c2fdde7cbe5c7f354af18c7056aefed4a24996b7d64ea8b873c09695aba4fb256b567
|
data/lib/fortniteapi/api.rb
CHANGED
@@ -35,9 +35,11 @@ class FortniteAPI
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def get_creator_code(slug)
|
38
|
-
|
38
|
+
response = HTTParty.get("https://fortnite-api.com/creatorcode/search?slug=#{slug}", :headers => headers)
|
39
39
|
body = JSON.parse(response.body)['data']
|
40
40
|
supportACreator = CreatorCode.new(body['id'], body['slug'], body['displayName'], body['status'], body['verified'])
|
41
|
+
supportACreator
|
42
|
+
end
|
41
43
|
|
42
44
|
def search_cosmetic_id(searchQuery, language='en')
|
43
45
|
response = HTTParty.get("https://fortnite-api.com/cosmetics/br/#{searchQuery}&language=#{language}", :headers => headers)
|
@@ -136,7 +138,7 @@ class FortniteAPI
|
|
136
138
|
for x in daily
|
137
139
|
dailyItem = ShopItem.new(x['regularPrice'], x['finalPrice'], x['isBundle'], x['giftable'], x['refundable'], x['panel'], x['sortPriority'], x['banner'], x['items'])
|
138
140
|
daily_items.push(dailyItem)
|
139
|
-
end
|
141
|
+
end
|
140
142
|
br_store = [featured_items, daily_items]
|
141
143
|
br_store
|
142
144
|
end
|