hearthstone_api 1.0.3 → 1.0.4
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/hearthstone_api/configuration.rb +0 -1
- data/lib/hearthstone_api/request.rb +4 -1
- data/lib/hearthstone_api/version.rb +1 -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: 6b72e3ebb5dd9baf9bcfe121bb82f925ed96528a
|
|
4
|
+
data.tar.gz: 133831bea218dd7189bc704b6a4beff825c18151
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99e911911806a8f11425ff60758bb5ee32ee19b1b640ee5d6d6b6ceb4da3964ea645e5f54a139f19e6e0d505614659dddba050e7304a0cddfd26c21539cce10c
|
|
7
|
+
data.tar.gz: b54abd4dd5243e13c77d328fad5914a4dee7222165b967e1d5548fa47c1037f87b4d54f1ea3abce426bc18f73507e74203409435e8e09a3ab21f462778485b79
|
|
@@ -4,13 +4,16 @@ module HearthstoneApi
|
|
|
4
4
|
|
|
5
5
|
def get(path, options = {})
|
|
6
6
|
response = request(:get, path, options)
|
|
7
|
-
raise HearthstoneApi::ResponseError.new unless response.code == 200
|
|
7
|
+
raise HearthstoneApi::ResponseError.new(response["message"]) unless response.code == 200
|
|
8
8
|
return response
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
private
|
|
12
12
|
|
|
13
13
|
def headers
|
|
14
|
+
raise HearthstoneApi::NoApiKeyError
|
|
15
|
+
.new("No API key set.") unless HearthstoneApi.api_key
|
|
16
|
+
|
|
14
17
|
{ "X-Mashape-Key" => HearthstoneApi.api_key }
|
|
15
18
|
end
|
|
16
19
|
|