sightstone 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 2bbca09da54b020c50676bc5ba14b5fb63248657
4
- data.tar.gz: 48d7fd5596597fe8caefe0736f4f6dc601057297
3
+ metadata.gz: b5d8c57f5427cc0a5dfa69689d9ea35f645c6859
4
+ data.tar.gz: c9efffb195cb6df9ca63310b4e3edf92cce912fd
5
5
  SHA512:
6
- metadata.gz: 43555b931a1eb485147753f3fc484e284f3f3290e422ac892f3ab545cae2a0847fce53444d9b061c5c8e2e4e66563d13d490bde5252ad32500c7ba4aa459dffe
7
- data.tar.gz: 73743c2767d414de2e087f88a9c028040e209e06e6aa94ca80cef2b4105446ae1b20e1dbf3a1ae9f6cd8f1e3a3f041c742a8938be98100b44439672d839b3459
6
+ metadata.gz: 1f2870e66e41350f1b57d2e76c3940b09b9838092fc880e1364261de7ee1067cba90e7d68e9dfcef881fc2160657fe4fb380efbd2daa41afa5a63a1943df9d42
7
+ data.tar.gz: 3f0d6d58954730d44fd8631304707fdeee3660ef07c978117527c3b007f09aa18652fd1841c9325ff98ef1315bbbb5830df0a220f60a95afa9b6c2f53decd8d1
@@ -42,6 +42,9 @@ end
42
42
  # Base class for exceptions raised by the gem
43
43
  class SightstoneApiException < Exception; end
44
44
 
45
+ # Raised if no or an invalid api key was passed to the api
46
+ class InvalidApiKeyException < SightstoneApiException; end
47
+
45
48
  # Raised if the given developer cannot be found (api returns http error code 404)
46
49
  class SummonerNotFoundException < SightstoneApiException; end
47
50
 
@@ -28,9 +28,11 @@ class SightstoneBaseModule
28
28
  raise Sightstone::SightstoneConnectionException
29
29
  elsif response_code == 429
30
30
  raise Sightstone::RateLimitExceededException
31
+ elsif response_code == 401
32
+ raise Sightstone::InvalidApiKeyException
31
33
  else
32
34
  raise Sightstone::SightstoneApiException 'Unknown error occured'
33
35
  end
34
36
  end
35
37
 
36
- end
38
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sightstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bauer