reverb-api 0.1.6
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +13 -0
- data/README.md +49 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/fixtures/vcr_cassettes/Reverb_Api_Client/with_valid_authentication/_find_draft/the_sku_is_not_found_on_reverb/is_nil.yml +54 -0
- data/fixtures/vcr_cassettes/authenticate.yml +54 -0
- data/fixtures/vcr_cassettes/create_listing.yml +60 -0
- data/fixtures/vcr_cassettes/create_listing1.yml +55 -0
- data/fixtures/vcr_cassettes/create_webhook.yml +152 -0
- data/fixtures/vcr_cassettes/find_draft.yml +56 -0
- data/fixtures/vcr_cassettes/find_listing_by_sku.yml +212 -0
- data/fixtures/vcr_cassettes/get_webhooks.yml +54 -0
- data/fixtures/vcr_cassettes/service_down.yml +41 -0
- data/fixtures/vcr_cassettes/update_listing.yml +163 -0
- data/fixtures/vcr_cassettes/wrong_auth.yml +47 -0
- data/lib/reverb/api.rb +4 -0
- data/lib/reverb/api/client.rb +130 -0
- data/lib/reverb/api/errors.rb +9 -0
- data/lib/reverb/api/listing.rb +18 -0
- data/lib/reverb/api/version.rb +5 -0
- data/reverb-api.gemspec +32 -0
- data/script/console +2 -0
- metadata +201 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.reverb.com/api/my/listings?sku=THETESTSKU&state=draft
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/hal+json
|
12
|
+
Accept:
|
13
|
+
- application/hal+json
|
14
|
+
X-Auth-Token:
|
15
|
+
- mangled_token
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Credentials:
|
22
|
+
- 'true'
|
23
|
+
Access-Control-Allow-Origin:
|
24
|
+
- "*"
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Type:
|
28
|
+
- application/hal+json
|
29
|
+
Date:
|
30
|
+
- Tue, 06 Oct 2015 18:18:25 GMT
|
31
|
+
Etag:
|
32
|
+
- '"f55ed91215805e381a8ddbeee9dec568"'
|
33
|
+
Server:
|
34
|
+
- nginx
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Vary:
|
38
|
+
- Accept-Version
|
39
|
+
X-Request-Id:
|
40
|
+
- a7fc42f5-5c40-46e9-9349-a073e76be1a5
|
41
|
+
X-Revision:
|
42
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
43
|
+
X-Runtime:
|
44
|
+
- '0.033425'
|
45
|
+
Content-Length:
|
46
|
+
- '1206'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"total":1,"_links":{},"listings":[{"make":"Fender","model":"Stratocaster","finish":"","title":"new
|
52
|
+
title","created_at":"2015-10-06T13:17:06-05:00","shop_name":"Audrey''s Gear
|
53
|
+
Bazaar","price":{"amount":"0.00","currency":"USD","symbol":"$"},"offers_enabled":true,"_links":{"photo":{"href":"https://reverb-res.cloudinary.com/image/upload/a_exif,c_thumb,f_auto,fl_progressive,g_south,h_640,q_85,w_640/v1/v/."},"self":{"href":"/api/listings/14609-new-title"},"update":{"method":"PUT","href":"/api/listings/14609-new-title"},"end":{"method":"PUT","href":"/api/my/listings/14609-new-title/state/end"},"want":{"method":"PUT","href":"/api/wants/14609-new-title"},"unwant":{"method":"DELETE","href":"/api/wants/14609-new-title"},"edit":{"href":"/api/listings/14609-new-title/edit"},"web":{"href":"https://sandbox.reverb.com/item/14609-new-title"},"make_offer":{"method":"POST","href":"/api/listings/14609-new-title/offer"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/14609-new-title"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/14609-new-title"}},"shipping":{"local":false,"us":false,"us_rate":{"amount":"0.00","currency":"USD","symbol":"$"}},"photos":[],"sku":"THETESTSKU"}]}'
|
54
|
+
http_version:
|
55
|
+
recorded_at: Tue, 06 Oct 2015 18:18:25 GMT
|
56
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,212 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.reverb.com/api/my/listings?sku=THETESTSKU&state=all
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/hal+json
|
12
|
+
Accept:
|
13
|
+
- application/hal+json
|
14
|
+
X-Auth-Token:
|
15
|
+
- mangled_token
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Credentials:
|
22
|
+
- 'true'
|
23
|
+
Access-Control-Allow-Origin:
|
24
|
+
- "*"
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Type:
|
28
|
+
- application/hal+json
|
29
|
+
Date:
|
30
|
+
- Tue, 06 Oct 2015 18:21:21 GMT
|
31
|
+
Etag:
|
32
|
+
- '"f55ed91215805e381a8ddbeee9dec568"'
|
33
|
+
Server:
|
34
|
+
- nginx
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Vary:
|
38
|
+
- Accept-Version
|
39
|
+
X-Request-Id:
|
40
|
+
- 1217e7e2-b3e6-4872-8e06-cfb1302b5c8c
|
41
|
+
X-Revision:
|
42
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
43
|
+
X-Runtime:
|
44
|
+
- '0.034555'
|
45
|
+
Content-Length:
|
46
|
+
- '1206'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"total":1,"_links":{},"listings":[{"make":"Fender","model":"Stratocaster","finish":"","title":"new
|
52
|
+
title","created_at":"2015-10-06T13:17:06-05:00","shop_name":"Audrey''s Gear
|
53
|
+
Bazaar","price":{"amount":"0.00","currency":"USD","symbol":"$"},"offers_enabled":true,"_links":{"photo":{"href":"https://reverb-res.cloudinary.com/image/upload/a_exif,c_thumb,f_auto,fl_progressive,g_south,h_640,q_85,w_640/v1/v/."},"self":{"href":"/api/listings/14609-new-title"},"update":{"method":"PUT","href":"/api/listings/14609-new-title"},"end":{"method":"PUT","href":"/api/my/listings/14609-new-title/state/end"},"want":{"method":"PUT","href":"/api/wants/14609-new-title"},"unwant":{"method":"DELETE","href":"/api/wants/14609-new-title"},"edit":{"href":"/api/listings/14609-new-title/edit"},"web":{"href":"https://sandbox.reverb.com/item/14609-new-title"},"make_offer":{"method":"POST","href":"/api/listings/14609-new-title/offer"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/14609-new-title"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/14609-new-title"}},"shipping":{"local":false,"us":false,"us_rate":{"amount":"0.00","currency":"USD","symbol":"$"}},"photos":[],"sku":"THETESTSKU"}]}'
|
54
|
+
http_version:
|
55
|
+
recorded_at: Tue, 06 Oct 2015 18:21:20 GMT
|
56
|
+
- request:
|
57
|
+
method: get
|
58
|
+
uri: https://sandbox.reverb.com/api/my/listings?sku=NOSKU&state=all
|
59
|
+
body:
|
60
|
+
encoding: US-ASCII
|
61
|
+
string: ''
|
62
|
+
headers:
|
63
|
+
Content-Type:
|
64
|
+
- application/hal+json
|
65
|
+
Accept:
|
66
|
+
- application/hal+json
|
67
|
+
X-Auth-Token:
|
68
|
+
- mangled_token
|
69
|
+
response:
|
70
|
+
status:
|
71
|
+
code: 200
|
72
|
+
message: OK
|
73
|
+
headers:
|
74
|
+
Access-Control-Allow-Credentials:
|
75
|
+
- 'true'
|
76
|
+
Access-Control-Allow-Origin:
|
77
|
+
- "*"
|
78
|
+
Cache-Control:
|
79
|
+
- max-age=0, private, must-revalidate
|
80
|
+
Content-Type:
|
81
|
+
- application/hal+json
|
82
|
+
Date:
|
83
|
+
- Tue, 06 Oct 2015 18:21:21 GMT
|
84
|
+
Etag:
|
85
|
+
- '"a06787cca2914b8b79e87278465e0914"'
|
86
|
+
Server:
|
87
|
+
- nginx
|
88
|
+
Status:
|
89
|
+
- 200 OK
|
90
|
+
Vary:
|
91
|
+
- Accept-Version
|
92
|
+
X-Request-Id:
|
93
|
+
- b05d7bca-331b-4f56-bbc1-f31a13bbeabe
|
94
|
+
X-Revision:
|
95
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
96
|
+
X-Runtime:
|
97
|
+
- '0.026603'
|
98
|
+
Content-Length:
|
99
|
+
- '37'
|
100
|
+
Connection:
|
101
|
+
- keep-alive
|
102
|
+
body:
|
103
|
+
encoding: UTF-8
|
104
|
+
string: '{"total":0,"_links":{},"listings":[]}'
|
105
|
+
http_version:
|
106
|
+
recorded_at: Tue, 06 Oct 2015 18:21:21 GMT
|
107
|
+
- request:
|
108
|
+
method: post
|
109
|
+
uri: https://sandbox.reverb.com/api/listings
|
110
|
+
body:
|
111
|
+
encoding: UTF-8
|
112
|
+
string: '{"make":"Fender","model":"Stratocaster","sku":"THE+SKU"}'
|
113
|
+
headers:
|
114
|
+
Content-Type:
|
115
|
+
- application/hal+json
|
116
|
+
Accept:
|
117
|
+
- application/hal+json
|
118
|
+
X-Auth-Token:
|
119
|
+
- mangled_token
|
120
|
+
response:
|
121
|
+
status:
|
122
|
+
code: 412
|
123
|
+
message: Precondition Failed
|
124
|
+
headers:
|
125
|
+
Cache-Control:
|
126
|
+
- no-cache
|
127
|
+
Content-Type:
|
128
|
+
- application/hal+json
|
129
|
+
Date:
|
130
|
+
- Tue, 06 Oct 2015 18:21:21 GMT
|
131
|
+
Server:
|
132
|
+
- nginx
|
133
|
+
Status:
|
134
|
+
- 412 Precondition Failed
|
135
|
+
Vary:
|
136
|
+
- Accept-Version
|
137
|
+
X-Request-Id:
|
138
|
+
- 1ccf986c-c992-4507-891a-046140c37cd1
|
139
|
+
X-Revision:
|
140
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
141
|
+
X-Runtime:
|
142
|
+
- '0.048252'
|
143
|
+
Content-Length:
|
144
|
+
- '2118'
|
145
|
+
Connection:
|
146
|
+
- keep-alive
|
147
|
+
body:
|
148
|
+
encoding: UTF-8
|
149
|
+
string: '{"message":"Please fill in all the fields required for submitting your
|
150
|
+
listing to the marketplace.","listing":{"make":"Fender","model":"Stratocaster","finish":"","title":"Fender
|
151
|
+
Stratocaster","offers_enabled":false,"_links":{"photo":{"href":"https://da1wmtc5ur1xq.cloudfront.net/assets/products/blank_medium-19ba00051c336ac75f04e103a1ae310b.jpg"},"self":{"href":"/api/listings/-fender-stratocaster"},"update":{"method":"PUT","href":"/api/listings/-fender-stratocaster"},"end":{"method":"PUT","href":"/api/my/listings/-fender-stratocaster/state/end"},"want":{"method":"PUT","href":"/api/wants/-fender-stratocaster"},"unwant":{"method":"DELETE","href":"/api/wants/-fender-stratocaster"},"edit":{"href":"/api/listings/-fender-stratocaster/edit"},"web":{"href":"https://sandbox.reverb.com/item/-fender-stratocaster"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/-fender-stratocaster"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/-fender-stratocaster"},"flag":{"href":"/api/listings/-fender-stratocaster/flag"},"contact_seller":{"web":{"href":"https://sandbox.reverb.com/my/messages/new?item=-fender-stratocaster\u0026to=1-audrey-l"}},"conversations":{"href":"/api/listings//conversations"},"shop":{"href":"/api/shops/audreys-gear-bazaar","web":{"href":"https://sandbox.reverb.com/shop/audreys-gear-bazaar"}}},"accepted_payment_methods":[],"location":{"country_code":null,"locality":null,"region":null},"has_inventory":false,"draft":true,"live":false,"cloudinary_photos":[],"shop":{"feedback_count":2,"preferred_seller":false,"rating_percentage":0.6},"stats":{"views":0,"watches":0},"offer_count":0,"shipping_policy":"I
|
152
|
+
will ship with tracking to the continental United States. Alaska, Hawaii,
|
153
|
+
and international shipments may incur additional charges.","payment_policy":"To
|
154
|
+
negotiate price, shipping, or payment options, please send a message or make
|
155
|
+
an offer.","is_my_listing":false,"photos":[],"shipping":{"us":false,"rates":[]},"seller":{"paypal_email":"reuben.vonrueden@moriette.org"}},"errors":{"sku":["You
|
156
|
+
already have a listing with the SKU THE+SKU. Please use a unique SKU."]}}'
|
157
|
+
http_version:
|
158
|
+
recorded_at: Tue, 06 Oct 2015 18:21:21 GMT
|
159
|
+
- request:
|
160
|
+
method: get
|
161
|
+
uri: https://sandbox.reverb.com/api/my/listings?sku=THE%2BSKU&state=all
|
162
|
+
body:
|
163
|
+
encoding: US-ASCII
|
164
|
+
string: ''
|
165
|
+
headers:
|
166
|
+
Content-Type:
|
167
|
+
- application/hal+json
|
168
|
+
Accept:
|
169
|
+
- application/hal+json
|
170
|
+
X-Auth-Token:
|
171
|
+
- mangled_token
|
172
|
+
response:
|
173
|
+
status:
|
174
|
+
code: 200
|
175
|
+
message: OK
|
176
|
+
headers:
|
177
|
+
Access-Control-Allow-Credentials:
|
178
|
+
- 'true'
|
179
|
+
Access-Control-Allow-Origin:
|
180
|
+
- "*"
|
181
|
+
Cache-Control:
|
182
|
+
- max-age=0, private, must-revalidate
|
183
|
+
Content-Type:
|
184
|
+
- application/hal+json
|
185
|
+
Date:
|
186
|
+
- Tue, 06 Oct 2015 18:21:21 GMT
|
187
|
+
Etag:
|
188
|
+
- '"6a33a1f8f8753b606e08883bb1f70bf4"'
|
189
|
+
Server:
|
190
|
+
- nginx
|
191
|
+
Status:
|
192
|
+
- 200 OK
|
193
|
+
Vary:
|
194
|
+
- Accept-Version
|
195
|
+
X-Request-Id:
|
196
|
+
- 6bb78d51-fc2b-47ab-a89a-937beba5af03
|
197
|
+
X-Revision:
|
198
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
199
|
+
X-Runtime:
|
200
|
+
- '0.033189'
|
201
|
+
Content-Length:
|
202
|
+
- '1313'
|
203
|
+
Connection:
|
204
|
+
- keep-alive
|
205
|
+
body:
|
206
|
+
encoding: UTF-8
|
207
|
+
string: '{"total":1,"_links":{},"listings":[{"make":"Fender","model":"Stratocaster","finish":"","title":"Fender
|
208
|
+
Stratocaster","created_at":"2015-10-06T13:16:43-05:00","shop_name":"Audrey''s
|
209
|
+
Gear Bazaar","price":{"amount":"0.00","currency":"USD","symbol":"$"},"offers_enabled":true,"_links":{"photo":{"href":"https://reverb-res.cloudinary.com/image/upload/a_exif,c_thumb,f_auto,fl_progressive,g_south,h_640,q_85,w_640/v1/v/."},"self":{"href":"/api/listings/14608-fender-stratocaster"},"update":{"method":"PUT","href":"/api/listings/14608-fender-stratocaster"},"end":{"method":"PUT","href":"/api/my/listings/14608-fender-stratocaster/state/end"},"want":{"method":"PUT","href":"/api/wants/14608-fender-stratocaster"},"unwant":{"method":"DELETE","href":"/api/wants/14608-fender-stratocaster"},"edit":{"href":"/api/listings/14608-fender-stratocaster/edit"},"web":{"href":"https://sandbox.reverb.com/item/14608-fender-stratocaster"},"make_offer":{"method":"POST","href":"/api/listings/14608-fender-stratocaster/offer"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/14608-fender-stratocaster"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/14608-fender-stratocaster"}},"shipping":{"local":false,"us":false,"us_rate":{"amount":"0.00","currency":"USD","symbol":"$"}},"photos":[],"sku":"THE+SKU"}]}'
|
210
|
+
http_version:
|
211
|
+
recorded_at: Tue, 06 Oct 2015 18:21:21 GMT
|
212
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.reverb.com/api/webhooks/registrations
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/hal+json
|
12
|
+
Accept:
|
13
|
+
- application/hal+json
|
14
|
+
X-Auth-Token:
|
15
|
+
- mangled_token
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Credentials:
|
22
|
+
- 'true'
|
23
|
+
Access-Control-Allow-Origin:
|
24
|
+
- "*"
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Type:
|
28
|
+
- application/hal+json
|
29
|
+
Date:
|
30
|
+
- Tue, 06 Oct 2015 18:18:28 GMT
|
31
|
+
Etag:
|
32
|
+
- '"8df656d56f0f483c8900b0c594093552"'
|
33
|
+
Server:
|
34
|
+
- nginx
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Vary:
|
38
|
+
- Accept-Version
|
39
|
+
X-Request-Id:
|
40
|
+
- 02c20f7a-ffdf-40eb-9bd1-356eba5c711a
|
41
|
+
X-Revision:
|
42
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
43
|
+
X-Runtime:
|
44
|
+
- '0.019757'
|
45
|
+
Content-Length:
|
46
|
+
- '183'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"registrations":[{"url":"http://requestb.in/1etnuhm1","topic":"listings/update","created_at":"2015-10-06T13:18:27-05:00","_links":{"self":{"href":"/api/webhooks/registrations/6"}}}]}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Tue, 06 Oct 2015 18:18:27 GMT
|
54
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://reverb.com/api/my/listings?sku=THETESTSKU&state=all
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/hal+json
|
12
|
+
Accept:
|
13
|
+
- application/hal+json
|
14
|
+
X-Auth-Token:
|
15
|
+
- mangled_token
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 503
|
19
|
+
message: Service Temporarily Unavailable
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Date:
|
24
|
+
- Tue, 26 Jan 2016 10:16:16 GMT
|
25
|
+
Etag:
|
26
|
+
- '"56a740c0-3d"'
|
27
|
+
Server:
|
28
|
+
- nginx
|
29
|
+
Content-Length:
|
30
|
+
- '61'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |2
|
36
|
+
{
|
37
|
+
"message":"Reverb's down for tuning. BRB!"
|
38
|
+
}
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 26 Jan 2016 10:16:16 GMT
|
41
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,163 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.reverb.com/api/my/listings?sku=THETESTSKU&state=all
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/hal+json
|
12
|
+
Accept:
|
13
|
+
- application/hal+json
|
14
|
+
X-Auth-Token:
|
15
|
+
- mangled_token
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Credentials:
|
22
|
+
- 'true'
|
23
|
+
Access-Control-Allow-Origin:
|
24
|
+
- "*"
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=0, private, must-revalidate
|
27
|
+
Content-Type:
|
28
|
+
- application/hal+json
|
29
|
+
Date:
|
30
|
+
- Tue, 06 Oct 2015 18:18:26 GMT
|
31
|
+
Etag:
|
32
|
+
- '"f55ed91215805e381a8ddbeee9dec568"'
|
33
|
+
Server:
|
34
|
+
- nginx
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Vary:
|
38
|
+
- Accept-Version
|
39
|
+
X-Request-Id:
|
40
|
+
- 79d1a787-c16e-4b69-96f2-8c35db783713
|
41
|
+
X-Revision:
|
42
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
43
|
+
X-Runtime:
|
44
|
+
- '0.033073'
|
45
|
+
Content-Length:
|
46
|
+
- '1206'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"total":1,"_links":{},"listings":[{"make":"Fender","model":"Stratocaster","finish":"","title":"new
|
52
|
+
title","created_at":"2015-10-06T13:17:06-05:00","shop_name":"Audrey''s Gear
|
53
|
+
Bazaar","price":{"amount":"0.00","currency":"USD","symbol":"$"},"offers_enabled":true,"_links":{"photo":{"href":"https://reverb-res.cloudinary.com/image/upload/a_exif,c_thumb,f_auto,fl_progressive,g_south,h_640,q_85,w_640/v1/v/."},"self":{"href":"/api/listings/14609-new-title"},"update":{"method":"PUT","href":"/api/listings/14609-new-title"},"end":{"method":"PUT","href":"/api/my/listings/14609-new-title/state/end"},"want":{"method":"PUT","href":"/api/wants/14609-new-title"},"unwant":{"method":"DELETE","href":"/api/wants/14609-new-title"},"edit":{"href":"/api/listings/14609-new-title/edit"},"web":{"href":"https://sandbox.reverb.com/item/14609-new-title"},"make_offer":{"method":"POST","href":"/api/listings/14609-new-title/offer"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/14609-new-title"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/14609-new-title"}},"shipping":{"local":false,"us":false,"us_rate":{"amount":"0.00","currency":"USD","symbol":"$"}},"photos":[],"sku":"THETESTSKU"}]}'
|
54
|
+
http_version:
|
55
|
+
recorded_at: Tue, 06 Oct 2015 18:18:25 GMT
|
56
|
+
- request:
|
57
|
+
method: put
|
58
|
+
uri: https://sandbox.reverb.com/api/listings/14609-new-title
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"title":"new title"}'
|
62
|
+
headers:
|
63
|
+
Content-Type:
|
64
|
+
- application/hal+json
|
65
|
+
Accept:
|
66
|
+
- application/hal+json
|
67
|
+
X-Auth-Token:
|
68
|
+
- mangled_token
|
69
|
+
response:
|
70
|
+
status:
|
71
|
+
code: 200
|
72
|
+
message: OK
|
73
|
+
headers:
|
74
|
+
Cache-Control:
|
75
|
+
- max-age=0, private, must-revalidate
|
76
|
+
Content-Type:
|
77
|
+
- application/hal+json
|
78
|
+
Date:
|
79
|
+
- Tue, 06 Oct 2015 18:18:26 GMT
|
80
|
+
Etag:
|
81
|
+
- '"61b7673a517867ca6248a5cc32857e27"'
|
82
|
+
Server:
|
83
|
+
- nginx
|
84
|
+
Status:
|
85
|
+
- 200 OK
|
86
|
+
Vary:
|
87
|
+
- Accept-Version
|
88
|
+
X-Request-Id:
|
89
|
+
- afed2991-d0c1-4725-aacf-4f3773af1b2d
|
90
|
+
X-Revision:
|
91
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
92
|
+
X-Runtime:
|
93
|
+
- '0.080265'
|
94
|
+
Content-Length:
|
95
|
+
- '2267'
|
96
|
+
Connection:
|
97
|
+
- keep-alive
|
98
|
+
body:
|
99
|
+
encoding: UTF-8
|
100
|
+
string: '{"message":"Your draft listing has been saved. You can come back to
|
101
|
+
finish it when you''re ready.","listing":{"make":"Fender","model":"Stratocaster","finish":"","title":"new
|
102
|
+
title","created_at":"2015-10-06T13:17:06-05:00","shop_name":"Audrey''s Gear
|
103
|
+
Bazaar","offers_enabled":true,"_links":{"photo":{"href":"https://da1wmtc5ur1xq.cloudfront.net/assets/products/blank_medium-19ba00051c336ac75f04e103a1ae310b.jpg"},"self":{"href":"/api/listings/14609-new-title"},"update":{"method":"PUT","href":"/api/listings/14609-new-title"},"end":{"method":"PUT","href":"/api/my/listings/14609-new-title/state/end"},"want":{"method":"PUT","href":"/api/wants/14609-new-title"},"unwant":{"method":"DELETE","href":"/api/wants/14609-new-title"},"edit":{"href":"/api/listings/14609-new-title/edit"},"web":{"href":"https://sandbox.reverb.com/item/14609-new-title"},"make_offer":{"method":"POST","href":"/api/listings/14609-new-title/offer"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/14609-new-title"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/14609-new-title"},"buy":{"href":"https://sandbox.reverb.com/cart/add?cart_item%5Baction_source_attributes%5D%5Bdevice%5D=\u0026cart_item%5Bproduct_id%5D=14609"},"flag":{"href":"/api/listings/14609-new-title/flag"},"contact_seller":{"web":{"href":"https://sandbox.reverb.com/my/messages/new?item=14609-new-title\u0026to=1-audrey-l"}},"conversations":{"href":"/api/listings/14609/conversations"},"shop":{"href":"/api/shops/audreys-gear-bazaar","web":{"href":"https://sandbox.reverb.com/shop/audreys-gear-bazaar"}}},"accepted_payment_methods":[],"location":{"country_code":null,"locality":null,"region":null},"has_inventory":false,"draft":true,"live":false,"cloudinary_photos":[],"shop":{"feedback_count":2,"preferred_seller":false,"rating_percentage":0.6},"stats":{"views":0,"watches":0},"offer_count":0,"shipping_policy":"I
|
104
|
+
will ship with tracking to the continental United States. Alaska, Hawaii,
|
105
|
+
and international shipments may incur additional charges.","payment_policy":"To
|
106
|
+
negotiate price, shipping, or payment options, please send a message or make
|
107
|
+
an offer.","is_my_listing":false,"photos":[],"shipping":{"us":false,"rates":[]},"seller":{"paypal_email":"reuben.vonrueden@moriette.org"}},"errors":{}}'
|
108
|
+
http_version:
|
109
|
+
recorded_at: Tue, 06 Oct 2015 18:18:26 GMT
|
110
|
+
- request:
|
111
|
+
method: get
|
112
|
+
uri: https://sandbox.reverb.com/api/my/listings?sku=THETESTSKU&state=all
|
113
|
+
body:
|
114
|
+
encoding: US-ASCII
|
115
|
+
string: ''
|
116
|
+
headers:
|
117
|
+
Content-Type:
|
118
|
+
- application/hal+json
|
119
|
+
Accept:
|
120
|
+
- application/hal+json
|
121
|
+
X-Auth-Token:
|
122
|
+
- mangled_token
|
123
|
+
response:
|
124
|
+
status:
|
125
|
+
code: 200
|
126
|
+
message: OK
|
127
|
+
headers:
|
128
|
+
Access-Control-Allow-Credentials:
|
129
|
+
- 'true'
|
130
|
+
Access-Control-Allow-Origin:
|
131
|
+
- "*"
|
132
|
+
Cache-Control:
|
133
|
+
- max-age=0, private, must-revalidate
|
134
|
+
Content-Type:
|
135
|
+
- application/hal+json
|
136
|
+
Date:
|
137
|
+
- Tue, 06 Oct 2015 18:18:26 GMT
|
138
|
+
Etag:
|
139
|
+
- '"f55ed91215805e381a8ddbeee9dec568"'
|
140
|
+
Server:
|
141
|
+
- nginx
|
142
|
+
Status:
|
143
|
+
- 200 OK
|
144
|
+
Vary:
|
145
|
+
- Accept-Version
|
146
|
+
X-Request-Id:
|
147
|
+
- 162c1642-ec8c-450c-acd8-efcfedb990f3
|
148
|
+
X-Revision:
|
149
|
+
- fda6d910fe5754c2129bb9368ea10ed75fae50b3
|
150
|
+
X-Runtime:
|
151
|
+
- '0.032777'
|
152
|
+
Content-Length:
|
153
|
+
- '1206'
|
154
|
+
Connection:
|
155
|
+
- keep-alive
|
156
|
+
body:
|
157
|
+
encoding: UTF-8
|
158
|
+
string: '{"total":1,"_links":{},"listings":[{"make":"Fender","model":"Stratocaster","finish":"","title":"new
|
159
|
+
title","created_at":"2015-10-06T13:17:06-05:00","shop_name":"Audrey''s Gear
|
160
|
+
Bazaar","price":{"amount":"0.00","currency":"USD","symbol":"$"},"offers_enabled":true,"_links":{"photo":{"href":"https://reverb-res.cloudinary.com/image/upload/a_exif,c_thumb,f_auto,fl_progressive,g_south,h_640,q_85,w_640/v1/v/."},"self":{"href":"/api/listings/14609-new-title"},"update":{"method":"PUT","href":"/api/listings/14609-new-title"},"end":{"method":"PUT","href":"/api/my/listings/14609-new-title/state/end"},"want":{"method":"PUT","href":"/api/wants/14609-new-title"},"unwant":{"method":"DELETE","href":"/api/wants/14609-new-title"},"edit":{"href":"/api/listings/14609-new-title/edit"},"web":{"href":"https://sandbox.reverb.com/item/14609-new-title"},"make_offer":{"method":"POST","href":"/api/listings/14609-new-title/offer"},"add_to_wishlist":{"method":"POST","href":"/api/my/wishlist/14609-new-title"},"remove_from_wishlist":{"method":"DELETE","href":"/api/my/wishlist/14609-new-title"}},"shipping":{"local":false,"us":false,"us_rate":{"amount":"0.00","currency":"USD","symbol":"$"}},"photos":[],"sku":"THETESTSKU"}]}'
|
161
|
+
http_version:
|
162
|
+
recorded_at: Tue, 06 Oct 2015 18:18:26 GMT
|
163
|
+
recorded_with: VCR 2.9.3
|