spree_api_v2 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/CHANGELOG.md +38 -0
  5. data/Gemfile +13 -0
  6. data/LICENSE +26 -0
  7. data/README.md +98 -0
  8. data/Rakefile +37 -0
  9. data/app/controllers/concerns/spree/api/v2/renderable.rb +51 -0
  10. data/app/controllers/spree/api/v2/base_controller.rb +31 -0
  11. data/app/controllers/spree/api/v2/children_controller.rb +29 -0
  12. data/app/controllers/spree/api/v2/countries_controller.rb +21 -0
  13. data/app/controllers/spree/api/v2/images_controller.rb +29 -0
  14. data/app/controllers/spree/api/v2/line_items_controller.rb +36 -0
  15. data/app/controllers/spree/api/v2/option_types_controller.rb +31 -0
  16. data/app/controllers/spree/api/v2/option_values_controller.rb +29 -0
  17. data/app/controllers/spree/api/v2/orders_controller.rb +11 -0
  18. data/app/controllers/spree/api/v2/prices_controller.rb +27 -0
  19. data/app/controllers/spree/api/v2/products_controller.rb +37 -0
  20. data/app/controllers/spree/api/v2/states_controller.rb +29 -0
  21. data/app/controllers/spree/api/v2/taxonomies_controller.rb +21 -0
  22. data/app/controllers/spree/api/v2/taxons_controller.rb +40 -0
  23. data/app/controllers/spree/api/v2/variants_controller.rb +35 -0
  24. data/app/models/spree/base_decorator.rb +5 -0
  25. data/app/models/spree/image_decorator.rb +3 -0
  26. data/app/models/spree/price_decorator.rb +3 -0
  27. data/app/models/spree/state_decorator.rb +3 -0
  28. data/app/serializers/spree/address_serializer.rb +9 -0
  29. data/app/serializers/spree/base_serializer.rb +13 -0
  30. data/app/serializers/spree/country_serializer.rb +7 -0
  31. data/app/serializers/spree/error_serializer.rb +52 -0
  32. data/app/serializers/spree/image_serializer.rb +13 -0
  33. data/app/serializers/spree/line_item_serializer.rb +13 -0
  34. data/app/serializers/spree/option_type_serializer.rb +8 -0
  35. data/app/serializers/spree/option_value_serializer.rb +8 -0
  36. data/app/serializers/spree/order_serializer.rb +21 -0
  37. data/app/serializers/spree/price_serializer.rb +7 -0
  38. data/app/serializers/spree/product_serializer.rb +12 -0
  39. data/app/serializers/spree/role_serializer.rb +5 -0
  40. data/app/serializers/spree/state_serializer.rb +7 -0
  41. data/app/serializers/spree/store_serializer.rb +6 -0
  42. data/app/serializers/spree/taxon_serializer.rb +16 -0
  43. data/app/serializers/spree/taxonomy_serializer.rb +7 -0
  44. data/app/serializers/spree/user_serializer.rb +5 -0
  45. data/app/serializers/spree/variant_serializer.rb +12 -0
  46. data/bin/rails +7 -0
  47. data/circle.yml +13 -0
  48. data/config/locales/en.yml +25 -0
  49. data/config/routes.rb +53 -0
  50. data/docs/.nojekyll +0 -0
  51. data/docs/Dockerfile +12 -0
  52. data/docs/Gemfile +13 -0
  53. data/docs/README.md +12 -0
  54. data/docs/Rakefile +9 -0
  55. data/docs/config.rb +39 -0
  56. data/docs/font-selection.json +148 -0
  57. data/docs/source/fonts/slate.eot +0 -0
  58. data/docs/source/fonts/slate.svg +14 -0
  59. data/docs/source/fonts/slate.ttf +0 -0
  60. data/docs/source/fonts/slate.woff +0 -0
  61. data/docs/source/fonts/slate.woff2 +0 -0
  62. data/docs/source/images/logo.png +0 -0
  63. data/docs/source/images/navbar.png +0 -0
  64. data/docs/source/includes/_authentication.md +61 -0
  65. data/docs/source/includes/_countries.md +133 -0
  66. data/docs/source/includes/_errors.md +17 -0
  67. data/docs/source/includes/_filtering.md +11 -0
  68. data/docs/source/includes/_images.md +201 -0
  69. data/docs/source/includes/_line_items.md +137 -0
  70. data/docs/source/includes/_option_types.md +267 -0
  71. data/docs/source/includes/_option_values.md +227 -0
  72. data/docs/source/includes/_orders.md +75 -0
  73. data/docs/source/includes/_pagination.md +10 -0
  74. data/docs/source/includes/_prices.md +188 -0
  75. data/docs/source/includes/_products.md +403 -0
  76. data/docs/source/includes/_states.md +96 -0
  77. data/docs/source/includes/_taxonomies.md +325 -0
  78. data/docs/source/includes/_taxons.md +414 -0
  79. data/docs/source/includes/_variants.md +430 -0
  80. data/docs/source/index.md +53 -0
  81. data/docs/source/javascripts/all.js +4 -0
  82. data/docs/source/javascripts/all_nosearch.js +3 -0
  83. data/docs/source/javascripts/app/_lang.js +162 -0
  84. data/docs/source/javascripts/app/_search.js +74 -0
  85. data/docs/source/javascripts/app/_toc.js +55 -0
  86. data/docs/source/javascripts/lib/_energize.js +169 -0
  87. data/docs/source/javascripts/lib/_imagesloaded.min.js +7 -0
  88. data/docs/source/javascripts/lib/_jquery.highlight.js +108 -0
  89. data/docs/source/javascripts/lib/_jquery.tocify.js +1042 -0
  90. data/docs/source/javascripts/lib/_jquery_ui.js +566 -0
  91. data/docs/source/javascripts/lib/_lunr.js +1910 -0
  92. data/docs/source/layouts/layout.erb +102 -0
  93. data/docs/source/stylesheets/_icon-font.scss +38 -0
  94. data/docs/source/stylesheets/_normalize.css +427 -0
  95. data/docs/source/stylesheets/_syntax.scss.erb +27 -0
  96. data/docs/source/stylesheets/_variables.scss +109 -0
  97. data/docs/source/stylesheets/print.css.scss +142 -0
  98. data/docs/source/stylesheets/screen.css.scss +622 -0
  99. data/lib/solidus_api_v2.rb +5 -0
  100. data/lib/spree_api_v2.rb +4 -0
  101. data/lib/spree_api_v2/engine.rb +21 -0
  102. data/solidus_api_v2.gemspec +36 -0
  103. data/spec/controllers/spree/api/v2/children_controller_spec.rb +28 -0
  104. data/spec/controllers/spree/api/v2/countries_controller_spec.rb +25 -0
  105. data/spec/controllers/spree/api/v2/images_controller_spec.rb +93 -0
  106. data/spec/controllers/spree/api/v2/line_items_controller_spec.rb +86 -0
  107. data/spec/controllers/spree/api/v2/option_types_controller_spec.rb +73 -0
  108. data/spec/controllers/spree/api/v2/option_values_controller_spec.rb +88 -0
  109. data/spec/controllers/spree/api/v2/orders_controller_spec.rb +15 -0
  110. data/spec/controllers/spree/api/v2/prices_controller_spec.rb +55 -0
  111. data/spec/controllers/spree/api/v2/products_controller_spec.rb +95 -0
  112. data/spec/controllers/spree/api/v2/states_controller_spec.rb +42 -0
  113. data/spec/controllers/spree/api/v2/taxonomies_controller_spec.rb +31 -0
  114. data/spec/controllers/spree/api/v2/taxons_controller_spec.rb +54 -0
  115. data/spec/controllers/spree/api/v2/variants_controller_spec.rb +108 -0
  116. data/spec/models/spree/base_decorator_spec.rb +9 -0
  117. data/spec/models/spree/price_decorator_spec.rb +3 -0
  118. data/spec/serializers/spree/address_serializer_spec.rb +35 -0
  119. data/spec/serializers/spree/country_serializer_spec.rb +27 -0
  120. data/spec/serializers/spree/error_serializer_spec.rb +116 -0
  121. data/spec/serializers/spree/image_serializer_spec.rb +30 -0
  122. data/spec/serializers/spree/line_item_serializer_spec.rb +40 -0
  123. data/spec/serializers/spree/option_type_serializer_spec.rb +27 -0
  124. data/spec/serializers/spree/option_value_serializer_spec.rb +29 -0
  125. data/spec/serializers/spree/order_serializer_spec.rb +69 -0
  126. data/spec/serializers/spree/price_serializer_spec.rb +28 -0
  127. data/spec/serializers/spree/product_serializer_spec.rb +47 -0
  128. data/spec/serializers/spree/role_serializer_spec.rb +17 -0
  129. data/spec/serializers/spree/state_serializer_spec.rb +25 -0
  130. data/spec/serializers/spree/store_serializer_spec.rb +25 -0
  131. data/spec/serializers/spree/taxon_serializer_spec.rb +44 -0
  132. data/spec/serializers/spree/taxonomy_serializer_spec.rb +27 -0
  133. data/spec/serializers/spree/user_serializer_spec.rb +17 -0
  134. data/spec/serializers/spree/variant_serializer_spec.rb +55 -0
  135. data/spec/spec_helper.rb +51 -0
  136. data/spec/support/shoulda_matchers.rb +6 -0
  137. data/spree_api_v2.gemspec +36 -0
  138. metadata +437 -0
