bigcartel-api 0.0.4 → 0.0.5
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/{bigcartel.gemspec → bigcartel-api.gemspec} +0 -0
- data/lib/bigcartel/api.rb +9 -1
- data/lib/bigcartel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c78f80999b938c0c4d44c8f8f3664916ad42d229
|
4
|
+
data.tar.gz: 2c46b802dea7c0ec5357429871931a6c6471ce52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de29c54b64b7c673c407e2770ead59b0ea77d6186f76b8eebbfd936b755edce581fed637de1fabfc6e667f495ccf65a126a5b186b81bd0da451efe759715cb1
|
7
|
+
data.tar.gz: 64f156d90d1c8df5d4f5aad7df25509f1fd9c8ee96ed7e4d0065a75e584eb18961562f1126b741fe00c10a367479987a6cb19448067d3f480c5d270cfe79feca
|
File without changes
|
data/lib/bigcartel/api.rb
CHANGED
@@ -5,11 +5,19 @@ module Bigcartel
|
|
5
5
|
class API
|
6
6
|
class << self
|
7
7
|
def get(path)
|
8
|
-
normalize_response RestClient.get(api_url(path),
|
8
|
+
normalize_response RestClient.get(api_url(path), headers)
|
9
|
+
end
|
10
|
+
|
11
|
+
def put(path, options = {})
|
12
|
+
normalize_response RestClient.put(api_url(path), options.to_json, headers.merge(content_type: 'application/vnd.api+json'))
|
9
13
|
end
|
10
14
|
|
11
15
|
private
|
12
16
|
|
17
|
+
def headers
|
18
|
+
{ authorization: "Bearer #{Bigcartel.api_key}" }
|
19
|
+
end
|
20
|
+
|
13
21
|
def base_url
|
14
22
|
"https://api.bigcartel.com"
|
15
23
|
end
|
data/lib/bigcartel/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigcartel-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Montgomery
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- LICENSE.txt
|
106
106
|
- README.md
|
107
107
|
- Rakefile
|
108
|
-
- bigcartel.gemspec
|
108
|
+
- bigcartel-api.gemspec
|
109
109
|
- lib/bigcartel.rb
|
110
110
|
- lib/bigcartel/account.rb
|
111
111
|
- lib/bigcartel/api.rb
|