bigcartel-api 0.0.7 → 0.0.8

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: b2e125ff6e65c7b9e133e0afe76b74b006d9761f
4
- data.tar.gz: 298c4ff76d5af603f0db659e33aaa3c66f5ee04e
3
+ metadata.gz: 7c2d577abd0daa78c7f5feab0d1bbd1d0e4a0d1d
4
+ data.tar.gz: 20415862d8dc921deb423ced0c91d114cb29db6d
5
5
  SHA512:
6
- metadata.gz: b6e37f63f6ae33bcc5af620e757bf20e41122e6883a174b188cb776eb29787943205a0774e0072e0fab9e61ca36f99a4b2a99da735c0553933a453e0174c92cb
7
- data.tar.gz: 6b5aba46dcabede907006cb02a1223302ca3f4eb23e87ec886d235012adc93158db6d8f5da26fcc1b49509c226d04ae519b84fdc448745e00aeacfc8562fe918
6
+ metadata.gz: ed61987fdd0cb0e3f50995b2a01cf6f4ede5772968ad56a7f06627dc71198acd201314396e122e8f8bcb3b7362c3e93afa094bc559da1febffe670803e13c77c
7
+ data.tar.gz: c56fd4f30a5b611ad4dbec5adaa39369384f923272bbeaaacd0de2206ecb1433ba038b434b36b212cee1f680e777ce64175077720dfd9db08494b43ce9cdee93
@@ -4,8 +4,8 @@ require 'json'
4
4
  module Bigcartel
5
5
  class API
6
6
  class << self
7
- def get(path)
8
- normalize_response RestClient.get(api_url(path), headers)
7
+ def get(path, params = {})
8
+ normalize_response RestClient.get(api_url(path), headers.merge(params))
9
9
  end
10
10
 
11
11
  def patch(path, options = {})
@@ -1,8 +1,8 @@
1
1
  module Bigcartel
2
2
  class BigcartelObject < RecursiveOpenStruct
3
3
  class << self
4
- def all
5
- resp = Bigcartel::API.get("#{root_path}")
4
+ def all(params = {})
5
+ resp = Bigcartel::API.get(root_path, params: params)
6
6
  resp['data'].map { |object| self.new(object) }
7
7
  end
8
8
 
@@ -1,3 +1,3 @@
1
1
  module Bigcartel
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -9,4 +9,10 @@ describe Bigcartel::Order, vcr: true do
9
9
 
10
10
  it_should_behave_like 'a findable object', ENV['BIGCARTEL_ORDER_ID'], attributes
11
11
  it_should_behave_like 'a listable object', Bigcartel::Order, attributes
12
+
13
+ describe '.all' do
14
+ it 'can accept parameters' do
15
+ expect{ Bigcartel::Order.all(offset: 20) }.to_not raise_error
16
+ end
17
+ end
12
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcartel-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Montgomery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-19 00:00:00.000000000 Z
11
+ date: 2015-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler