spree_api_v2 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f51afd9a854980b7d847abef045328252894dab1
4
- data.tar.gz: d50ea8d48e1bbb2c14b933462a945308e1c0a8d4
3
+ metadata.gz: 6167d39bbd3296a6f9dbd49aeadbfc0ae214d666
4
+ data.tar.gz: 751825724557654c768ffc926dc7c15a919e670b
5
5
  SHA512:
6
- metadata.gz: 203d4c79428e91ec1a91cda9095cc893f50b360a6a85ed539a98c13a19b99a3de9339c8218bdd87920fa67cd01123e8bd26c497defe508955d59471a83ca2651
7
- data.tar.gz: bf350c0d32a9aac8c763454455b8f8e84d42c72ed6e1017ac9c5867745ce23cf75127af59fad83b73be10fce0dc133dbb1a3e52774b377041f785d559bf65b9c
6
+ metadata.gz: 45718ff99ad6d9e838496f185879af58c4a082e9b17e7a573686407b5f43346fe3bbedce1767f5ccbedaa365db7b6e942f24d55980fa78d8f8cfba9d6f06eefd
7
+ data.tar.gz: c292c0460b65a95bbfb6cbbc61265355017e3433c78e6669ebda963b320ae18f35652753d40d9adbebe36effbae3d1e04b5ce44f153829f8713b70f934a3b576
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2
4
+
5
+ * The parent serializer for `Spree::BaseSerializer` is now configurable.
6
+ In some instances, you may have an `ApplicationSerializer`.
7
+ To make the `Spree::BaseSerializer` use an `ApplicationSerializer` instead
8
+ of the `ActiveModel::Serializer`:
9
+
10
+ ```ruby
11
+ # config/initializers/spree_api_v2.rb; or
12
+ # config/initializers/solidus_api_v2.rb
13
+ SpreeApiV2.setup do |config|
14
+ config.parent_serializer = ApplicationSerializer
15
+ end
16
+
3
17
  ## 0.2.1
4
18
 
5
19
  * Fixes a bug where the user serializer wasn't extending from the `Spree::BaseSerializer` this is now fixed.
data/README.md CHANGED
@@ -91,8 +91,4 @@ bundle exec rake GEMNAME=spree_api_v2
91
91
  bundle exec rake GEMNAME=solidus_api_v2
92
92
  ```
93
93
 
