fortniteapi 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fortniteapi/api.rb +9 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 700b4681c3729c4f8bdaa005fe2c7d3f134836a125ce417fd8abd049f66f927f
4
- data.tar.gz: 41a5a06a220b73cd5a0cbbeb0be7e425b5d755a3b8282ab7710576b4f2bc9d32
3
+ metadata.gz: 2e3e2f27e86720658fc956271dcb50897c5eb48570c8cdc9717b6d20cde7aceb
4
+ data.tar.gz: b9ac72d9c98b6d2d5636136cf9939327206dacbd0a3c398557be7a3626979bd1
5
5
  SHA512:
6
- metadata.gz: 750d663bb67afca3f214d53ff14037b3f3cb701327c8f4424f9e74ae276048b173f7b69f871b2812ecd5748f9694083488eeb5556af09b44ff350d153866c43d
7
- data.tar.gz: 4fc8f8a77b38fa497f005f55e50faceddcbec3b25a5c38c438a9c537a8813da8075b8bdf229483d5533b68a4d5f752e3e29c2da14716f5738b04a8d73a21374e
6
+ metadata.gz: bed51c5ae277e4df54e275df02a27fd13f1b09b09621434d3210f537b7f72c9b4e91e3084c8d5afb5b298172305f48c8a9f482270b47f8302b8b42aafc5c780e
7
+ data.tar.gz: c8677772acd71a067e17fe47bb8153ca4f17c2058a091d56c66eea73f8b77290ddd1502d0373feea610fd5cfc85ea6fbbee175ae54bb421da37652707107c312
@@ -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
- puts 'Warning: Next monday (Dec. 9th) at 8 PM (UTC) every endpoint will require an API-Key, you can get one at: fortnite-api.com.'
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.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: 2019-12-06 00:00:00.000000000 Z
11
+ date: 2020-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty