fortniteapi 0.0.1 → 0.0.2

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 +6 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4de573efd34f764f42f3951df15929b7ffe392eb8340ac50e619416f1e876224
4
- data.tar.gz: '087a5598fa707ed1968b31187456453fe63e898d4c611d2fb498672cd88c8b93'
3
+ metadata.gz: dfbfc95576667a4829786b5abf7644f9f4ab46d7c6e8cdb10b55e4f8599bc0d7
4
+ data.tar.gz: fd6dd6c60e471b3ab039e7d0a7d59720a0a3c6f5c9f7d9638b1ce7641a5cb31a
5
5
  SHA512:
6
- metadata.gz: 480f0ea76b06f2e2dbe23fc1b9961761154739f38337a41932f487700d6d7905d64d93ada459f883054ad22eeb5ba3a3b75addf6f6348ad5c3f4cda6a815a30b
7
- data.tar.gz: b7a9b9621115b49089b6566627b93230a6256a809db03dec603cb1de8728953c886a25688873b2d40913452543ec587d21dd61128c6b6415711096a2b8cc157b
6
+ metadata.gz: bd9caaddc73a25e9df8eb51b9742060345d18484d1fa12f86d75eebb14098179a7f702fe0ff865e2d56330e8f8d43bde24d1e83ceb297d2d4004d1f4dcd2013e
7
+ data.tar.gz: 64fd27d6d83b77efd31bf3c11b806ccddd12971ba55061fff49a0ec495fce2e34eb0b79c5ea3840c15b5262ae390cba32853d8ec0f691839a751f5f901efc4ef
@@ -6,6 +6,7 @@ class FortniteAPI
6
6
  STWNews = Struct.new(:image, :hidden, :messageType, :type, :adspace, :spotlight, :title, :body)
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
+ CreatorCode = Struct.new(:id, :slug, :displayName, :status, :verified)
9
10
 
10
11
  def search_cosmetic(searchQuery, tag='name', language='en', searchLanguage='en')
11
12
  response = HTTParty.get("https://fortnite-api.com/cosmetics/br/search?#{tag}=#{searchQuery}&language=#{language}&searchLanguage=#{searchLanguage}")
@@ -28,6 +29,11 @@ class FortniteAPI
28
29
  end
29
30
  end
30
31
 
32
+ def get_creator_code(slug)
33
+ repsonse = HTTParty.get("https://fortnite-api.com/creatorcode/search?slug=#{slug}")
34
+ body = JSON.parse(response.body)['data']
35
+ supportACreator = CreatorCode.new(body['id'], body['slug'], body['displayName'], body['status'], body['verified'])
36
+
31
37
  def search_cosmetic_id(searchQuery, language='en')
32
38
  response = HTTParty.get("https://fortnite-api.com/cosmetics/br/#{searchQuery}&language=#{language}")
33
39
  body = JSON.parse(response.body)['data']
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: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - xMistt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-20 00:00:00.000000000 Z
11
+ date: 2019-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty