contentful-management 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/CHANGELOG.md +8 -0
  2. data/README.md +17 -0
  3. data/lib/contentful/management/array.rb +3 -1
  4. data/lib/contentful/management/asset.rb +16 -14
  5. data/lib/contentful/management/client.rb +1 -1
  6. data/lib/contentful/management/content_type.rb +18 -18
  7. data/lib/contentful/management/entry.rb +20 -19
  8. data/lib/contentful/management/locale.rb +4 -4
  9. data/lib/contentful/management/request.rb +4 -2
  10. data/lib/contentful/management/resource.rb +8 -8
  11. data/lib/contentful/management/resource/refresher.rb +8 -1
  12. data/lib/contentful/management/resource_builder.rb +3 -3
  13. data/lib/contentful/management/response.rb +10 -3
  14. data/lib/contentful/management/space.rb +11 -11
  15. data/lib/contentful/management/version.rb +1 -1
  16. data/spec/fixtures/vcr_cassettes/asset/create_with_locale.yml +151 -0
  17. data/spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml +123 -0
  18. data/spec/fixtures/vcr_cassettes/asset/reload.yml +406 -0
  19. data/spec/fixtures/vcr_cassettes/content_type/reload.yml +394 -0
  20. data/spec/fixtures/vcr_cassettes/entry/all.yml +231 -36
  21. data/spec/fixtures/vcr_cassettes/entry/content_type_entires.yml +99 -23
  22. data/spec/fixtures/vcr_cassettes/entry/create_with_specified_locale.yml +509 -0
  23. data/spec/fixtures/vcr_cassettes/entry/limited_entries.yml +236 -0
  24. data/spec/fixtures/vcr_cassettes/entry/reload.yml +1027 -0
  25. data/spec/fixtures/vcr_cassettes/locale/reload.yml +279 -0
  26. data/spec/fixtures/vcr_cassettes/space/asset/all_with_skip_and_limit.yml +355 -0
  27. data/spec/fixtures/vcr_cassettes/space/asset/with_skipped_and_limited_assets_next_page.yml +635 -0
  28. data/spec/fixtures/vcr_cassettes/space/entry/with_skipped_and_limited_entires_next_page.yml +648 -0
  29. data/spec/fixtures/vcr_cassettes/space/entry/with_skipped_andlimited_entires.yml +468 -0
  30. data/spec/fixtures/vcr_cassettes/space/reload.yml +739 -0
  31. data/spec/lib/contentful/management/asset_spec.rb +42 -2
  32. data/spec/lib/contentful/management/content_type_spec.rb +16 -1
  33. data/spec/lib/contentful/management/entry_spec.rb +38 -5
  34. data/spec/lib/contentful/management/locale_spec.rb +14 -0
  35. data/spec/lib/contentful/management/space_spec.rb +46 -2
  36. metadata +31 -5
@@ -0,0 +1,406 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets/8R4vbQXKbCkcSu26Wy2U0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContenfulManagementGem/0.0.2
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Content-Length:
17
+ - '0'
18
+ Host:
19
+ - api.contentful.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Tue, 19 Aug 2014 10:10:30 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1403'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - bfsvtul0c41g
39
+ Etag:
40
+ - '"2be36cc687cc0a25a0e36182b95f3ba7"'
41
+ Access-Control-Allow-Origin:
42
+ - "*"
43
+ Access-Control-Allow-Headers:
44
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
45
+ Access-Control-Allow-Methods:
46
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
47
+ "^access-Control-Expose-Headers":
48
+ - Etag
49
+ Access-Control-Max-Age:
50
+ - '1728000'
51
+ body:
52
+ encoding: UTF-8
53
+ string: |
54
+ {
55
+ "fields": {
56
+ "title": {
57
+ "en-US": "test"
58
+ },
59
+ "description": {
60
+ "en-US": "testowy"
61
+ },
62
+ "file": {
63
+ "en-US": {
64
+ "fileName": "Mowing_your_Lawn_-_Advice_and_Tips",
65
+ "contentType": "image/jpeg",
66
+ "details": {
67
+ "image": {
68
+ "width": 801,
69
+ "height": 1000
70
+ },
71
+ "size": 105202
72
+ },
73
+ "url": "//images.contentful.com/bfsvtul0c41g/8R4vbQXKbCkcSu26Wy2U0/4ca4dabb0305045fa5c3c786bf5d7592/mow.jpg"
74
+ }
75
+ }
76
+ },
77
+ "sys": {
78
+ "id": "8R4vbQXKbCkcSu26Wy2U0",
79
+ "type": "Asset",
80
+ "createdAt": "2014-08-19T07:25:10.104Z",
81
+ "createdBy": {
82
+ "sys": {
83
+ "type": "Link",
84
+ "linkType": "User",
85
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
86
+ }
87
+ },
88
+ "space": {
89
+ "sys": {
90
+ "type": "Link",
91
+ "linkType": "Space",
92
+ "id": "bfsvtul0c41g"
93
+ }
94
+ },
95
+ "firstPublishedAt": "2014-08-19T07:25:32.234Z",
96
+ "publishedCounter": 1,
97
+ "publishedAt": "2014-08-19T07:25:32.234Z",
98
+ "publishedBy": {
99
+ "sys": {
100
+ "type": "Link",
101
+ "linkType": "User",
102
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
103
+ }
104
+ },
105
+ "publishedVersion": 11,
106
+ "version": 14,
107
+ "updatedAt": "2014-08-19T10:09:26.237Z",
108
+ "updatedBy": {
109
+ "sys": {
110
+ "type": "Link",
111
+ "linkType": "User",
112
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
113
+ }
114
+ }
115
+ }
116
+ }
117
+ http_version:
118
+ recorded_at: Tue, 19 Aug 2014 10:10:26 GMT
119
+ - request:
120
+ method: put
121
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets/8R4vbQXKbCkcSu26Wy2U0
122
+ body:
123
+ encoding: UTF-8
124
+ string: '{"fields":{"title":{"en-US":"Updated name"},"description":{"en-US":"testowy"},"file":{"en-US":{"fileName":"Mowing_your_Lawn_-_Advice_and_Tips","contentType":"image/jpeg","details":{"image":{"width":801,"height":1000},"size":105202},"url":"//images.contentful.com/bfsvtul0c41g/8R4vbQXKbCkcSu26Wy2U0/4ca4dabb0305045fa5c3c786bf5d7592/mow.jpg"}}}}'
125
+ headers:
126
+ User-Agent:
127
+ - RubyContenfulManagementGem/0.0.2
128
+ Authorization:
129
+ - Bearer <ACCESS_TOKEN>
130
+ Content-Type:
131
+ - application/vnd.contentful.management.v1+json
132
+ X-Contentful-Version:
133
+ - '999'
134
+ Host:
135
+ - api.contentful.com
136
+ response:
137
+ status:
138
+ code: 400
139
+ message: Bad Request
140
+ headers:
141
+ Server:
142
+ - nginx
143
+ Date:
144
+ - Tue, 19 Aug 2014 10:10:31 GMT
145
+ Content-Type:
146
+ - application/vnd.contentful.management.v1+json
147
+ Transfer-Encoding:
148
+ - chunked
149
+ Connection:
150
+ - keep-alive
151
+ X-Powered-By:
152
+ - Express
153
+ Access-Control-Allow-Origin:
154
+ - "*"
155
+ Access-Control-Allow-Headers:
156
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
157
+ Access-Control-Allow-Methods:
158
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
159
+ "^access-Control-Expose-Headers":
160
+ - Etag
161
+ Access-Control-Max-Age:
162
+ - '1728000'
163
+ body:
164
+ encoding: UTF-8
165
+ string: |
166
+ {
167
+ "sys": {
168
+ "type": "Error",
169
+ "id": "VersionMismatch"
170
+ }
171
+ }
172
+ http_version:
173
+ recorded_at: Tue, 19 Aug 2014 10:10:27 GMT
174
+ - request:
175
+ method: get
176
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets/8R4vbQXKbCkcSu26Wy2U0
177
+ body:
178
+ encoding: US-ASCII
179
+ string: ''
180
+ headers:
181
+ User-Agent:
182
+ - RubyContenfulManagementGem/0.0.2
183
+ Authorization:
184
+ - Bearer <ACCESS_TOKEN>
185
+ Content-Type:
186
+ - application/vnd.contentful.management.v1+json
187
+ Content-Length:
188
+ - '0'
189
+ Host:
190
+ - api.contentful.com
191
+ response:
192
+ status:
193
+ code: 200
194
+ message: OK
195
+ headers:
196
+ Server:
197
+ - nginx
198
+ Date:
199
+ - Tue, 19 Aug 2014 10:10:34 GMT
200
+ Content-Type:
201
+ - application/vnd.contentful.management.v1+json
202
+ Content-Length:
203
+ - '1403'
204
+ Connection:
205
+ - keep-alive
206
+ X-Powered-By:
207
+ - Express
208
+ Cf-Space-Id:
209
+ - bfsvtul0c41g
210
+ Etag:
211
+ - '"2be36cc687cc0a25a0e36182b95f3ba7"'
212
+ Access-Control-Allow-Origin:
213
+ - "*"
214
+ Access-Control-Allow-Headers:
215
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
216
+ Access-Control-Allow-Methods:
217
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
218
+ "^access-Control-Expose-Headers":
219
+ - Etag
220
+ Access-Control-Max-Age:
221
+ - '1728000'
222
+ body:
223
+ encoding: UTF-8
224
+ string: |
225
+ {
226
+ "fields": {
227
+ "title": {
228
+ "en-US": "test"
229
+ },
230
+ "description": {
231
+ "en-US": "testowy"
232
+ },
233
+ "file": {
234
+ "en-US": {
235
+ "fileName": "Mowing_your_Lawn_-_Advice_and_Tips",
236
+ "contentType": "image/jpeg",
237
+ "details": {
238
+ "image": {
239
+ "width": 801,
240
+ "height": 1000
241
+ },
242
+ "size": 105202
243
+ },
244
+ "url": "//images.contentful.com/bfsvtul0c41g/8R4vbQXKbCkcSu26Wy2U0/4ca4dabb0305045fa5c3c786bf5d7592/mow.jpg"
245
+ }
246
+ }
247
+ },
248
+ "sys": {
249
+ "id": "8R4vbQXKbCkcSu26Wy2U0",
250
+ "type": "Asset",
251
+ "createdAt": "2014-08-19T07:25:10.104Z",
252
+ "createdBy": {
253
+ "sys": {
254
+ "type": "Link",
255
+ "linkType": "User",
256
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
257
+ }
258
+ },
259
+ "space": {
260
+ "sys": {
261
+ "type": "Link",
262
+ "linkType": "Space",
263
+ "id": "bfsvtul0c41g"
264
+ }
265
+ },
266
+ "firstPublishedAt": "2014-08-19T07:25:32.234Z",
267
+ "publishedCounter": 1,
268
+ "publishedAt": "2014-08-19T07:25:32.234Z",
269
+ "publishedBy": {
270
+ "sys": {
271
+ "type": "Link",
272
+ "linkType": "User",
273
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
274
+ }
275
+ },
276
+ "publishedVersion": 11,
277
+ "version": 14,
278
+ "updatedAt": "2014-08-19T10:09:26.237Z",
279
+ "updatedBy": {
280
+ "sys": {
281
+ "type": "Link",
282
+ "linkType": "User",
283
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
284
+ }
285
+ }
286
+ }
287
+ }
288
+ http_version:
289
+ recorded_at: Tue, 19 Aug 2014 10:10:30 GMT
290
+ - request:
291
+ method: put
292
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets/8R4vbQXKbCkcSu26Wy2U0
293
+ body:
294
+ encoding: UTF-8
295
+ string: '{"fields":{"title":{"en-US":"Updated name"},"description":{"en-US":"testowy"},"file":{"en-US":{"fileName":"Mowing_your_Lawn_-_Advice_and_Tips","contentType":"image/jpeg","details":{"image":{"width":801,"height":1000},"size":105202},"url":"//images.contentful.com/bfsvtul0c41g/8R4vbQXKbCkcSu26Wy2U0/4ca4dabb0305045fa5c3c786bf5d7592/mow.jpg"}}}}'
296
+ headers:
297
+ User-Agent:
298
+ - RubyContenfulManagementGem/0.0.2
299
+ Authorization:
300
+ - Bearer <ACCESS_TOKEN>
301
+ Content-Type:
302
+ - application/vnd.contentful.management.v1+json
303
+ X-Contentful-Version:
304
+ - '14'
305
+ Host:
306
+ - api.contentful.com
307
+ response:
308
+ status:
309
+ code: 200
310
+ message: OK
311
+ headers:
312
+ Server:
313
+ - nginx
314
+ Date:
315
+ - Tue, 19 Aug 2014 10:10:38 GMT
316
+ Content-Type:
317
+ - application/vnd.contentful.management.v1+json
318
+ Content-Length:
319
+ - '1411'
320
+ Connection:
321
+ - keep-alive
322
+ X-Powered-By:
323
+ - Express
324
+ Cf-Space-Id:
325
+ - bfsvtul0c41g
326
+ Etag:
327
+ - '"64660c53d01304bae4057875f1cc11b1"'
328
+ Access-Control-Allow-Origin:
329
+ - "*"
330
+ Access-Control-Allow-Headers:
331
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
332
+ Access-Control-Allow-Methods:
333
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
334
+ "^access-Control-Expose-Headers":
335
+ - Etag
336
+ Access-Control-Max-Age:
337
+ - '1728000'
338
+ body:
339
+ encoding: UTF-8
340
+ string: |
341
+ {
342
+ "fields": {
343
+ "title": {
344
+ "en-US": "Updated name"
345
+ },
346
+ "description": {
347
+ "en-US": "testowy"
348
+ },
349
+ "file": {
350
+ "en-US": {
351
+ "fileName": "Mowing_your_Lawn_-_Advice_and_Tips",
352
+ "contentType": "image/jpeg",
353
+ "details": {
354
+ "image": {
355
+ "width": 801,
356
+ "height": 1000
357
+ },
358
+ "size": 105202
359
+ },
360
+ "url": "//images.contentful.com/bfsvtul0c41g/8R4vbQXKbCkcSu26Wy2U0/4ca4dabb0305045fa5c3c786bf5d7592/mow.jpg"
361
+ }
362
+ }
363
+ },
364
+ "sys": {
365
+ "id": "8R4vbQXKbCkcSu26Wy2U0",
366
+ "type": "Asset",
367
+ "createdAt": "2014-08-19T07:25:10.104Z",
368
+ "createdBy": {
369
+ "sys": {
370
+ "type": "Link",
371
+ "linkType": "User",
372
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
373
+ }
374
+ },
375
+ "space": {
376
+ "sys": {
377
+ "type": "Link",
378
+ "linkType": "Space",
379
+ "id": "bfsvtul0c41g"
380
+ }
381
+ },
382
+ "firstPublishedAt": "2014-08-19T07:25:32.234Z",
383
+ "publishedCounter": 1,
384
+ "publishedAt": "2014-08-19T07:25:32.234Z",
385
+ "publishedBy": {
386
+ "sys": {
387
+ "type": "Link",
388
+ "linkType": "User",
389
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
390
+ }
391
+ },
392
+ "publishedVersion": 11,
393
+ "version": 15,
394
+ "updatedAt": "2014-08-19T10:10:38.257Z",
395
+ "updatedBy": {
396
+ "sys": {
397
+ "type": "Link",
398
+ "linkType": "User",
399
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
400
+ }
401
+ }
402
+ }
403
+ }
404
+ http_version:
405
+ recorded_at: Tue, 19 Aug 2014 10:10:34 GMT
406
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,394 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/content_types/category_content_type
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContenfulManagementGem/0.0.2
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Content-Length:
17
+ - '0'
18
+ Host:
19
+ - api.contentful.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Tue, 19 Aug 2014 12:15:28 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1253'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - bfsvtul0c41g
39
+ Etag:
40
+ - '"6503c652dd5c87030249bd0c151aba3a"'
41
+ Access-Control-Allow-Origin:
42
+ - "*"
43
+ Access-Control-Allow-Headers:
44
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
45
+ Access-Control-Allow-Methods:
46
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
47
+ "^access-Control-Expose-Headers":
48
+ - Etag
49
+ Access-Control-Max-Age:
50
+ - '1728000'
51
+ body:
52
+ encoding: UTF-8
53
+ string: |
54
+ {
55
+ "name": "Category",
56
+ "description": "",
57
+ "fields": [
58
+ {
59
+ "id": "name",
60
+ "name": "Name",
61
+ "type": "Text",
62
+ "localized": true,
63
+ "uiid": "4vp0pcgc7b4"
64
+ },
65
+ {
66
+ "id": "description",
67
+ "name": "Description",
68
+ "type": "Text",
69
+ "localized": true,
70
+ "uiid": "40jqtxghjb4"
71
+ }
72
+ ],
73
+ "sys": {
74
+ "id": "category_content_type",
75
+ "type": "ContentType",
76
+ "createdAt": "2014-08-18T06:51:59.560Z",
77
+ "createdBy": {
78
+ "sys": {
79
+ "type": "Link",
80
+ "linkType": "User",
81
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
82
+ }
83
+ },
84
+ "space": {
85
+ "sys": {
86
+ "type": "Link",
87
+ "linkType": "Space",
88
+ "id": "bfsvtul0c41g"
89
+ }
90
+ },
91
+ "firstPublishedAt": "2014-08-18T06:52:02.517Z",
92
+ "publishedCounter": 6,
93
+ "publishedAt": "2014-08-19T11:42:07.711Z",
94
+ "publishedBy": {
95
+ "sys": {
96
+ "type": "Link",
97
+ "linkType": "User",
98
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
99
+ }
100
+ },
101
+ "publishedVersion": 33,
102
+ "version": 34,
103
+ "updatedAt": "2014-08-19T11:42:07.719Z",
104
+ "updatedBy": {
105
+ "sys": {
106
+ "type": "Link",
107
+ "linkType": "User",
108
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
109
+ }
110
+ }
111
+ },
112
+ "displayField": "name"
113
+ }
114
+ http_version:
115
+ recorded_at: Tue, 19 Aug 2014 12:15:22 GMT
116
+ - request:
117
+ method: put
118
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/content_types/category_content_type
119
+ body:
120
+ encoding: UTF-8
121
+ string: '{"name":"Updated content type name","description":"","fields":[{"id":"name","name":"Name","type":"Text","localized":true},{"id":"description","name":"Description","type":"Text","localized":true}]}'
122
+ headers:
123
+ User-Agent:
124
+ - RubyContenfulManagementGem/0.0.2
125
+ Authorization:
126
+ - Bearer <ACCESS_TOKEN>
127
+ Content-Type:
128
+ - application/vnd.contentful.management.v1+json
129
+ X-Contentful-Version:
130
+ - '999'
131
+ Host:
132
+ - api.contentful.com
133
+ response:
134
+ status:
135
+ code: 400
136
+ message: Bad Request
137
+ headers:
138
+ Server:
139
+ - nginx
140
+ Date:
141
+ - Tue, 19 Aug 2014 12:15:28 GMT
142
+ Content-Type:
143
+ - application/vnd.contentful.management.v1+json
144
+ Transfer-Encoding:
145
+ - chunked
146
+ Connection:
147
+ - keep-alive
148
+ X-Powered-By:
149
+ - Express
150
+ Access-Control-Allow-Origin:
151
+ - "*"
152
+ Access-Control-Allow-Headers:
153
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
154
+ Access-Control-Allow-Methods:
155
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
156
+ "^access-Control-Expose-Headers":
157
+ - Etag
158
+ Access-Control-Max-Age:
159
+ - '1728000'
160
+ body:
161
+ encoding: UTF-8
162
+ string: |
163
+ {
164
+ "sys": {
165
+ "type": "Error",
166
+ "id": "VersionMismatch"
167
+ }
168
+ }
169
+ http_version:
170
+ recorded_at: Tue, 19 Aug 2014 12:15:22 GMT
171
+ - request:
172
+ method: get
173
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/content_types/category_content_type
174
+ body:
175
+ encoding: US-ASCII
176
+ string: ''
177
+ headers:
178
+ User-Agent:
179
+ - RubyContenfulManagementGem/0.0.2
180
+ Authorization:
181
+ - Bearer <ACCESS_TOKEN>
182
+ Content-Type:
183
+ - application/vnd.contentful.management.v1+json
184
+ Content-Length:
185
+ - '0'
186
+ Host:
187
+ - api.contentful.com
188
+ response:
189
+ status:
190
+ code: 200
191
+ message: OK
192
+ headers:
193
+ Server:
194
+ - nginx
195
+ Date:
196
+ - Tue, 19 Aug 2014 12:15:29 GMT
197
+ Content-Type:
198
+ - application/vnd.contentful.management.v1+json
199
+ Content-Length:
200
+ - '1253'
201
+ Connection:
202
+ - keep-alive
203
+ X-Powered-By:
204
+ - Express
205
+ Cf-Space-Id:
206
+ - bfsvtul0c41g
207
+ Etag:
208
+ - '"6503c652dd5c87030249bd0c151aba3a"'
209
+ Access-Control-Allow-Origin:
210
+ - "*"
211
+ Access-Control-Allow-Headers:
212
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
213
+ Access-Control-Allow-Methods:
214
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
215
+ "^access-Control-Expose-Headers":
216
+ - Etag
217
+ Access-Control-Max-Age:
218
+ - '1728000'
219
+ body:
220
+ encoding: UTF-8
221
+ string: |
222
+ {
223
+ "name": "Category",
224
+ "description": "",
225
+ "fields": [
226
+ {
227
+ "id": "name",
228
+ "name": "Name",
229
+ "type": "Text",
230
+ "localized": true,
231
+ "uiid": "4vp0pcgc7b4"
232
+ },
233
+ {
234
+ "id": "description",
235
+ "name": "Description",
236
+ "type": "Text",
237
+ "localized": true,
238
+ "uiid": "40jqtxghjb4"
239
+ }
240
+ ],
241
+ "sys": {
242
+ "id": "category_content_type",
243
+ "type": "ContentType",
244
+ "createdAt": "2014-08-18T06:51:59.560Z",
245
+ "createdBy": {
246
+ "sys": {
247
+ "type": "Link",
248
+ "linkType": "User",
249
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
250
+ }
251
+ },
252
+ "space": {
253
+ "sys": {
254
+ "type": "Link",
255
+ "linkType": "Space",
256
+ "id": "bfsvtul0c41g"
257
+ }
258
+ },
259
+ "firstPublishedAt": "2014-08-18T06:52:02.517Z",
260
+ "publishedCounter": 6,
261
+ "publishedAt": "2014-08-19T11:42:07.711Z",
262
+ "publishedBy": {
263
+ "sys": {
264
+ "type": "Link",
265
+ "linkType": "User",
266
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
267
+ }
268
+ },
269
+ "publishedVersion": 33,
270
+ "version": 34,
271
+ "updatedAt": "2014-08-19T11:42:07.719Z",
272
+ "updatedBy": {
273
+ "sys": {
274
+ "type": "Link",
275
+ "linkType": "User",
276
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
277
+ }
278
+ }
279
+ },
280
+ "displayField": "name"
281
+ }
282
+ http_version:
283
+ recorded_at: Tue, 19 Aug 2014 12:15:23 GMT
284
+ - request:
285
+ method: put
286
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/content_types/category_content_type
287
+ body:
288
+ encoding: UTF-8
289
+ string: '{"name":"Updated content type name","description":"","fields":[{"id":"name","name":"Name","type":"Text","localized":true},{"id":"description","name":"Description","type":"Text","localized":true}]}'
290
+ headers:
291
+ User-Agent:
292
+ - RubyContenfulManagementGem/0.0.2
293
+ Authorization:
294
+ - Bearer <ACCESS_TOKEN>
295
+ Content-Type:
296
+ - application/vnd.contentful.management.v1+json
297
+ X-Contentful-Version:
298
+ - '34'
299
+ Host:
300
+ - api.contentful.com
301
+ response:
302
+ status:
303
+ code: 200
304
+ message: OK
305
+ headers:
306
+ Server:
307
+ - nginx
308
+ Date:
309
+ - Tue, 19 Aug 2014 12:15:30 GMT
310
+ Content-Type:
311
+ - application/vnd.contentful.management.v1+json
312
+ Content-Length:
313
+ - '1186'
314
+ Connection:
315
+ - keep-alive
316
+ X-Powered-By:
317
+ - Express
318
+ Cf-Space-Id:
319
+ - bfsvtul0c41g
320
+ Etag:
321
+ - '"2f44f1819cb906af3f2dfb4254a05243"'
322
+ Access-Control-Allow-Origin:
323
+ - "*"
324
+ Access-Control-Allow-Headers:
325
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
326
+ Access-Control-Allow-Methods:
327
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
328
+ "^access-Control-Expose-Headers":
329
+ - Etag
330
+ Access-Control-Max-Age:
331
+ - '1728000'
332
+ body:
333
+ encoding: UTF-8
334
+ string: |
335
+ {
336
+ "name": "Updated content type name",
337
+ "description": "",
338
+ "fields": [
339
+ {
340
+ "id": "name",
341
+ "name": "Name",
342
+ "type": "Text",
343
+ "localized": true
344
+ },
345
+ {
346
+ "id": "description",
347
+ "name": "Description",
348
+ "type": "Text",
349
+ "localized": true
350
+ }
351
+ ],
352
+ "sys": {
353
+ "id": "category_content_type",
354
+ "type": "ContentType",
355
+ "createdAt": "2014-08-18T06:51:59.560Z",
356
+ "createdBy": {
357
+ "sys": {
358
+ "type": "Link",
359
+ "linkType": "User",
360
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
361
+ }
362
+ },
363
+ "space": {
364
+ "sys": {
365
+ "type": "Link",
366
+ "linkType": "Space",
367
+ "id": "bfsvtul0c41g"
368
+ }
369
+ },
370
+ "firstPublishedAt": "2014-08-18T06:52:02.517Z",
371
+ "publishedCounter": 6,
372
+ "publishedAt": "2014-08-19T11:42:07.711Z",
373
+ "publishedBy": {
374
+ "sys": {
375
+ "type": "Link",
376
+ "linkType": "User",
377
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
378
+ }
379
+ },
380
+ "publishedVersion": 33,
381
+ "version": 35,
382
+ "updatedAt": "2014-08-19T12:15:30.175Z",
383
+ "updatedBy": {
384
+ "sys": {
385
+ "type": "Link",
386
+ "linkType": "User",
387
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ http_version:
393
+ recorded_at: Tue, 19 Aug 2014 12:15:24 GMT
394
+ recorded_with: VCR 2.9.2