contentful-management 0.2.1 → 0.3.0

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.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +37 -8
  3. data/Gemfile +0 -1
  4. data/README.md +130 -0
  5. data/Rakefile +0 -1
  6. data/contentful-management.gemspec +0 -1
  7. data/examples/blog.rb +1 -1
  8. data/lib/contentful/management.rb +0 -1
  9. data/lib/contentful/management/array.rb +0 -1
  10. data/lib/contentful/management/asset.rb +65 -26
  11. data/lib/contentful/management/client.rb +19 -9
  12. data/lib/contentful/management/content_type.rb +43 -28
  13. data/lib/contentful/management/dynamic_entry.rb +15 -15
  14. data/lib/contentful/management/entry.rb +73 -40
  15. data/lib/contentful/management/error.rb +6 -1
  16. data/lib/contentful/management/field.rb +63 -8
  17. data/lib/contentful/management/file.rb +0 -1
  18. data/lib/contentful/management/http_client.rb +0 -1
  19. data/lib/contentful/management/link.rb +0 -1
  20. data/lib/contentful/management/locale.rb +11 -3
  21. data/lib/contentful/management/location.rb +0 -1
  22. data/lib/contentful/management/request.rb +5 -7
  23. data/lib/contentful/management/resource.rb +3 -3
  24. data/lib/contentful/management/resource/array_like.rb +0 -1
  25. data/lib/contentful/management/resource/fields.rb +1 -2
  26. data/lib/contentful/management/resource/refresher.rb +3 -3
  27. data/lib/contentful/management/resource/system_properties.rb +0 -1
  28. data/lib/contentful/management/resource_builder.rb +16 -27
  29. data/lib/contentful/management/response.rb +36 -32
  30. data/lib/contentful/management/space.rb +16 -6
  31. data/lib/contentful/management/space_webhook_methods_factory.rb +0 -4
  32. data/lib/contentful/management/support.rb +0 -1
  33. data/lib/contentful/management/validation.rb +34 -0
  34. data/lib/contentful/management/version.rb +1 -2
  35. data/lib/contentful/management/webhook.rb +17 -10
  36. data/spec/fixtures/vcr_cassettes/content_type/validation/in.yml +588 -0
  37. data/spec/fixtures/vcr_cassettes/content_type/validation/in_add.yml +620 -0
  38. data/spec/fixtures/vcr_cassettes/content_type/validation/in_update.yml +668 -0
  39. data/spec/fixtures/vcr_cassettes/content_type/validation/link_content_type.yml +749 -0
  40. data/spec/fixtures/vcr_cassettes/content_type/validation/link_field.yml +770 -0
  41. data/spec/fixtures/vcr_cassettes/content_type/validation/link_mimetype_group.yml +766 -0
  42. data/spec/fixtures/vcr_cassettes/content_type/validation/multiple_add.yml +854 -0
  43. data/spec/fixtures/vcr_cassettes/content_type/validation/present.yml +808 -0
  44. data/spec/fixtures/vcr_cassettes/content_type/validation/range.yml +683 -0
  45. data/spec/fixtures/vcr_cassettes/content_type/validation/range_update.yml +697 -0
  46. data/spec/fixtures/vcr_cassettes/content_type/validation/regexp.yml +720 -0
  47. data/spec/fixtures/vcr_cassettes/content_type/validation/size.yml +791 -0
  48. data/spec/fixtures/vcr_cassettes/entry/service_unavailable.yml +52 -0
  49. data/spec/fixtures/vcr_cassettes/space/webhook/create.yml +439 -0
  50. data/spec/lib/contentful/management/asset_spec.rb +16 -16
  51. data/spec/lib/contentful/management/client_spec.rb +0 -1
  52. data/spec/lib/contentful/management/content_type_spec.rb +143 -1
  53. data/spec/lib/contentful/management/entry_spec.rb +10 -4
  54. data/spec/lib/contentful/management/locale_spec.rb +0 -1
  55. data/spec/lib/contentful/management/space_spec.rb +9 -1
  56. data/spec/lib/contentful/management/webhook_spec.rb +0 -1
  57. data/spec/spec_helper.rb +0 -1
  58. data/spec/support/vcr.rb +0 -1
  59. metadata +63 -62
