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 +4 -4
- data/lib/sightstone.rb +3 -0
- data/lib/sightstone/modules/sightstone_base_module.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d8c57f5427cc0a5dfa69689d9ea35f645c6859
|
4
|
+
data.tar.gz: c9efffb195cb6df9ca63310b4e3edf92cce912fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f2870e66e41350f1b57d2e76c3940b09b9838092fc880e1364261de7ee1067cba90e7d68e9dfcef881fc2160657fe4fb380efbd2daa41afa5a63a1943df9d42
|
7
|
+
data.tar.gz: 3f0d6d58954730d44fd8631304707fdeee3660ef07c978117527c3b007f09aa18652fd1841c9325ff98ef1315bbbb5830df0a220f60a95afa9b6c2f53decd8d1
|
data/lib/sightstone.rb
CHANGED
@@ -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
|