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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/craftar/base.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 095464e95ba36fb3b57013f379ea1bb950005ddc
4
- data.tar.gz: 68aa3c015d65c08f5877c2c27c77c0fe68a10706
3
+ metadata.gz: d2d412343276e8a2c1bbe470fc4bf5fbe8a8eba3
4
+ data.tar.gz: c53b241241242ae7527408423f18882bb5226638
5
5
  SHA512:
6
- metadata.gz: b344997f062e7f14f60319286091310baa55d39f7b33ffeaf69235da2848cea39e97928547dc6328d5d8ec0fb277d95e3e08444d90920bc39efac8ad297762fb
7
- data.tar.gz: b9cf9915e1bd8e78131180e156f2c62228dbb6ef112120375244df3263fe9137604ddace346ba034c0ebe291a204b63e4e488fe62684efd0a70c09640dbb5ba5
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.merge(opts)))
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: craftar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marieke Gueye