fortniteapi 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fortniteapi/api.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e3e2f27e86720658fc956271dcb50897c5eb48570c8cdc9717b6d20cde7aceb
|
4
|
+
data.tar.gz: b9ac72d9c98b6d2d5636136cf9939327206dacbd0a3c398557be7a3626979bd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bed51c5ae277e4df54e275df02a27fd13f1b09b09621434d3210f537b7f72c9b4e91e3084c8d5afb5b298172305f48c8a9f482270b47f8302b8b42aafc5c780e
|
7
|
+
data.tar.gz: c8677772acd71a067e17fe47bb8153ca4f17c2058a091d56c66eea73f8b77290ddd1502d0373feea610fd5cfc85ea6fbbee175ae54bb421da37652707107c312
|
data/lib/fortniteapi/api.rb
CHANGED
@@ -7,13 +7,14 @@ class FortniteAPI
|
|
7
7
|
CreativeNews = Struct.new(:image, :hidden, :messageType, :type, :adspace, :spotlight, :title, :body)
|
8
8
|
ShopItem = Struct.new(:regularPrice, :finalPrice, :isBundle, :giftable, :refundable, :panel, :sortPriority, :banner, :items)
|
9
9
|
CreatorCode = Struct.new(:id, :slug, :displayName, :status, :verified)
|
10
|
+
AES = Struct.new(:aes, :build, :lastUpdate)
|
10
11
|
|
11
12
|
def initialize(apikey=nil)
|
12
13
|
@apikey = apikey
|
13
14
|
@headers = {"x-api-key" => @apikey}
|
14
15
|
|
15
16
|
if apikey == nil
|
16
|
-
|
17
|
+
raise 'Not API key provided, this is now required. You can get one at: fortnite-api.com.'
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
@@ -146,4 +147,11 @@ class FortniteAPI
|
|
146
147
|
br_store = [featured_items, daily_items]
|
147
148
|
br_store
|
148
149
|
end
|
150
|
+
|
151
|
+
def get_aes()
|
152
|
+
response = HTTParty.get("https://fortnite-api.com/aes", :headers => @headers)
|
153
|
+
data = JSON.parse(response.body)['data']
|
154
|
+
aes = AES.new(data['aes'], data['build'], x['lastUpdate'])
|
155
|
+
aes
|
156
|
+
end
|
149
157
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fortniteapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xMistt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|