@@ -0,0 +1,766 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContenfulManagementGem/0.2.1
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
+ "^access-Control-Expose-Headers":
26
+ - Etag
27
+ Accept-Ranges:
28
+ - bytes
29
+ Access-Control-Allow-Headers:
30
+ - 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
31
+ Access-Control-Allow-Methods:
32
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cache-Control:
38
+ - max-age=0
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Wed, 15 Oct 2014 12:31:02 GMT
43
+ Etag:
44
+ - '"35407b8a88882fe5717a4701910f6ce7"'
45
+ Server:
46
+ - nginx
47
+ Status:
48
+ - 200 OK
49
+ X-Contentful-Request-Id:
50
+ - 71a-1978714942
51
+ Content-Length:
52
+ - '459'
53
+ Connection:
54
+ - keep-alive
55
+ body:
56
+ encoding: UTF-8
57
+ string: |
58
+ {
59
+ "sys":{
60
+ "type":"Space",
61
+ "id":"v2umtz8ths9v",
62
+ "version":1,
63
+ "createdBy":{
64
+ "sys":{
65
+ "type":"Link",
66
+ "linkType":"User",
67
+ "id":"1E7acJL8I5XUXAMHQt9Grs"
68
+ }
69
+ },
70
+ "createdAt":"2014-08-21T13:32:11Z",
71
+ "updatedBy":{
72
+ "sys":{
73
+ "type":"Link",
74
+ "linkType":"User",
75
+ "id":"1E7acJL8I5XUXAMHQt9Grs"
76
+ }
77
+ },
78
+ "updatedAt":"2014-08-21T13:32:12Z"
79
+ },
80
+ "name":"CMA Demo Rails App"}
81
+ http_version:
82
+ recorded_at: Wed, 15 Oct 2014 12:33:25 GMT
83
+ - request:
84
+ method: get
85
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types
86
+ body:
87
+ encoding: US-ASCII
88
+ string: ''
89
+ headers:
90
+ User-Agent:
91
+ - RubyContenfulManagementGem/0.2.1
92
+ Authorization:
93
+ - Bearer <ACCESS_TOKEN>
94
+ Content-Type:
95
+ - application/vnd.contentful.management.v1+json
96
+ Content-Length:
97
+ - '0'
98
+ Host:
99
+ - api.contentful.com
100
+ response:
101
+ status:
102
+ code: 200
103
+ message: OK
104
+ headers:
105
+ "^access-Control-Expose-Headers":
106
+ - Etag
107
+ Access-Control-Allow-Headers:
108
+ - 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
109
+ Access-Control-Allow-Methods:
110
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
111
+ Access-Control-Allow-Origin:
112
+ - "*"
113
+ Access-Control-Max-Age:
114
+ - '1728000'
115
+ Cf-Space-Id:
116
+ - v2umtz8ths9v
117
+ Content-Type:
118
+ - application/vnd.contentful.management.v1+json
119
+ Date:
120
+ - Wed, 15 Oct 2014 12:31:03 GMT
121
+ Etag:
122
+ - '"050a74251ae73cecc3b518e6c1321950"'
123
+ Server:
124
+ - nginx
125
+ X-Powered-By:
126
+ - Express
127
+ Content-Length:
128
+ - '8050'
129
+ Connection:
130
+ - keep-alive
131
+ body:
132
+ encoding: UTF-8
133
+ string: |
134
+ {
135
+ "sys": {
136
+ "type": "Array"
137
+ },
138
+ "total": 4,
139
+ "skip": 0,
140
+ "limit": 100,
141
+ "items": [
142
+ {
143
+ "displayField": "title",
144
+ "name": "Post",
145
+ "description": "",
146
+ "fields": [
147
+ {
148
+ "id": "title",
149
+ "name": "Title",
150
+ "type": "Text",
151
+ "localized": true,
152
+ "uiid": "2sdir2f8kcg"
153
+ },
154
+ {
155
+ "id": "author",
156
+ "name": "Author",
157
+ "type": "Text",
158
+ "localized": true,
159
+ "uiid": "4x1018907pc"
160
+ },
161
+ {
162
+ "id": "body",
163
+ "name": "Body",
164
+ "type": "Text",
165
+ "localized": true,
166
+ "uiid": "4hj7cda89hc"
167
+ },
168
+ {
169
+ "id": "title_image",
170
+ "name": "Title Image",
171
+ "type": "Link",
172
+ "linkType": "Asset",
173
+ "required": true,
174
+ "localized": true,
175
+ "uiid": "4gcqrcma8lc"
176
+ },
177
+ {
178
+ "id": "second_image",
179
+ "name": "Second Image",
180
+ "type": "Link",
181
+ "linkType": "Asset",
182
+ "localized": true,
183
+ "uiid": "40440elrugw"
184
+ },
185
+ {
186
+ "id": "category",
187
+ "name": "Category",
188
+ "type": "Link",
189
+ "linkType": "Entry",
190
+ "uiid": "49vicjvqsxs",
191
+ "localized": true
192
+ }
193
+ ],
194
+ "sys": {
195
+ "id": "post_content_type",
196
+ "type": "ContentType",
197
+ "createdAt": "2014-08-21T13:32:30.401Z",
198
+ "createdBy": {
199
+ "sys": {
200
+ "type": "Link",
201
+ "linkType": "User",
202
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
203
+ }
204
+ },
205
+ "space": {
206
+ "sys": {
207
+ "type": "Link",
208
+ "linkType": "Space",
209
+ "id": "v2umtz8ths9v"
210
+ }
211
+ },
212
+ "firstPublishedAt": "2014-08-21T13:32:43.385Z",
213
+ "publishedCounter": 2,
214
+ "publishedAt": "2014-08-27T09:18:36.995Z",
215
+ "publishedBy": {
216
+ "sys": {
217
+ "type": "Link",
218
+ "linkType": "User",
219
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
220
+ }
221
+ },
222
+ "publishedVersion": 11,
223
+ "version": 12,
224
+ "updatedAt": "2014-08-27T09:18:37.003Z",
225
+ "updatedBy": {
226
+ "sys": {
227
+ "type": "Link",
228
+ "linkType": "User",
229
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
230
+ }
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "fields": [
236
+ {
237
+ "name": "testowe",
238
+ "id": "testowe",
239
+ "type": "Link",
240
+ "uiid": "3q907mcb4lc",
241
+ "linkType": "Asset",
242
+ "required": true,
243
+ "localized": true,
244
+ "validations": []
245
+ }
246
+ ],
247
+ "name": "test",
248
+ "sys": {
249
+ "id": "26eLfV14SIOeQkse44q4sw",
250
+ "type": "ContentType",
251
+ "createdAt": "2014-08-22T12:57:43.618Z",
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": "v2umtz8ths9v"
264
+ }
265
+ },
266
+ "firstPublishedAt": "2014-08-22T12:57:53.093Z",
267
+ "publishedCounter": 2,
268
+ "version": 17,
269
+ "updatedAt": "2014-10-14T13:07:06.808Z",
270
+ "updatedBy": {
271
+ "sys": {
272
+ "type": "Link",
273
+ "linkType": "User",
274
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
275
+ }
276
+ }
277
+ }
278
+ },
279
+ {
280
+ "name": "Validation",
281
+ "description": "",
282
+ "fields": [
283
+ {
284
+ "id": "number",
285
+ "name": "Number",
286
+ "type": "Number",
287
+ "validations": [
288
+ {
289
+ "range": {
290
+ "min": 50,
291
+ "max": 200
292
+ }
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "id": "entries",
298
+ "name": "entries",
299
+ "type": "Array",
300
+ "validations": [
301
+ {
302
+ "linkContentType": [
303
+ "post_content_type"
304
+ ]
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "id": "assets",
310
+ "name": "Assets",
311
+ "type": "Link",
312
+ "linkType": "Asset",
313
+ "validations": []
314
+ },
315
+ {
316
+ "id": "text",
317
+ "name": "Text",
318
+ "type": "Text",
319
+ "validations": [
320
+ {
321
+ "regexp": {
322
+ "pattern": "^such",
323
+ "flags": "im"
324
+ }
325
+ }
326
+ ]
327
+ }
328
+ ],
329
+ "sys": {
330
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
331
+ "type": "ContentType",
332
+ "createdAt": "2014-10-15T10:59:27.146Z",
333
+ "createdBy": {
334
+ "sys": {
335
+ "type": "Link",
336
+ "linkType": "User",
337
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
338
+ }
339
+ },
340
+ "space": {
341
+ "sys": {
342
+ "type": "Link",
343
+ "linkType": "Space",
344
+ "id": "v2umtz8ths9v"
345
+ }
346
+ },
347
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
348
+ "publishedCounter": 1,
349
+ "publishedAt": "2014-10-15T11:02:51.145Z",
350
+ "publishedBy": {
351
+ "sys": {
352
+ "type": "Link",
353
+ "linkType": "User",
354
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
355
+ }
356
+ },
357
+ "publishedVersion": 101,
358
+ "version": 140,
359
+ "updatedAt": "2014-10-15T12:25:17.495Z",
360
+ "updatedBy": {
361
+ "sys": {
362
+ "type": "Link",
363
+ "linkType": "User",
364
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
365
+ }
366
+ }
367
+ }
368
+ },
369
+ {
370
+ "name": "Category",
371
+ "description": "",
372
+ "fields": [
373
+ {
374
+ "id": "name",
375
+ "name": "Name",
376
+ "type": "Text",
377
+ "localized": true,
378
+ "validations": [
379
+ {
380
+ "size": {
381
+ "min": 2,
382
+ "max": 222
383
+ }
384
+ },
385
+ {
386
+ "in": [
387
+ "dom",
388
+ "chatka"
389
+ ]
390
+ }
391
+ ],
392
+ "uiid": "3ektd988mio"
393
+ },
394
+ {
395
+ "id": "description",
396
+ "name": "Description",
397
+ "type": "Text",
398
+ "uiid": "3mpw2oopurk"
399
+ },
400
+ {
401
+ "id": "valid",
402
+ "name": "Valid",
403
+ "type": "Text",
404
+ "validations": [
405
+ {
406
+ "in": [
407
+ "foo",
408
+ "bar"
409
+ ]
410
+ },
411
+ {
412
+ "size": {
413
+ "min": 10,
414
+ "max": 15
415
+ }
416
+ }
417
+ ],
418
+ "uiid": "4h7poqxt9ts"
419
+ },
420
+ {
421
+ "id": "asset_valid",
422
+ "name": "AssetValid",
423
+ "type": "Link",
424
+ "linkType": "Asset",
425
+ "validations": [
426
+ {
427
+ "linkMimetypeGroup": "pdfdocument"
428
+ }
429
+ ],
430
+ "uiid": "4kyony8vyf4"
431
+ },
432
+ {
433
+ "id": "entry_valid",
434
+ "name": "EntryValid",
435
+ "type": "Link",
436
+ "linkType": "Entry",
437
+ "validations": [
438
+ {
439
+ "linkContentType": [
440
+ "post_content_type"
441
+ ]
442
+ }
443
+ ],
444
+ "uiid": "3vuee2rpslc"
445
+ }
446
+ ],
447
+ "sys": {
448
+ "id": "category_content_type",
449
+ "type": "ContentType",
450
+ "createdAt": "2014-08-21T13:32:20.955Z",
451
+ "createdBy": {
452
+ "sys": {
453
+ "type": "Link",
454
+ "linkType": "User",
455
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
456
+ }
457
+ },
458
+ "space": {
459
+ "sys": {
460
+ "type": "Link",
461
+ "linkType": "Space",
462
+ "id": "v2umtz8ths9v"
463
+ }
464
+ },
465
+ "firstPublishedAt": "2014-08-21T13:32:27.109Z",
466
+ "publishedCounter": 10,
467
+ "version": 292,
468
+ "updatedAt": "2014-10-15T12:26:00.546Z",
469
+ "updatedBy": {
470
+ "sys": {
471
+ "type": "Link",
472
+ "linkType": "User",
473
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
474
+ }
475
+ }
476
+ }
477
+ }
478
+ ]
479
+ }
480
+ http_version:
481
+ recorded_at: Wed, 15 Oct 2014 12:33:26 GMT
482
+ - request:
483
+ method: get
484
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types/1JrDv4JJsYuY4KGEEgAsQU
485
+ body:
486
+ encoding: US-ASCII
487
+ string: ''
488
+ headers:
489
+ User-Agent:
490
+ - RubyContenfulManagementGem/0.2.1
491
+ Authorization:
492
+ - Bearer <ACCESS_TOKEN>
493
+ Content-Type:
494
+ - application/vnd.contentful.management.v1+json
495
+ Content-Length:
496
+ - '0'
497
+ Host:
498
+ - api.contentful.com
499
+ response:
500
+ status:
501
+ code: 200
502
+ message: OK
503
+ headers:
504
+ "^access-Control-Expose-Headers":
505
+ - Etag
506
+ Access-Control-Allow-Headers:
507
+ - 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
508
+ Access-Control-Allow-Methods:
509
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
510
+ Access-Control-Allow-Origin:
511
+ - "*"
512
+ Access-Control-Max-Age:
513
+ - '1728000'
514
+ Cf-Space-Id:
515
+ - v2umtz8ths9v
516
+ Content-Type:
517
+ - application/vnd.contentful.management.v1+json
518
+ Date:
519
+ - Wed, 15 Oct 2014 12:31:04 GMT
520
+ Etag:
521
+ - '"4e61fa29df482d1dc62f7bd28ec534d5"'
522
+ Server:
523
+ - nginx
524
+ X-Powered-By:
525
+ - Express
526
+ Content-Length:
527
+ - '1733'
528
+ Connection:
529
+ - keep-alive
530
+ body:
531
+ encoding: UTF-8
532
+ string: |
533
+ {
534
+ "name": "Validation",
535
+ "description": "",
536
+ "fields": [
537
+ {
538
+ "id": "number",
539
+ "name": "Number",
540
+ "type": "Number",
541
+ "validations": [
542
+ {
543
+ "range": {
544
+ "min": 50,
545
+ "max": 200
546
+ }
547
+ }
548
+ ]
549
+ },
550
+ {
551
+ "id": "entries",
552
+ "name": "entries",
553
+ "type": "Array",
554
+ "validations": [
555
+ {
556
+ "linkContentType": [
557
+ "post_content_type"
558
+ ]
559
+ }
560
+ ]
561
+ },
562
+ {
563
+ "id": "assets",
564
+ "name": "Assets",
565
+ "type": "Link",
566
+ "linkType": "Asset",
567
+ "validations": []
568
+ },
569
+ {
570
+ "id": "text",
571
+ "name": "Text",
572
+ "type": "Text",
573
+ "validations": [
574
+ {
575
+ "regexp": {
576
+ "pattern": "^such",
577
+ "flags": "im"
578
+ }
579
+ }
580
+ ]
581
+ }
582
+ ],
583
+ "sys": {
584
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
585
+ "type": "ContentType",
586
+ "createdAt": "2014-10-15T10:59:27.146Z",
587
+ "createdBy": {
588
+ "sys": {
589
+ "type": "Link",
590
+ "linkType": "User",
591
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
592
+ }
593
+ },
594
+ "space": {
595
+ "sys": {
596
+ "type": "Link",
597
+ "linkType": "Space",
598
+ "id": "v2umtz8ths9v"
599
+ }
600
+ },
601
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
602
+ "publishedCounter": 1,
603
+ "publishedAt": "2014-10-15T11:02:51.145Z",
604
+ "publishedBy": {
605
+ "sys": {
606
+ "type": "Link",
607
+ "linkType": "User",
608
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
609
+ }
610
+ },
611
+ "publishedVersion": 101,
612
+ "version": 140,
613
+ "updatedAt": "2014-10-15T12:25:17.495Z",
614
+ "updatedBy": {
615
+ "sys": {
616
+ "type": "Link",
617
+ "linkType": "User",
618
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
619
+ }
620
+ }
621
+ }
622
+ }
623
+ http_version:
624
+ recorded_at: Wed, 15 Oct 2014 12:33:27 GMT
625
+ - request:
626
+ method: put
627
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types/1JrDv4JJsYuY4KGEEgAsQU
628
+ body:
629
+ encoding: UTF-8
630
+ string: '{"name":"Validation","description":"","fields":[{"id":"number","name":"Number","type":"Number","validations":[{"range":{"min":50,"max":200}}]},{"id":"entries","name":"entries","type":"Array","validations":[{"linkMimetypeGroup":"image"}]},{"id":"assets","name":"Assets","type":"Link","linkType":"Asset","validations":[]},{"id":"text","name":"Text","type":"Text","validations":[{"regexp":{"pattern":"^such","flags":"im"}}]}]}'
631
+ headers:
632
+ User-Agent:
633
+ - RubyContenfulManagementGem/0.2.1
634
+ Authorization:
635
+ - Bearer <ACCESS_TOKEN>
636
+ Content-Type:
637
+ - application/vnd.contentful.management.v1+json
638
+ X-Contentful-Version:
639
+ - '140'
640
+ Host:
641
+ - api.contentful.com
642
+ response:
643
+ status:
644
+ code: 200
645
+ message: OK
646
+ headers:
647
+ "^access-Control-Expose-Headers":
648
+ - Etag
649
+ Access-Control-Allow-Headers:
650
+ - 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
651
+ Access-Control-Allow-Methods:
652
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
653
+ Access-Control-Allow-Origin:
654
+ - "*"
655
+ Access-Control-Max-Age:
656
+ - '1728000'
657
+ Cf-Space-Id:
658
+ - v2umtz8ths9v
659
+ Content-Type:
660
+ - application/vnd.contentful.management.v1+json
661
+ Date:
662
+ - Wed, 15 Oct 2014 12:31:04 GMT
663
+ Etag:
664
+ - '"4db0c78b313742c44780c9d471b26a8c"'
665
+ Server:
666
+ - nginx
667
+ X-Powered-By:
668
+ - Express
669
+ Content-Length:
670
+ - '1697'
671
+ Connection:
672
+ - keep-alive
673
+ body:
674
+ encoding: UTF-8
675
+ string: |
676
+ {
677
+ "name": "Validation",
678
+ "description": "",
679
+ "fields": [
680
+ {
681
+ "id": "number",
682
+ "name": "Number",
683
+ "type": "Number",
684
+ "validations": [
685
+ {
686
+ "range": {
687
+ "min": 50,
688
+ "max": 200
689
+ }
690
+ }
691
+ ]
692
+ },
693
+ {
694
+ "id": "entries",
695
+ "name": "entries",
696
+ "type": "Array",
697
+ "validations": [
698
+ {
699
+ "linkMimetypeGroup": "image"
700
+ }
701
+ ]
702
+ },
703
+ {
704
+ "id": "assets",
705
+ "name": "Assets",
706
+ "type": "Link",
707
+ "linkType": "Asset",
708
+ "validations": []
709
+ },
710
+ {
711
+ "id": "text",
712
+ "name": "Text",
713
+ "type": "Text",
714
+ "validations": [
715
+ {
716
+ "regexp": {
717
+ "pattern": "^such",
718
+ "flags": "im"
719
+ }
720
+ }
721
+ ]
722
+ }
723
+ ],
724
+ "sys": {
725
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
726
+ "type": "ContentType",
727
+ "createdAt": "2014-10-15T10:59:27.146Z",
728
+ "createdBy": {
729
+ "sys": {
730
+ "type": "Link",
731
+ "linkType": "User",
732
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
733
+ }
734
+ },
735
+ "space": {
736
+ "sys": {
737
+ "type": "Link",
738
+ "linkType": "Space",
739
+ "id": "v2umtz8ths9v"
740
+ }
741
+ },
742
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
743
+ "publishedCounter": 1,
744
+ "publishedAt": "2014-10-15T11:02:51.145Z",
745
+ "publishedBy": {
746
+ "sys": {
747
+ "type": "Link",
748
+ "linkType": "User",
749
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
750
+ }
751
+ },
752
+ "publishedVersion": 101,
753
+ "version": 141,
754
+ "updatedAt": "2014-10-15T12:31:04.761Z",
755
+ "updatedBy": {
756
+ "sys": {
757
+ "type": "Link",
758
+ "linkType": "User",
759
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
760
+ }
761
+ }
762
+ }
763
+ }
764
+ http_version:
765
+ recorded_at: Wed, 15 Oct 2014 12:33:27 GMT
766
+ recorded_with: VCR 2.9.2