craftar 0.0.6 → 0.0.7
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/craftar/base.rb +3 -3
- 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: d2d412343276e8a2c1bbe470fc4bf5fbe8a8eba3
|
|
4
|
+
data.tar.gz: c53b241241242ae7527408423f18882bb5226638
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 476e027bd2b6d675c05a6137f8aefd79311649b3a7175d0718b0be14b085309bebfde400803753c68d4bd682ee4bc3d8f57def5e9172f1ebd1dc696c80dbd137
|
|
7
|
+
data.tar.gz: 0a89555d25fd2f4075c5bd4b71afa468a980bc8e31d5b49d21757d94c75a8c5281bfa49d881fa56eb19709b02a2b6cabd4d716cc60cbc7a99e20a72f398683aa
|
data/lib/craftar/base.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Craftar
|
|
|
17
17
|
# Fetching a page To navigate through pages, use the ‘limit‘ and ‘offset‘ parameters.
|
|
18
18
|
# The objects of the current page are in the 'objects' fields
|
|
19
19
|
def self.list(opts = {})
|
|
20
|
-
response = parse_response(get("/#{craftar_name}/", basic_options
|
|
20
|
+
response = parse_response(get("/#{craftar_name}/", basic_options(opts)))
|
|
21
21
|
raise (response ['error']['message']) if response['error']
|
|
22
22
|
objects = []
|
|
23
23
|
response['objects'].each do |object|
|
|
@@ -50,8 +50,8 @@ module Craftar
|
|
|
50
50
|
private
|
|
51
51
|
|
|
52
52
|
# the basic query option
|
|
53
|
-
def self.basic_options
|
|
54
|
-
{ query: { api_key: Craftar.api_key } }
|
|
53
|
+
def self.basic_options(opts = {})
|
|
54
|
+
{ query: { api_key: Craftar.api_key }.merge(opts) }
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def call(method_name, opts)
|