@@ -0,0 +1,96 @@
1
+ # States
2
+
3
+ ## List States
4
+
5
+ ```shell
6
+ curl "https://kabuni.com/api/v2/states"
7
+ ```
8
+
9
+ ```json
10
+ {
11
+ "data": [
12
+ {
13
+ "id": "1",
14
+ "type": "spree_states",
15
+ "attributes": {
16
+ "name": "Canillo",
17
+ "abbr": "02"
18
+ },
19
+ "relationships": {
20
+ "country": {
21
+ "data": {
22
+ "type": "spree_countries",
23
+ "id": "1"
24
+ }
25
+ }
26
+ }
27
+ }
28
+ ]
29
+ }
30
+ ```
31
+
32
+ This will list all of the states.
33
+
34
+ ## Show State
35
+
36
+ ```shell
37
+ curl "https://kabuni.com/api/v2/states/1"
38
+ ```
39
+
40
+ ```json
41
+ {
42
+ "data": {
43
+ "id": "1",
44
+ "type": "spree_states",
45
+ "attributes": {
46
+ "name": "Canillo",
47
+ "abbr": "02"
48
+ },
49
+ "relationships": {
50
+ "country": {
51
+ "data": {
52
+ "type": "spree_countries",
53
+ "id": "1"
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ Select a state via its `id`.
62
+
63
+ ## Show Country of a States
64
+
65
+ ```shell
66
+ curl "https://kabuni.com/api/v2/states/1/countries"
67
+ ```
68
+
69
+ ```json
70
+ {
71
+ "data": {
72
+ "id": "1",
73
+ "type": "spree_countries",
74
+ "attributes": {
75
+ "iso_name": "ANDORRA",
76
+ "iso": "AD",
77
+ "iso3": "AND",
78
+ "name": "Andorra",
79
+ "numcode": 20,
80
+ "states_required": true
81
+ },
82
+ "relationships": {
83
+ "states": {
84
+ "data": [
85
+ {
86
+ "type": "spree_states",
87
+ "id": "1"
88
+ }
89
+ ]
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ View the country that a state belongs to via the state's `id`.
@@ -0,0 +1,325 @@
1
+ # Taxonomies
2
+
3
+ ## List Taxonomies
4
+
5
+ ```shell
6
+ curl "https://kabuni.com/api/v2/taxonomies"
7
+ ```
8
+
9
+ ```json
10
+ {
11
+ "data": [
12
+ {
13
+ "id": "1",
14
+ "type": "spree_taxonomies",
15
+ "attributes": {
16
+ "name": "Category",
17
+ "position": 1
18
+ },
19
+ "relationships": {
20
+ "taxons": {
21
+ "data": [
22
+ {
23
+ "type": "spree_taxons",
24
+ "id": "2"
25
+ },
26
+ {
27
+ "type": "spree_taxons",
28
+ "id": "1"
29
+ }
30
+ ]
31
+ },
32
+ "children": {
33
+ "data": [
34
+ {
35
+ "type": "spree_taxons",
36
+ "id": "2"
37
+ }
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ ]
43
+ }
44
+ ```
45
+
46
+ List of the taxonomies in the database.
47
+
48
+ ## Show Taxonomy
49
+
50
+ ```shell
51
+ curl "https://kabuni.com/api/v2/taxonomies/1"
52
+ ```
53
+
54
+ ```json
55
+ {
56
+ "data": {
57
+ "id": "1",
58
+ "type": "spree_taxonomies",
59
+ "attributes": {
60
+ "name": "Category",
61
+ "position": 1
62
+ },
63
+ "relationships": {
64
+ "taxons": {
65
+ "data": [
66
+ {
67
+ "type": "spree_taxons",
68
+ "id": "2"
69
+ },
70
+ {
71
+ "type": "spree_taxons",
72
+ "id": "1"
73
+ }
74
+ ]
75
+ },
76
+ "children": {
77
+ "data": [
78
+ {
79
+ "type": "spree_taxons",
80
+ "id": "2"
81
+ }
82
+ ]
83
+ }
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ Select a taxonomy via the `id`.
90
+
91
+ ## List Taxons of a Taxonomy
92
+
93
+ ```shell
94
+ curl "https://kabuni.com/api/v2/taxonomies/1/taxons"
95
+ ```
96
+
97
+ ```json
98
+ {
99
+ "data": [
100
+ {
101
+ "id": "2",
102
+ "type": "spree_taxons",
103
+ "attributes": {
104
+ "name": "SLEEP",
105
+ "permalink": "category/sleep",
106
+ "position": 0,
107
+ "description": null,
108
+ "meta_title": null,
109
+ "meta_description": null,
110
+ "meta_keywords": null,
111
+ "depth": 1,
112
+ "classifications_count": null
113
+ },
114
+ "relationships": {
115
+ "taxonomy": {
116
+ "data": {
117
+ "type": "spree_taxonomies",
118
+ "id": "1"
119
+ }
120
+ },
121
+ "parent": {
122
+ "data": {
123
+ "type": "spree_taxons",
124
+ "id": "1"
125
+ }
126
+ },
127
+ "children": {
128
+ "data": [
129
+ {
130
+ "type": "spree_taxons",
131
+ "id": "3"
132
+ }
133
+ ]
134
+ }
135
+ }
136
+ },
137
+ {
138
+ "id": "1",
139
+ "type": "spree_taxons",
140
+ "attributes": {
141
+ "name": "Category",
142
+ "permalink": "category",
143
+ "position": 0,
144
+ "description": null,
145
+ "meta_title": null,
146
+ "meta_description": null,
147
+ "meta_keywords": null,
148
+ "depth": 0,
149
+ "classifications_count": 1
150
+ },
151
+ "relationships": {
152
+ "taxonomy": {
153
+ "data": {
154
+ "type": "spree_taxonomies",
155
+ "id": "1"
156
+ }
157
+ },
158
+ "parent": {
159
+ "data": null
160
+ },
161
+ "children": {
162
+ "data": [
163
+ {
164
+ "type": "spree_taxons",
165
+ "id": "2"
166
+ }
167
+ ]
168
+ }
169
+ }
170
+ }
171
+ ]
172
+ }
173
+ ```
174
+
175
+ List all of the taxons that a taxonomy has a reference to.
176
+
177
+ ## Show Taxon of a Taxonomy
178
+
179
+ ```shell
180
+ curl "https://kabuni.com/api/v2/taxonomies/1/taxons/1"
181
+ ```
182
+
183
+ ```json
184
+ {
185
+ "data": {
186
+ "id": "1",
187
+ "type": "spree_taxons",
188
+ "attributes": {
189
+ "name": "Category",
190
+ "permalink": "category",
191
+ "position": 0,
192
+ "description": null,
193
+ "meta_title": null,
194
+ "meta_description": null,
195
+ "meta_keywords": null,
196
+ "depth": 0,
197
+ "classifications_count": 1
198
+ },
199
+ "relationships": {
200
+ "taxonomy": {
201
+ "data": {
202
+ "type": "spree_taxonomies",
203
+ "id": "1"
204
+ }
205
+ },
206
+ "parent": {
207
+ "data": null
208
+ },
209
+ "children": {
210
+ "data": [
211
+ {
212
+ "type": "spree_taxons",
213
+ "id": "2"
214
+ }
215
+ ]
216
+ }
217
+ }
218
+ }
219
+ }
220
+ ```
221
+
222
+ Find a taxon that the taxonomy owns via the taxonomy's `id` and the taxon's `id`.
223
+
224
+ ## List Children of a Taxonomy
225
+
226
+ ```shell
227
+ curl "https://kabuni.com/api/v2/taxonomies/1/children"
228
+ ```
229
+
230
+ ```json
231
+ {
232
+ "data": [
233
+ {
234
+ "id": "2",
235
+ "type": "spree_taxons",
236
+ "attributes": {
237
+ "name": "SLEEP",
238
+ "permalink": "category/sleep",
239
+ "position": 0,
240
+ "description": null,
241
+ "meta_title": null,
242
+ "meta_description": null,
243
+ "meta_keywords": null,
244
+ "depth": 1,
245
+ "classifications_count": null
246
+ },
247
+ "relationships": {
248
+ "taxonomy": {
249
+ "data": {
250
+ "type": "spree_taxonomies",
251
+ "id": "1"
252
+ }
253
+ },
254
+ "parent": {
255
+ "data": {
256
+ "type": "spree_taxons",
257
+ "id": "1"
258
+ }
259
+ },
260
+ "children": {
261
+ "data": [
262
+ {
263
+ "type": "spree_taxons",
264
+ "id": "3"
265
+ }
266
+ ]
267
+ }
268
+ }
269
+ }
270
+ ]
271
+ }
272
+ ```
273
+
274
+ List all of the children of a taxonomy.
275
+ This does _not_ include the root taxon that would be included when listing all of the taxons of this taxonomy.
276
+
277
+ ## Show Child of a Taxonomy
278
+
279
+ ```shell
280
+ curl "https://kabuni.com/api/v2/taxonomies/1/children/2"
281
+ ```
282
+
283
+ ```json
284
+ {
285
+ "data": {
286
+ "id": "2",
287
+ "type": "spree_taxons",
288
+ "attributes": {
289
+ "name": "SLEEP",
290
+ "permalink": "category/sleep",
291
+ "position": 0,
292
+ "description": null,
293
+ "meta_title": null,
294
+ "meta_description": null,
295
+ "meta_keywords": null,
296
+ "depth": 1,
297
+ "classifications_count": null
298
+ },
299
+ "relationships": {
300
+ "taxonomy": {
301
+ "data": {
302
+ "type": "spree_taxonomies",
303
+ "id": "1"
304
+ }
305
+ },
306
+ "parent": {
307
+ "data": {
308
+ "type": "spree_taxons",
309
+ "id": "1"
310
+ }
311
+ },
312
+ "children": {
313
+ "data": [
314
+ {
315
+ "type": "spree_taxons",
316
+ "id": "3"
317
+ }
318
+ ]
319
+ }
320
+ }
321
+ }
322
+ }
323
+ ```
324
+
325
+ Fetch a child of the taxnomy via the taxonomy's `id` and the child's `id`.
@@ -0,0 +1,414 @@
1
+ # Taxons
2
+
3
+ ## List Taxons
4
+
5
+ ```shell
6
+ curl "https://kabuni.com/api/v2/taxons"
7
+ ```
8
+
9
+ ```json
10
+ {
11
+ "data": [
12
+ {
13
+ "id": "2",
14
+ "type": "spree_taxons",
15
+ "attributes": {
16
+ "name": "SLEEP",
17
+ "permalink": "category/sleep",
18
+ "position": 0,
19
+ "description": null,
20
+ "meta_title": null,
21
+ "meta_description": null,
22
+ "meta_keywords": null,
23
+ "depth": 1,
24
+ "classifications_count": null
25
+ },
26
+ "relationships": {
27
+ "taxonomy": {
28
+ "data": {
29
+ "type": "spree_taxonomies",
30
+ "id": "1"
31
+ }
32
+ },
33
+ "parent": {
34
+ "data": {
35
+ "type": "spree_taxons",
36
+ "id": "1"
37
+ }
38
+ },
39
+ "children": {
40
+ "data": [
41
+ {
42
+ "type": "spree_taxons",
43
+ "id": "3"
44
+ }
45
+ ]
46
+ }
47
+ }
48
+ }
49
+ ]
50
+ }
51
+ ```
52
+
53
+ List all the taxons in the database.
54
+
55
+ ## Show Taxon
56
+
57
+ ```shell
58
+ curl "https://kabuni.com/api/v2/taxons/1"
59
+ ```
60
+
61
+ ```json
62
+ {
63
+ "data": {
64
+ "id": "1",
65
+ "type": "spree_taxons",
66
+ "attributes": {
67
+ "name": "Category",
68
+ "permalink": "category",
69
+ "position": 0,
70
+ "description": null,
71
+ "meta_title": null,
72
+ "meta_description": null,
73
+ "meta_keywords": null,
74
+ "depth": 0,
75
+ "classifications_count": 1
76
+ },
77
+ "relationships": {
78
+ "taxonomy": {
79
+ "data": {
80
+ "type": "spree_taxonomies",
81
+ "id": "1"
82
+ }
83
+ },
84
+ "parent": {
85
+ "data": null
86
+ },
87
+ "children": {
88
+ "data": [
89
+ {
90
+ "type": "spree_taxons",
91
+ "id": "2"
92
+ }
93
+ ]
94
+ }
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ Locate the taxon that you're looking for via its `id`.
101
+
102
+ ## Show Taxonomy of a Taxon
103
+
104
+ ```shell
105
+ curl "https://kabuni.com/api/v2/taxons/1/taxonomy"
106
+ ```
107
+
108
+ ```json
109
+ {
110
+ "data": {
111
+ "id": "1",
112
+ "type": "spree_taxonomies",
113
+ "attributes": {
114
+ "name": "Category",
115
+ "position": 1
116
+ },
117
+ "relationships": {
118
+ "taxons": {
119
+ "data": [
120
+ {
121
+ "type": "spree_taxons",
122
+ "id": "2"
123
+ },
124
+ {
125
+ "type": "spree_taxons",
126
+ "id": "1"
127
+ }
128
+ ]
129
+ },
130
+ "children": {
131
+ "data": [
132
+ {
133
+ "type": "spree_taxons",
134
+ "id": "2"
135
+ }
136
+ ]
137
+ }
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ Display the taxonomy that a taxon belongs.
144
+
145
+ ## Show Parent of a Taxon
146
+
147
+ ```shell
148
+ curl "https://kabuni.com/api/v2/taxons/2/parent"
149
+ ```
150
+
151
+ ```json
152
+ {
153
+ "data": {
154
+ "id": "1",
155
+ "type": "spree_taxons",
156
+ "attributes": {
157
+ "name": "Category",
158
+ "permalink": "category",
159
+ "position": 0,
160
+ "description": null,
161
+ "meta_title": null,
162
+ "meta_description": null,
163
+ "meta_keywords": null,
164
+ "depth": 0,
165
+ "classifications_count": 1
166
+ },
167
+ "relationships": {
168
+ "taxonomy": {
169
+ "data": {
170
+ "type": "spree_taxonomies",
171
+ "id": "1"
172
+ }
173
+ },
174
+ "parent": {
175
+ "data": null
176
+ },
177
+ "children": {
178
+ "data": [
179
+ {
180
+ "type": "spree_taxons",
181
+ "id": "2"
182
+ }
183
+ ]
184
+ }
185
+ }
186
+ }
187
+ }
188
+ ```
189
+
190
+ Display the parent taxon that a taxon may belong to.
191
+
192
+ ## List Children of a Taxon
193
+
194
+ ```shell
195
+ curl "https://kabuni.com/api/v2/taxons/1/children"
196
+ ```
197
+
198
+ ```json
199
+ {
200
+ "data": [
201
+ {
202
+ "id": "2",
203
+ "type": "spree_taxons",
204
+ "attributes": {
205
+ "name": "SLEEP",
206
+ "permalink": "category/sleep",
207
+ "position": 0,
208
+ "description": null,
209
+ "meta_title": null,
210
+ "meta_description": null,
211
+ "meta_keywords": null,
212
+ "depth": 1,
213
+ "classifications_count": null
214
+ },
215
+ "relationships": {
216
+ "taxonomy": {
217
+ "data": {
218
+ "type": "spree_taxonomies",
219
+ "id": "1"
220
+ }
221
+ },
222
+ "parent": {
223
+ "data": {
224
+ "type": "spree_taxons",
225
+ "id": "1"
226
+ }
227
+ },
228
+ "children": {
229
+ "data": [
230
+ {
231
+ "type": "spree_taxons",
232
+ "id": "3"
233
+ }
234
+ ]
235
+ }
236
+ }
237
+ }
238
+ ]
239
+ }
240
+ ```
241
+
242
+ List all the children that a taxon has.
243
+
244
+ ## Show Child of a Taxon
245
+
246
+ ```shell
247
+ curl "https://kabuni.com/api/v2/taxons/1/children/2"
248
+ ```
249
+
250
+ ```json
251
+ {
252
+ "data": {
253
+ "id": "2",
254
+ "type": "spree_taxons",
255
+ "attributes": {
256
+ "name": "SLEEP",
257
+ "permalink": "category/sleep",
258
+ "position": 0,
259
+ "description": null,
260
+ "meta_title": null,
261
+ "meta_description": null,
262
+ "meta_keywords": null,
263
+ "depth": 1,
264
+ "classifications_count": null
265
+ },
266
+ "relationships": {
267
+ "taxonomy": {
268
+ "data": {
269
+ "type": "spree_taxonomies",
270
+ "id": "1"
271
+ }
272
+ },
273
+ "parent": {
274
+ "data": {
275
+ "type": "spree_taxons",
276
+ "id": "1"
277
+ }
278
+ },
279
+ "children": {
280
+ "data": [
281
+ {
282
+ "type": "spree_taxons",
283
+ "id": "3"
284
+ }
285
+ ]
286
+ }
287
+ }
288
+ }
289
+ }
290
+ ```
291
+
292
+ Find a child via its `id` and its owners (taxon) `id`.
293
+
294
+ ## List Products of a Taxon
295
+
296
+ ```shell
297
+ curl "https://kabuni.com/api/v2/taxons/1/products"
298
+ ```
299
+
300
+ ```json
301
+ {
302
+ "data": [
303
+ {
304
+ "id": "10",
305
+ "type": "spree_products",
306
+ "attributes": {
307
+ "name": "Spree Ringer T-Shirt",
308
+ "description": "Velit nemo odio ducimus nobis non doloremque beatae sunt. Totam quia voluptatum perferendis tempore sed voluptate consequuntur. Sit id corporis autem veritatis reprehenderit.",
309
+ "slug": "spree-ringer-t-shirt",
310
+ "meta_description": null,
311
+ "meta_keywords": null,
312
+ "store_name": "Whole New Home"
313
+ },
314
+ "relationships": {
315
+ "master": {
316
+ "data": {
317
+ "type": "spree_variants",
318
+ "id": "10"
319
+ }
320
+ },
321
+ "variants": {
322
+ "data": []
323
+ },
324
+ "taxons": {
325
+ "data": [
326
+ {
327
+ "type": "spree_taxons",
328
+ "id": "1"
329
+ }
330
+ ]
331
+ },
332
+ "option_types": {
333
+ "data": [
334
+ {
335
+ "type": "spree_option_types",
336
+ "id": "1"
337
+ }
338
+ ]
339
+ },
340
+ "images": {
341
+ "data": [
342
+ {
343
+ "type": "spree_images",
344
+ "id": "1"
345
+ }
346
+ ]
347
+ }
348
+ }
349
+ }
350
+ ]
351
+ }
352
+ ```
353
+
354
+ List all of the products that taxon owns via the taxons `id`.
355
+
356
+ ## Show Product of a Taxon
357
+
358
+ ```shell
359
+ curl "https://kabuni.com/api/v2/taxons/1/products/10"
360
+ ```
361
+
362
+ ```json
363
+ {
364
+ "data": {
365
+ "id": "10",
366
+ "type": "spree_products",
367
+ "attributes": {
368
+ "name": "Spree Ringer T-Shirt",
369
+ "description": "Velit nemo odio ducimus nobis non doloremque beatae sunt. Totam quia voluptatum perferendis tempore sed voluptate consequuntur. Sit id corporis autem veritatis reprehenderit.",
370
+ "slug": "spree-ringer-t-shirt",
371
+ "meta_description": null,
372
+ "meta_keywords": null,
373
+ "store_name": "Whole New Home"
374
+ },
375
+ "relationships": {
376
+ "master": {
377
+ "data": {
378
+ "type": "spree_variants",
379
+ "id": "10"
380
+ }
381
+ },
382
+ "variants": {
383
+ "data": []
384
+ },
385
+ "taxons": {
386
+ "data": [
387
+ {
388
+ "type": "spree_taxons",
389
+ "id": "1"
390
+ }
391
+ ]
392
+ },
393
+ "option_types": {
394
+ "data": [
395
+ {
396
+ "type": "spree_option_types",
397
+ "id": "1"
398
+ }
399
+ ]
400
+ },
401
+ "images": {
402
+ "data": [
403
+ {
404
+ "type": "spree_images",
405
+ "id": "1"
406
+ }
407
+ ]
408
+ }
409
+ }
410
+ }
411
+ }
412
+ ```
413
+
414
+ Fetch a product of taxon via the taxon's `id` and the products `id`.