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,770 @@
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:33:31 GMT
43
+ Etag:
44
+ - '"35407b8a88882fe5717a4701910f6ce7"'
45
+ Server:
46
+ - nginx
47
+ Status:
48
+ - 200 OK
49
+ X-Contentful-Request-Id:
50
+ - 71a-1978717092
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:35:54 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:33:31 GMT
121
+ Etag:
122
+ - '"9629c9c6864ec5045cc821c5262b0851"'
123
+ Server:
124
+ - nginx
125
+ X-Powered-By:
126
+ - Express
127
+ Content-Length:
128
+ - '8006'
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": "Category",
281
+ "description": "",
282
+ "fields": [
283
+ {
284
+ "id": "name",
285
+ "name": "Name",
286
+ "type": "Text",
287
+ "localized": true,
288
+ "validations": [
289
+ {
290
+ "size": {
291
+ "min": 2,
292
+ "max": 222
293
+ }
294
+ },
295
+ {
296
+ "in": [
297
+ "dom",
298
+ "chatka"
299
+ ]
300
+ }
301
+ ],
302
+ "uiid": "3ektd988mio"
303
+ },
304
+ {
305
+ "id": "description",
306
+ "name": "Description",
307
+ "type": "Text",
308
+ "uiid": "3mpw2oopurk"
309
+ },
310
+ {
311
+ "id": "valid",
312
+ "name": "Valid",
313
+ "type": "Text",
314
+ "validations": [
315
+ {
316
+ "in": [
317
+ "foo",
318
+ "bar"
319
+ ]
320
+ },
321
+ {
322
+ "size": {
323
+ "min": 10,
324
+ "max": 15
325
+ }
326
+ }
327
+ ],
328
+ "uiid": "4h7poqxt9ts"
329
+ },
330
+ {
331
+ "id": "asset_valid",
332
+ "name": "AssetValid",
333
+ "type": "Link",
334
+ "linkType": "Asset",
335
+ "validations": [
336
+ {
337
+ "linkMimetypeGroup": "pdfdocument"
338
+ }
339
+ ],
340
+ "uiid": "4kyony8vyf4"
341
+ },
342
+ {
343
+ "id": "entry_valid",
344
+ "name": "EntryValid",
345
+ "type": "Link",
346
+ "linkType": "Entry",
347
+ "validations": [
348
+ {
349
+ "linkContentType": [
350
+ "post_content_type"
351
+ ]
352
+ }
353
+ ],
354
+ "uiid": "3vuee2rpslc"
355
+ }
356
+ ],
357
+ "sys": {
358
+ "id": "category_content_type",
359
+ "type": "ContentType",
360
+ "createdAt": "2014-08-21T13:32:20.955Z",
361
+ "createdBy": {
362
+ "sys": {
363
+ "type": "Link",
364
+ "linkType": "User",
365
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
366
+ }
367
+ },
368
+ "space": {
369
+ "sys": {
370
+ "type": "Link",
371
+ "linkType": "Space",
372
+ "id": "v2umtz8ths9v"
373
+ }
374
+ },
375
+ "firstPublishedAt": "2014-08-21T13:32:27.109Z",
376
+ "publishedCounter": 10,
377
+ "version": 292,
378
+ "updatedAt": "2014-10-15T12:26:00.546Z",
379
+ "updatedBy": {
380
+ "sys": {
381
+ "type": "Link",
382
+ "linkType": "User",
383
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
384
+ }
385
+ }
386
+ }
387
+ },
388
+ {
389
+ "name": "Validation",
390
+ "description": "",
391
+ "fields": [
392
+ {
393
+ "id": "number",
394
+ "name": "Number",
395
+ "type": "Number",
396
+ "validations": [
397
+ {
398
+ "range": {
399
+ "min": 50,
400
+ "max": 200
401
+ }
402
+ }
403
+ ]
404
+ },
405
+ {
406
+ "id": "entries",
407
+ "name": "entries",
408
+ "type": "Array",
409
+ "validations": [
410
+ {
411
+ "linkMimetypeGroup": "image"
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "id": "assets",
417
+ "name": "Assets",
418
+ "type": "Link",
419
+ "linkType": "Asset",
420
+ "validations": []
421
+ },
422
+ {
423
+ "id": "text",
424
+ "name": "Text",
425
+ "type": "Text",
426
+ "validations": [
427
+ {
428
+ "regexp": {
429
+ "pattern": "^such",
430
+ "flags": "im"
431
+ }
432
+ }
433
+ ]
434
+ }
435
+ ],
436
+ "sys": {
437
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
438
+ "type": "ContentType",
439
+ "createdAt": "2014-10-15T10:59:27.146Z",
440
+ "createdBy": {
441
+ "sys": {
442
+ "type": "Link",
443
+ "linkType": "User",
444
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
445
+ }
446
+ },
447
+ "space": {
448
+ "sys": {
449
+ "type": "Link",
450
+ "linkType": "Space",
451
+ "id": "v2umtz8ths9v"
452
+ }
453
+ },
454
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
455
+ "publishedCounter": 1,
456
+ "publishedAt": "2014-10-15T11:02:51.145Z",
457
+ "publishedBy": {
458
+ "sys": {
459
+ "type": "Link",
460
+ "linkType": "User",
461
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
462
+ }
463
+ },
464
+ "publishedVersion": 101,
465
+ "version": 141,
466
+ "updatedAt": "2014-10-15T12:31:04.772Z",
467
+ "updatedBy": {
468
+ "sys": {
469
+ "type": "Link",
470
+ "linkType": "User",
471
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
472
+ }
473
+ }
474
+ }
475
+ }
476
+ ]
477
+ }
478
+ http_version:
479
+ recorded_at: Wed, 15 Oct 2014 12:35:54 GMT
480
+ - request:
481
+ method: get
482
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types/1JrDv4JJsYuY4KGEEgAsQU
483
+ body:
484
+ encoding: US-ASCII
485
+ string: ''
486
+ headers:
487
+ User-Agent:
488
+ - RubyContenfulManagementGem/0.2.1
489
+ Authorization:
490
+ - Bearer <ACCESS_TOKEN>
491
+ Content-Type:
492
+ - application/vnd.contentful.management.v1+json
493
+ Content-Length:
494
+ - '0'
495
+ Host:
496
+ - api.contentful.com
497
+ response:
498
+ status:
499
+ code: 200
500
+ message: OK
501
+ headers:
502
+ "^access-Control-Expose-Headers":
503
+ - Etag
504
+ Access-Control-Allow-Headers:
505
+ - 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
506
+ Access-Control-Allow-Methods:
507
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
508
+ Access-Control-Allow-Origin:
509
+ - "*"
510
+ Access-Control-Max-Age:
511
+ - '1728000'
512
+ Cf-Space-Id:
513
+ - v2umtz8ths9v
514
+ Content-Type:
515
+ - application/vnd.contentful.management.v1+json
516
+ Date:
517
+ - Wed, 15 Oct 2014 12:33:32 GMT
518
+ Etag:
519
+ - '"079ae4390189d04851d7ddfaca6f8996"'
520
+ Server:
521
+ - nginx
522
+ X-Powered-By:
523
+ - Express
524
+ Content-Length:
525
+ - '1697'
526
+ Connection:
527
+ - keep-alive
528
+ body:
529
+ encoding: UTF-8
530
+ string: |
531
+ {
532
+ "name": "Validation",
533
+ "description": "",
534
+ "fields": [
535
+ {
536
+ "id": "number",
537
+ "name": "Number",
538
+ "type": "Number",
539
+ "validations": [
540
+ {
541
+ "range": {
542
+ "min": 50,
543
+ "max": 200
544
+ }
545
+ }
546
+ ]
547
+ },
548
+ {
549
+ "id": "entries",
550
+ "name": "entries",
551
+ "type": "Array",
552
+ "validations": [
553
+ {
554
+ "linkMimetypeGroup": "image"
555
+ }
556
+ ]
557
+ },
558
+ {
559
+ "id": "assets",
560
+ "name": "Assets",
561
+ "type": "Link",
562
+ "linkType": "Asset",
563
+ "validations": []
564
+ },
565
+ {
566
+ "id": "text",
567
+ "name": "Text",
568
+ "type": "Text",
569
+ "validations": [
570
+ {
571
+ "regexp": {
572
+ "pattern": "^such",
573
+ "flags": "im"
574
+ }
575
+ }
576
+ ]
577
+ }
578
+ ],
579
+ "sys": {
580
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
581
+ "type": "ContentType",
582
+ "createdAt": "2014-10-15T10:59:27.146Z",
583
+ "createdBy": {
584
+ "sys": {
585
+ "type": "Link",
586
+ "linkType": "User",
587
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
588
+ }
589
+ },
590
+ "space": {
591
+ "sys": {
592
+ "type": "Link",
593
+ "linkType": "Space",
594
+ "id": "v2umtz8ths9v"
595
+ }
596
+ },
597
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
598
+ "publishedCounter": 1,
599
+ "publishedAt": "2014-10-15T11:02:51.145Z",
600
+ "publishedBy": {
601
+ "sys": {
602
+ "type": "Link",
603
+ "linkType": "User",
604
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
605
+ }
606
+ },
607
+ "publishedVersion": 101,
608
+ "version": 141,
609
+ "updatedAt": "2014-10-15T12:31:04.772Z",
610
+ "updatedBy": {
611
+ "sys": {
612
+ "type": "Link",
613
+ "linkType": "User",
614
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
615
+ }
616
+ }
617
+ }
618
+ }
619
+ http_version:
620
+ recorded_at: Wed, 15 Oct 2014 12:35:55 GMT
621
+ - request:
622
+ method: put
623
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/content_types/1JrDv4JJsYuY4KGEEgAsQU
624
+ body:
625
+ encoding: UTF-8
626
+ 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"}}]},{"id":"link_field","validations":[{"linkField":true}]}]}'
627
+ headers:
628
+ User-Agent:
629
+ - RubyContenfulManagementGem/0.2.1
630
+ Authorization:
631
+ - Bearer <ACCESS_TOKEN>
632
+ Content-Type:
633
+ - application/vnd.contentful.management.v1+json
634
+ X-Contentful-Version:
635
+ - '141'
636
+ Host:
637
+ - api.contentful.com
638
+ response:
639
+ status:
640
+ code: 200
641
+ message: OK
642
+ headers:
643
+ "^access-Control-Expose-Headers":
644
+ - Etag
645
+ Access-Control-Allow-Headers:
646
+ - 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
647
+ Access-Control-Allow-Methods:
648
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
649
+ Access-Control-Allow-Origin:
650
+ - "*"
651
+ Access-Control-Max-Age:
652
+ - '1728000'
653
+ Cf-Space-Id:
654
+ - v2umtz8ths9v
655
+ Content-Type:
656
+ - application/vnd.contentful.management.v1+json
657
+ Date:
658
+ - Wed, 15 Oct 2014 12:33:39 GMT
659
+ Etag:
660
+ - '"74bb38bd9632e494eb665a88a31193a4"'
661
+ Server:
662
+ - nginx
663
+ X-Powered-By:
664
+ - Express
665
+ Content-Length:
666
+ - '1815'
667
+ Connection:
668
+ - keep-alive
669
+ body:
670
+ encoding: UTF-8
671
+ string: |
672
+ {
673
+ "name": "Validation",
674
+ "description": "",
675
+ "fields": [
676
+ {
677
+ "id": "number",
678
+ "name": "Number",
679
+ "type": "Number",
680
+ "validations": [
681
+ {
682
+ "range": {
683
+ "min": 50,
684
+ "max": 200
685
+ }
686
+ }
687
+ ]
688
+ },
689
+ {
690
+ "id": "entries",
691
+ "name": "entries",
692
+ "type": "Array",
693
+ "validations": [
694
+ {
695
+ "linkMimetypeGroup": "image"
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "id": "assets",
701
+ "name": "Assets",
702
+ "type": "Link",
703
+ "linkType": "Asset",
704
+ "validations": []
705
+ },
706
+ {
707
+ "id": "text",
708
+ "name": "Text",
709
+ "type": "Text",
710
+ "validations": [
711
+ {
712
+ "regexp": {
713
+ "pattern": "^such",
714
+ "flags": "im"
715
+ }
716
+ }
717
+ ]
718
+ },
719
+ {
720
+ "id": "link_field",
721
+ "validations": [
722
+ {
723
+ "linkField": true
724
+ }
725
+ ]
726
+ }
727
+ ],
728
+ "sys": {
729
+ "id": "1JrDv4JJsYuY4KGEEgAsQU",
730
+ "type": "ContentType",
731
+ "createdAt": "2014-10-15T10:59:27.146Z",
732
+ "createdBy": {
733
+ "sys": {
734
+ "type": "Link",
735
+ "linkType": "User",
736
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
737
+ }
738
+ },
739
+ "space": {
740
+ "sys": {
741
+ "type": "Link",
742
+ "linkType": "Space",
743
+ "id": "v2umtz8ths9v"
744
+ }
745
+ },
746
+ "firstPublishedAt": "2014-10-15T11:02:51.145Z",
747
+ "publishedCounter": 1,
748
+ "publishedAt": "2014-10-15T11:02:51.145Z",
749
+ "publishedBy": {
750
+ "sys": {
751
+ "type": "Link",
752
+ "linkType": "User",
753
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
754
+ }
755
+ },
756
+ "publishedVersion": 101,
757
+ "version": 142,
758
+ "updatedAt": "2014-10-15T12:33:39.079Z",
759
+ "updatedBy": {
760
+ "sys": {
761
+ "type": "Link",
762
+ "linkType": "User",
763
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
764
+ }
765
+ }
766
+ }
767
+ }
768
+ http_version:
769
+ recorded_at: Wed, 15 Oct 2014 12:36:02 GMT
770
+ recorded_with: VCR 2.9.2