94
- ## Sponsored by:
95
-
96
- [![Kabuni](https://assets.kabuni.com/kabuni-secondary-logomark-xlarge.png)](https://kabuni.com?utm_source=SpreeApiV2&utm_medium=sponsor&utm_campaign=opensource)
97
-
98
94
  Copyright © 2015 Ben A. Morgan, released under the New BSD License
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- class BaseSerializer < ActiveModel::Serializer
2
+ class BaseSerializer < SpreeApiV2.parent_serializer
3
3
  def image_links(object)
4
4
  {
5
5
  original: object.url(:original),
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```shell
4
4
  # Specifying the token as a header.
5
- curl "https://kabuni.com/api/v1/endpoint"
5
+ curl "https://example.com/api/v1/endpoint"
6
6
  -H "X-Spree-Token: abc123"
7
7
 
8
8
  # Specifying the token as a param.
@@ -20,7 +20,7 @@ Spree does not expect every request to require an API key (such as reading publi
20
20
  ## Authenticate a User (Login)
21
21
 
22
22
  ```shell
23
- curl "https://kabuni.com/api/v1/account/signin"
23
+ curl "https://example.com/api/v1/account/signin"
24
24
  -X POST
25
25
  -d user[email]=spree@example.com
26
26
  -d user[password]=spree123
@@ -3,7 +3,7 @@
3
3
  ## List Countries
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/countries"
6
+ curl "https://example.com/api/v2/countries"
7
7
  ```
8
8
 
9
9
  ```json
@@ -40,7 +40,7 @@ List all of the ~200 countries in the DB.
40
40
  ## Show Country
41
41
 
42
42
  ```shell
43
- curl "https://kabuni.com/api/v2/countries/1"
43
+ curl "https://example.com/api/v2/countries/1"
44
44
  ```
45
45
 
46
46
  ```json
@@ -75,7 +75,7 @@ Select a country via its `id`.
75
75
  ## List States of a Country
76
76
 
77
77
  ```shell
78
- curl "https://kabuni.com/api/v2/countries/1/states"
78
+ curl "https://example.com/api/v2/countries/1/states"
79
79
  ```
80
80
 
81
81
  ```json
@@ -106,7 +106,7 @@ See all of the states that a country owns via the country's `id`.
106
106
  ## Show State of a Country
107
107
 
108
108
  ```shell
109
- curl "https://kabuni.com/api/v2/countries/1/states/1"
109
+ curl "https://example.com/api/v2/countries/1/states/1"
110
110
  ```
111
111
 
112
112
  ```json
@@ -1,9 +1,9 @@
1
1
  # Filtering
2
2
 
3
3
  ```shell
4
- curl "https://kabuni.com/api/v2/kittens?filter[id]=1"
5
- curl "https://kabuni.com/api/v2/kittens?filter[id]=2,3,4"
6
- curl "https://kabuni.com/api/v2/kittens?filter[breed]=Persian,British%20Shorthair,Bengal"
4
+ curl "https://example.com/api/v2/kittens?filter[id]=1"
5
+ curl "https://example.com/api/v2/kittens?filter[id]=2,3,4"
6
+ curl "https://example.com/api/v2/kittens?filter[breed]=Persian,British%20Shorthair,Bengal"
7
7
  ```
8
8
 
9
9
  This project supports the [JSON API's `filter` keyword](http://jsonapi.org/format/#fetching-filtering) with only the root object, not any of its relationships yet.
@@ -3,7 +3,7 @@
3
3
  ## List Images
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/images"
6
+ curl "https://example.com/api/v2/images"
7
7
  ```
8
8
 
9
9
  ```json
@@ -41,7 +41,7 @@ List all of the images stored in the database.
41
41
  ## Show Image
42
42
 
43
43
  ```shell
44
- curl "https://kabuni.com/api/v2/images/1"
44
+ curl "https://example.com/api/v2/images/1"
45
45
  ```
46
46
 
47
47
  ```json
@@ -77,7 +77,7 @@ Fetch an image and its links via the image's `id`.
77
77
  ## Show Variant of an Image
78
78
 
79
79
  ```shell
80
- curl "https://kabuni.com/api/v2/images/1/variant"
80
+ curl "https://example.com/api/v2/images/1/variant"
81
81
  ```
82
82
 
83
83
  ```json
@@ -138,7 +138,7 @@ Fetch the variant that an image belongs to via the variant's `id`.
138
138
  ## Show Product of an Image
139
139
 
140
140
  ```shell
141
- curl "https://kabuni.com/api/v2/images/1/product"
141
+ curl "https://example.com/api/v2/images/1/product"
142
142
  ```
143
143
 
144
144
  ```json
@@ -3,7 +3,7 @@
3
3
  ## Create Line Item
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/line_items"
6
+ curl "https://example.com/api/v2/line_items"
7
7
  -X POST
8
8
  -d token=abc123
9
9
  -d line_item[order_id]=1
@@ -53,7 +53,7 @@ This endpoint allows you add a variant to a users order by creating a line item.
53
53
  > Quantity is out of range.
54
54
 
55
55
  ```shell
56
- curl "https://kabuni.com/api/v2/line_items"
56
+ curl "https://example.com/api/v2/line_items"
57
57
  -X POST
58
58
  -d token=abc123
59
59
  -d line_item[order_id]=1
@@ -80,7 +80,7 @@ When requesting an insanely large amount of variants to be added to your order,
80
80
  > Order could not be found.
81
81
 
82
82
  ```shell
83
- curl "https://kabuni.com/api/v2/line_items"
83
+ curl "https://example.com/api/v2/line_items"
84
84
  -X POST
85
85
  -d token=abc123
86
86
  -d line_item[order_id]=0
@@ -108,7 +108,7 @@ When this happens, you'll receive an error because of it.
108
108
  > Product is out of stock.
109
109
 
110
110
  ```shell
111
- curl "https://kabuni.com/api/v2/line_items"
111
+ curl "https://example.com/api/v2/line_items"
112
112
  -X POST
113
113
  -d token=abc123
114
114
  -d line_item[order_id]=1
@@ -3,7 +3,7 @@
3
3
  ## List Option Types
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/option_types"
6
+ curl "https://example.com/api/v2/option_types"
7
7
  ```
8
8
 
9
9
  ```json
@@ -45,7 +45,7 @@ List all of the option types in the database.
45
45
  ## Show Option Type
46
46
 
47
47
  ```shell
48
- curl "https://kabuni.com/api/v2/option_types/1"
48
+ curl "https://example.com/api/v2/option_types/1"
49
49
  ```
50
50
 
51
51
  ```json
@@ -85,7 +85,7 @@ Fetch an option type in the database.
85
85
  ## List Option Values of a Option Type
86
86
 
87
87
  ```shell
88
- curl "https://kabuni.com/api/v2/option_types/1/option_values"
88
+ curl "https://example.com/api/v2/option_types/1/option_values"
89
89
  ```
90
90
 
91
91
  ```json
@@ -117,7 +117,7 @@ See all of the option values that an option type owns.
117
117
  ## Show Option Values of a Option Type
118
118
 
119
119
  ```shell
120
- curl "https://kabuni.com/api/v2/option_types/1/option_values/1"
120
+ curl "https://example.com/api/v2/option_types/1/option_values/1"
121
121
  ```
122
122
 
123
123
  ```json
@@ -147,7 +147,7 @@ Fetch an option value that an option type owns.
147
147
  ## List Products of a Option Type
148
148
 
149
149
  ```shell
150
- curl "https://kabuni.com/api/v2/option_types/1/products"
150
+ curl "https://example.com/api/v2/option_types/1/products"
151
151
  ```
152
152
 
153
153
  ```json
@@ -209,7 +209,7 @@ See all of the products that an option type owns.
209
209
  ## Show Product of a Option Type
210
210
 
211
211
  ```shell
212
- curl "https://kabuni.com/api/v2/option_types/1/products/1"
212
+ curl "https://example.com/api/v2/option_types/1/products/1"
213
213
  ```
214
214
 
215
215
  ```json
@@ -3,7 +3,7 @@
3
3
  ## List Option Values
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/option_values"
6
+ curl "https://example.com/api/v2/option_values"
7
7
  ```
8
8
 
9
9
  ```json
@@ -35,7 +35,7 @@ List all of the option values.
35
35
  ## Show Option Value
36
36
 
37
37
  ```shell
38
- curl "https://kabuni.com/api/v2/option_values/1"
38
+ curl "https://example.com/api/v2/option_values/1"
39
39
  ```
40
40
 
41
41
  ```json
@@ -65,7 +65,7 @@ Find an option value by its `id`.
65
65
  ## Show Option Type of an Option Value
66
66
 
67
67
  ```shell
68
- curl "https://kabuni.com/api/v2/option_values/1/option_type"
68
+ curl "https://example.com/api/v2/option_values/1/option_type"
69
69
  ```
70
70
 
71
71
  ```json
@@ -105,7 +105,7 @@ Find the option type of an option value by the option value's `id`.
105
105
  ## List Variants of an Option Value
106
106
 
107
107
  ```shell
108
- curl "https://kabuni.com/api/v2/option_values/1/variants"
108
+ curl "https://example.com/api/v2/option_values/1/variants"
109
109
  ```
110
110
 
111
111
  ```json
@@ -168,7 +168,7 @@ List all of the variants that belong to an option value via the option value's `
168
168
  ## Show Variant of an Option Value
169
169
 
170
170
  ```shell
171
- curl "https://kabuni.com/api/v2/option_values/1/variants/1"
171
+ curl "https://example.com/api/v2/option_values/1/variants/1"
172
172
  ```
173
173
 
174
174
  ```json
@@ -3,7 +3,7 @@
3
3
  ## Show Order
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/orders/:id"
6
+ curl "https://example.com/api/v2/orders/:id"
7
7
  -d token=abc123
8
8
  ```
9
9
 
@@ -1,7 +1,7 @@
1
1
  # Pagination
2
2
 
3
3
  ```shell
4
- curl "https://kabuni.com/api/v2/kitten?page[number]2&page[size]=20"
4
+ curl "https://example.com/api/v2/kitten?page[number]2&page[size]=20"
5
5
  ```
6
6
 
7
7
  This projects supports the [JSON API's `page` keyword](http://jsonapi.org/format/#fetching-pagination).
@@ -3,7 +3,7 @@
3
3
  ## List Prices
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/prices"
6
+ curl "https://example.com/api/v2/prices"
7
7
  ```
8
8
 
9
9
  ```json
@@ -37,7 +37,7 @@ List all of the prices in the database.
37
37
  ## Show Price
38
38
 
39
39
  ```shell
40
- curl "https://kabuni.com/api/v2/prices/1"
40
+ curl "https://example.com/api/v2/prices/1"
41
41
  ```
42
42
 
43
43
  ```json
@@ -69,7 +69,7 @@ Fetch a price via its `id`.
69
69
  ## Show Variant of a Price
70
70
 
71
71
  ```shell
72
- curl "https://kabuni.com/api/v2/prices/1/variant"
72
+ curl "https://example.com/api/v2/prices/1/variant"
73
73
  ```
74
74
 
75
75
  ```json
@@ -130,7 +130,7 @@ Fetch the variant a price belongs to via the price's `id`.
130
130
  ## Show Product of a Price
131
131
 
132
132
  ```shell
133
- curl "https://kabuni.com/api/v2/prices/1/product"
133
+ curl "https://example.com/api/v2/prices/1/product"
134
134
  ```
135
135
 
136
136
  ```json
@@ -3,7 +3,7 @@
3
3
  ## List Products
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/products"
6
+ curl "https://example.com/api/v2/products"
7
7
  ```
8
8
 
9
9
  ```json
@@ -65,7 +65,7 @@ List all of the products in the database.
65
65
  ## Show Product
66
66
 
67
67
  ```shell
68
- curl "https://kabuni.com/api/v2/products/1"
68
+ curl "https://example.com/api/v2/products/1"
69
69
  ```
70
70
 
71
71
  ```json
@@ -125,7 +125,7 @@ Select a product via it's `id`.
125
125
  ## List Option Types of a Product
126
126
 
127
127
  ```shell
128
- curl "https://kabuni.com/api/v2/products/1/option_types"
128
+ curl "https://example.com/api/v2/products/1/option_types"
129
129
  ```
130
130
 
131
131
  ```json
@@ -167,7 +167,7 @@ List all of the option types that a product owns via the product's `id`.
167
167
  ## Show Option Type of a Product
168
168
 
169
169
  ```shell
170
- curl "https://kabuni.com/api/v2/products/1/option_types/1"
170
+ curl "https://example.com/api/v2/products/1/option_types/1"
171
171
  ```
172
172
 
173
173
  ```json
@@ -207,7 +207,7 @@ Fetch an option type of a product by both of their `id`s.
207
207
  ## List Variants of a Product
208
208
 
209
209
  ```shell
210
- curl "https://kabuni.com/api/v2/products/1/variants"
210
+ curl "https://example.com/api/v2/products/1/variants"
211
211
  ```
212
212
 
213
213
  ```json
@@ -270,7 +270,7 @@ List all variants including the master of a product by the products `id`.
270
270
  ## Show Variant of a Product
271
271
 
272
272
  ```shell
273
- curl "https://kabuni.com/api/v2/products/1/variants/1"
273
+ curl "https://example.com/api/v2/products/1/variants/1"
274
274
  ```
275
275
 
276
276
  ```json
@@ -331,7 +331,7 @@ Fetch a variant or a product's master variant that a product owns by the product
331
331
  ## List Images of a Product
332
332
 
333
333
  ```shell
334
- curl "https://kabuni.com/api/v2/products/1/images"
334
+ curl "https://example.com/api/v2/products/1/images"
335
335
  ```
336
336
 
337
337
  ```json
@@ -369,7 +369,7 @@ List all of the images that belong to a product via the product's `id`.
369
369
  ## Show Image of a Product
370
370
 
371
371
  ```shell
372
- curl "https://kabuni.com/api/v2/products/1/images/21"
372
+ curl "https://example.com/api/v2/products/1/images/21"
373
373
  ```
374
374
 
375
375
  ```json
@@ -3,7 +3,7 @@
3
3
  ## List States
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/states"
6
+ curl "https://example.com/api/v2/states"
7
7
  ```
8
8
 
9
9
  ```json
@@ -34,7 +34,7 @@ This will list all of the states.
34
34
  ## Show State
35
35
 
36
36
  ```shell
37
- curl "https://kabuni.com/api/v2/states/1"
37
+ curl "https://example.com/api/v2/states/1"
38
38
  ```
39
39
 
40
40
  ```json
@@ -63,7 +63,7 @@ Select a state via its `id`.
63
63
  ## Show Country of a States
64
64
 
65
65
  ```shell
66
- curl "https://kabuni.com/api/v2/states/1/countries"
66
+ curl "https://example.com/api/v2/states/1/countries"
67
67
  ```
68
68
 
69
69
  ```json
@@ -3,7 +3,7 @@
3
3
  ## List Taxonomies
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/taxonomies"
6
+ curl "https://example.com/api/v2/taxonomies"
7
7
  ```
8
8
 
9
9
  ```json
@@ -48,7 +48,7 @@ List of the taxonomies in the database.
48
48
  ## Show Taxonomy
49
49
 
50
50
  ```shell
51
- curl "https://kabuni.com/api/v2/taxonomies/1"
51
+ curl "https://example.com/api/v2/taxonomies/1"
52
52
  ```
53
53
 
54
54
  ```json
@@ -91,7 +91,7 @@ Select a taxonomy via the `id`.
91
91
  ## List Taxons of a Taxonomy
92
92
 
93
93
  ```shell
94
- curl "https://kabuni.com/api/v2/taxonomies/1/taxons"
94
+ curl "https://example.com/api/v2/taxonomies/1/taxons"
95
95
  ```
96
96
 
97
97
  ```json
@@ -177,7 +177,7 @@ List all of the taxons that a taxonomy has a reference to.
177
177
  ## Show Taxon of a Taxonomy
178
178
 
179
179
  ```shell
180
- curl "https://kabuni.com/api/v2/taxonomies/1/taxons/1"
180
+ curl "https://example.com/api/v2/taxonomies/1/taxons/1"
181
181
  ```
182
182
 
183
183
  ```json
@@ -224,7 +224,7 @@ Find a taxon that the taxonomy owns via the taxonomy's `id` and the taxon's `id`
224
224
  ## List Children of a Taxonomy
225
225
 
226
226
  ```shell
227
- curl "https://kabuni.com/api/v2/taxonomies/1/children"
227
+ curl "https://example.com/api/v2/taxonomies/1/children"
228
228
  ```
229
229
 
230
230
  ```json
@@ -277,7 +277,7 @@ This does _not_ include the root taxon that would be included when listing all o
277
277
  ## Show Child of a Taxonomy
278
278
 
279
279
  ```shell
280
- curl "https://kabuni.com/api/v2/taxonomies/1/children/2"
280
+ curl "https://example.com/api/v2/taxonomies/1/children/2"
281
281
  ```
282
282
 
283
283
  ```json
@@ -3,7 +3,7 @@
3
3
  ## List Taxons
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/taxons"
6
+ curl "https://example.com/api/v2/taxons"
7
7
  ```
8
8
 
9
9
  ```json
@@ -55,7 +55,7 @@ List all the taxons in the database.
55
55
  ## Show Taxon
56
56
 
57
57
  ```shell
58
- curl "https://kabuni.com/api/v2/taxons/1"
58
+ curl "https://example.com/api/v2/taxons/1"
59
59
  ```
60
60
 
61
61
  ```json
@@ -102,7 +102,7 @@ Locate the taxon that you're looking for via its `id`.
102
102
  ## Show Taxonomy of a Taxon
103
103
 
104
104
  ```shell
105
- curl "https://kabuni.com/api/v2/taxons/1/taxonomy"
105
+ curl "https://example.com/api/v2/taxons/1/taxonomy"
106
106
  ```
107
107
 
108
108
  ```json
@@ -145,7 +145,7 @@ Display the taxonomy that a taxon belongs.
145
145
  ## Show Parent of a Taxon
146
146
 
147
147
  ```shell
148
- curl "https://kabuni.com/api/v2/taxons/2/parent"
148
+ curl "https://example.com/api/v2/taxons/2/parent"
149
149
  ```
150
150
 
151
151
  ```json
@@ -192,7 +192,7 @@ Display the parent taxon that a taxon may belong to.
192
192
  ## List Children of a Taxon
193
193
 
194
194
  ```shell
195
- curl "https://kabuni.com/api/v2/taxons/1/children"
195
+ curl "https://example.com/api/v2/taxons/1/children"
196
196
  ```
197
197
 
198
198
  ```json
@@ -244,7 +244,7 @@ List all the children that a taxon has.
244
244
  ## Show Child of a Taxon
245
245
 
246
246
  ```shell
247
- curl "https://kabuni.com/api/v2/taxons/1/children/2"
247
+ curl "https://example.com/api/v2/taxons/1/children/2"
248
248
  ```
249
249
 
250
250
  ```json
@@ -294,7 +294,7 @@ Find a child via its `id` and its owners (taxon) `id`.
294
294
  ## List Products of a Taxon
295
295
 
296
296
  ```shell
297
- curl "https://kabuni.com/api/v2/taxons/1/products"
297
+ curl "https://example.com/api/v2/taxons/1/products"
298
298
  ```
299
299
 
300
300
  ```json
@@ -356,7 +356,7 @@ List all of the products that taxon owns via the taxons `id`.
356
356
  ## Show Product of a Taxon
357
357
 
358
358
  ```shell
359
- curl "https://kabuni.com/api/v2/taxons/1/products/10"
359
+ curl "https://example.com/api/v2/taxons/1/products/10"
360
360
  ```
361
361
 
362
362
  ```json
@@ -3,7 +3,7 @@
3
3
  ## List Variants
4
4
 
5
5
  ```shell
6
- curl "https://kabuni.com/api/v2/variants"
6
+ curl "https://example.com/api/v2/variants"
7
7
  ```
8
8
 
9
9
  ```json
@@ -70,7 +70,7 @@ List all variants in the DB including master variants.
70
70
  ## Show Variant
71
71
 
72
72
  ```shell
73
- curl "https://kabuni.com/api/v2/variants/1"
73
+ curl "https://example.com/api/v2/variants/1"
74
74
  ```
75
75
 
76
76
  ```json
@@ -135,7 +135,7 @@ Fetch a variant by its `id`.
135
135
  ## List Prices of a Variant
136
136
 
137
137
  ```shell
138
- curl "https://kabuni.com/api/v2/variants/1/prices"
138
+ curl "https://example.com/api/v2/variants/1/prices"
139
139
  ```
140
140
 
141
141
  ```json
@@ -188,7 +188,7 @@ List all of the prices for a variant.
188
188
  ## Show Price of a Variant
189
189
 
190
190
  ```shell
191
- curl "https://kabuni.com/api/v2/variants/1/prices/1"
191
+ curl "https://example.com/api/v2/variants/1/prices/1"
192
192
  ```
193
193
 
194
194
  ```json
@@ -220,7 +220,7 @@ Fetch a price for a variant by the price and variants `id`.
220
220
  ## Show Product of a Variant
221
221
 
222
222
  ```shell
223
- curl "https://kabuni.com/api/v2/variants/1/product"
223
+ curl "https://example.com/api/v2/variants/1/product"
224
224
  ```
225
225
 
226
226
  ```json
@@ -280,7 +280,7 @@ Fetch the product the a variant belongs to by the variant's `id`.
280
280
  ## List Option Values of a Variant
281
281
 
282
282
  ```shell
283
- curl "https://kabuni.com/api/v2/variants/1/option_values"
283
+ curl "https://example.com/api/v2/variants/1/option_values"
284
284
  ```
285
285
 
286
286
  ```json
@@ -320,7 +320,7 @@ List all of the option values that belong to a variant via the variant's `id`.
320
320
  ## Show Option Value of a Variant
321
321
 
322
322
  ```shell
323
- curl "https://kabuni.com/api/v2/variants/1/option_values/1"
323
+ curl "https://example.com/api/v2/variants/1/option_values/1"
324
324
  ```
325
325
 
326
326
  ```json
@@ -358,7 +358,7 @@ Fetch an option value via the option value's `id` and the variant's `id`.
358
358
  ## List Images of a Variant
359
359
 
360
360
  ```shell
361
- curl "https://kabuni.com/api/v2/variants/1/images"
361
+ curl "https://example.com/api/v2/variants/1/images"
362
362
  ```
363
363
 
364
364
  ```json
@@ -396,7 +396,7 @@ List all of the images of a variant via the variant's `id`.
396
396
  ## Show Image of a Variant
397
397
 
398
398
  ```shell
399
- curl "https://kabuni.com/api/v2/variants/1/images/21"
399
+ curl "https://example.com/api/v2/variants/1/images/21"
400
400
  ```
401
401
 
402
402
  ```json
@@ -2,4 +2,6 @@ require 'solidus_core'
2
2
  require 'active_model_serializers'
3
3
 
4
4
  ENV['SOLIDUS_API'] = 'true'
5
+
6
+ require 'spree_api_v2/config'
5
7
  require 'spree_api_v2/engine'
@@ -1,4 +1,5 @@
1
1
  require 'spree_core'
2
2
  require 'active_model_serializers'
3
3
 
4
+ require 'spree_api_v2/config'
4
5
  require 'spree_api_v2/engine'
@@ -0,0 +1,8 @@
1
+ module SpreeApiV2
2
+ mattr_accessor :parent_serializer
3
+ @@parent_serializer = ActiveModel::Serializer
4
+
5
+ def self.setup
6
+ yield self
7
+ end
8
+ end
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'solidus_api_v2'
5
- s.version = '0.2.1'
5
+ s.version = '0.2.2'
6
6
  s.summary = 'The V2 API for Solidus.'
7
7
  s.description = 'Adds an assortment of new api endpoints that are JSON API compatible.'
8
8
  s.required_ruby_version = '>= 2.0.0'
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_api_v2'
5
- s.version = '0.2.1'
5
+ s.version = '0.2.2'
6
6
  s.summary = 'The V2 API for Spree.'
7
7
  s.description = 'Adds an assortment of new api endpoints that are JSON API compatible.'
8
8
  s.required_ruby_version = '>= 2.0.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_api_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben A. Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-17 00:00:00.000000000 Z
11
+ date: 2015-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -339,6 +339,7 @@ files:
339
339
  - docs/source/stylesheets/screen.css.scss
340
340
  - lib/solidus_api_v2.rb
341
341
  - lib/spree_api_v2.rb
342
+ - lib/spree_api_v2/config.rb
342
343
  - lib/spree_api_v2/engine.rb
343
344
  - solidus_api_v2.gemspec
344
345
  - spec/controllers/spree/api/v2/children_controller_spec.rb