gameball 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95b6f1f38aa23e523c6ebb65b53cc5e7025cb2d60a24cd586bb77f89a0424db4
4
- data.tar.gz: b88767ef592e63801ffe9c7c9423641d5518b17521a54c10b89d32e0cb87dad8
3
+ metadata.gz: c963796b732470ad5e917b83f6575c8fad84236e9b576f0456fb850bd18f2c30
4
+ data.tar.gz: 926256461f6b1b9e91ed33cc2d9285528eaa0e308122413614455a294081f7cb
5
5
  SHA512:
6
- metadata.gz: 16f7bc73fbc3c2965f05a158f460c6cdf4188248499ef9c8ef0b2f81df83be80124eae2399f9460250528566fa011b63701bf52543d12ff7a29b2130e5da29c7
7
- data.tar.gz: 797cd765e8ddcae291d9bef2d3263b7ce31381c346dd02f967bde4715c716b31a4a0e93dd73ab0217fae3ab73057f418217765933104648bbdf2a13cf1740480
6
+ metadata.gz: 027c6fe74ce3bf72fc4d020f9ea498a5f71b8c09f001b25590f709f9e7f620540eae545981681f5a9877c508cbada9e2ae0e927c08f55e7c1c98b171c1dbd178
7
+ data.tar.gz: b9673abe94ed0e73bc68cf9d90e960add4737ffae0bb982be39973c4f5c5a42771c738ded4addcd72c150a5126ce2cc2017ccae9d82454cc591f1bd911b72cdc
@@ -1,36 +1,36 @@
1
- PATH
2
- remote: .
3
- specs:
4
- alphaSDK (0.2.8)
5
- rake (>= 12.0)
6
- rspec (>= 3.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- diff-lcs (1.4.4)
12
- rake (12.0.0)
13
- rspec (3.9.0)
14
- rspec-core (~> 3.9.0)
15
- rspec-expectations (~> 3.9.0)
16
- rspec-mocks (~> 3.9.0)
17
- rspec-core (3.9.2)
18
- rspec-support (~> 3.9.3)
19
- rspec-expectations (3.9.2)
20
- diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.9.0)
22
- rspec-mocks (3.9.1)
23
- diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.9.0)
25
- rspec-support (3.9.3)
26
-
27
- PLATFORMS
28
- x64-mingw32
29
-
30
- DEPENDENCIES
31
- alphaSDK!
32
- rake (>= 12.0)
33
- rspec (>= 3.0)
34
-
35
- BUNDLED WITH
36
- 2.1.4
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gameball (1.0.1)
5
+ rake (>= 12.0)
6
+ rspec (>= 3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ diff-lcs (1.4.4)
12
+ rake (12.0.0)
13
+ rspec (3.9.0)
14
+ rspec-core (~> 3.9.0)
15
+ rspec-expectations (~> 3.9.0)
16
+ rspec-mocks (~> 3.9.0)
17
+ rspec-core (3.9.2)
18
+ rspec-support (~> 3.9.3)
19
+ rspec-expectations (3.9.2)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.9.0)
22
+ rspec-mocks (3.9.1)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.9.0)
25
+ rspec-support (3.9.3)
26
+
27
+ PLATFORMS
28
+ x64-mingw32
29
+
30
+ DEPENDENCIES
31
+ gameball!
32
+ rake (>= 12.0)
33
+ rspec (>= 3.0)
34
+
35
+ BUNDLED WITH
36
+ 2.1.4
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  # spec.metadata["allowed_push_host"] = "https://github.com/Alsouidan/alphasdk"
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "http://mygemserver.com"
18
+ spec.metadata["source_code_uri"] = "https://github.com/gameballers/gameball-ruby"
19
19
  spec.metadata["changelog_uri"] = "http://mygemserver.com"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
@@ -17,9 +17,10 @@ require_relative "./gameball/models/referral"
17
17
  require_relative "./gameball/models/coupon"
18
18
  require_relative "./gameball/models/action"
19
19
  require_relative "./gameball/exceptions/gameballException"
20
+ require_relative "./gameball/lang"
20
21
 
21
22
  module Gameball
22
- @api_base = "https://api.gameball.co/"
23
+ @api_base = "https://api.gameball.co"
23
24
  @max_retries = 1
24
25
  @read_timeout = 60
25
26
  @keep_alive_timeout = 30
@@ -0,0 +1,12 @@
1
+ module Gameball
2
+ module Lang
3
+ ENGLISH='en'
4
+ SPANISH='es'
5
+ PORTUGUESE='pt'
6
+ POLISH='pl'
7
+ ITALIAN='it'
8
+ GERMAN='de'
9
+ FRENCH='fr'
10
+ ARABIC='ar'
11
+ end
12
+ end
@@ -20,12 +20,13 @@ module Gameball
20
20
  end
21
21
  else
22
22
  return res
23
+ return res
23
24
  end
24
25
  end
25
- def self.get_player_info(playerUniqueId)
26
+ def self.get_player_info(playerUniqueId,lang="")
26
27
  body = { playerUniqueId: playerUniqueId }
27
28
  body["hash"] = Gameball::Utils::hashBody(playerUniqueId: playerUniqueId)
28
- res = Gameball::Utils::request("post", "/integrations/Player/Info", body)
29
+ res = Gameball::Utils::request("post", "/integrations/Player/Info", body,lang)
29
30
  # Check for HTTP Success and throws error if not success
30
31
  unless res.kind_of? Net::HTTPSuccess
31
32
  if res.kind_of? Net::HTTPInternalServerError
@@ -2,7 +2,7 @@ module Gameball
2
2
  module Utils
3
3
  extend self
4
4
 
5
- def request(verb, path, body = {})
5
+ def request(verb, path, body = {},lang="")
6
6
  # check for api_version and key and throw error if not included
7
7
  if !Gameball.api_key
8
8
  raise Gameball::GameballError.new("Please provide the api_key before making a request, try Gameball::api_key='your_key'")
@@ -30,6 +30,9 @@ module Gameball
30
30
  if body != {}
31
31
  req.body = body.to_json
32
32
  end
33
+ if lang!=""
34
+ req["lang"]=lang
35
+ end
33
36
  req["APIKey"] = Gameball.api_key
34
37
  res = https.request(req)
35
38
  return res
@@ -1,3 +1,3 @@
1
1
  module Gameball
2
- VERSION = "1.0.0" # Version of the SDK
2
+ VERSION = "1.0.1" # Version of the SDK
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameball
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
  - Alsouidan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-19 00:00:00.000000000 Z
11
+ date: 2020-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -61,6 +61,7 @@ files:
61
61
  - gameball.gemspec
62
62
  - lib/gameball.rb
63
63
  - lib/gameball/exceptions/gameballException.rb
64
+ - lib/gameball/lang.rb
64
65
  - lib/gameball/models/action.rb
65
66
  - lib/gameball/models/coupon.rb
66
67
  - lib/gameball/models/event.rb
@@ -76,7 +77,7 @@ licenses:
76
77
  - MIT
77
78
  metadata:
78
79
  homepage_uri: https://www.gameball.co/
79
- source_code_uri: http://mygemserver.com
80
+ source_code_uri: https://github.com/gameballers/gameball-ruby
80
81
  changelog_uri: http://mygemserver.com
81
82
  post_install_message:
82
83
  rdoc_options: []