contentful-management 1.0.1 → 1.1.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile +1 -0
  4. data/README.md +245 -151
  5. data/lib/contentful/management/client.rb +20 -0
  6. data/lib/contentful/management/client_association_all_published_method_factory.rb +4 -0
  7. data/lib/contentful/management/client_content_type_methods_factory.rb +4 -0
  8. data/lib/contentful/management/client_editor_interface_methods_factory.rb +35 -0
  9. data/lib/contentful/management/client_role_methods_factory.rb +15 -0
  10. data/lib/contentful/management/client_webhook_methods_factory.rb +1 -1
  11. data/lib/contentful/management/content_type.rb +12 -0
  12. data/lib/contentful/management/content_type_editor_interface_methods_factory.rb +22 -0
  13. data/lib/contentful/management/editor_interface.rb +85 -0
  14. data/lib/contentful/management/field.rb +1 -0
  15. data/lib/contentful/management/resource/all_published.rb +1 -0
  16. data/lib/contentful/management/resource/refresher.rb +7 -3
  17. data/lib/contentful/management/resource_builder.rb +5 -1
  18. data/lib/contentful/management/role.rb +33 -0
  19. data/lib/contentful/management/space.rb +28 -0
  20. data/lib/contentful/management/space_association_all_published_method_factory.rb +1 -0
  21. data/lib/contentful/management/space_editor_interface_methods_factory.rb +21 -0
  22. data/lib/contentful/management/space_role_methods_factory.rb +15 -0
  23. data/lib/contentful/management/version.rb +1 -1
  24. data/lib/contentful/management/webhook.rb +4 -1
  25. data/spec/fixtures/vcr_cassettes/content_type/omitted_field.yml +640 -0
  26. data/spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml +252 -0
  27. data/spec/fixtures/vcr_cassettes/editor_interfaces/update.yml +348 -0
  28. data/spec/fixtures/vcr_cassettes/roles/all_for_space.yml +238 -0
  29. data/spec/fixtures/vcr_cassettes/roles/create_for_space.yml +143 -0
  30. data/spec/fixtures/vcr_cassettes/roles/destroy.yml +430 -0
  31. data/spec/fixtures/vcr_cassettes/roles/find.yml +155 -0
  32. data/spec/fixtures/vcr_cassettes/roles/find_for_space_not_found.yml +82 -0
  33. data/spec/fixtures/vcr_cassettes/roles/update.yml +459 -0
  34. data/spec/fixtures/vcr_cassettes/webhook/create_with_name_and_headers.yml +119 -0
  35. data/spec/fixtures/vcr_cassettes/webhook/topics.yml +117 -0
  36. data/spec/lib/contentful/management/asset_spec.rb +4 -0
  37. data/spec/lib/contentful/management/content_type_spec.rb +36 -0
  38. data/spec/lib/contentful/management/editor_interface_spec.rb +57 -0
  39. data/spec/lib/contentful/management/entry_spec.rb +5 -0
  40. data/spec/lib/contentful/management/role_spec.rb +125 -0
  41. data/spec/lib/contentful/management/webhook_spec.rb +37 -0
  42. metadata +35 -2
@@ -3,6 +3,6 @@ module Contentful
3
3
  # Management Namespace
4
4
  module Management
5
5
  # Gem Version
6
- VERSION = '1.0.1'
6
+ VERSION = '1.1.0'
7
7
  end
8
8
  end
@@ -11,6 +11,9 @@ module Contentful
11
11
 
12
12
  property :url, :string
13
13
  property :httpBasicUsername, :string
14
+ property :name, :string
15
+ property :headers, :array
16
+ property :topics, :array
14
17
 
15
18
  # @private
16
19
  def self.endpoint
@@ -19,7 +22,7 @@ module Contentful
19
22
 
20
23
  # @private
21
24
  def self.create_attributes(_client, attributes)
22
- attributes.select { |key, _value| [:httpBasicUsername, :httpBasicPassword, :url].include? key }
25
+ attributes.select { |key, _value| [:httpBasicUsername, :httpBasicPassword, :url, :name, :headers, :topics].include? key }
23
26
  end
24
27
 
25
28
  protected
@@ -0,0 +1,640 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/ngtgiva4wofg
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/1.0.1
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Content-Length:
17
+ - '0'
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - api.contentful.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
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,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
31
+ Access-Control-Allow-Methods:
32
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Expose-Headers:
36
+ - Etag
37
+ Access-Control-Max-Age:
38
+ - '1728000'
39
+ Cache-Control:
40
+ - max-age=0
41
+ Content-Type:
42
+ - application/vnd.contentful.management.v1+json
43
+ Date:
44
+ - Tue, 31 May 2016 18:54:26 GMT
45
+ Etag:
46
+ - '"e4e952b60878fa1f64edb97e1d25efd6"'
47
+ Server:
48
+ - nginx
49
+ Status:
50
+ - 200 OK
51
+ Strict-Transport-Security:
52
+ - max-age=15768000
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Contentful-Request-Id:
56
+ - 1f9-1045952694
57
+ Content-Length:
58
+ - '462'
59
+ Connection:
60
+ - Close
61
+ Set-Cookie:
62
+ - incap_ses_297_673446=XmcOG+T/LiMAW1YiHigfBOLdTVcAAAAAD/2CkiLVQb7yRezACvIguA==;
63
+ path=/; Domain=.contentful.com
64
+ - nlbi_673446=VKJlBCp742U0UOqbaoBaJgAAAABcXR9qPPdBDlGG5wkw0MHl; path=/; Domain=.contentful.com
65
+ - visid_incap_673446=5PDOYjz9SoeHKueo/No3GOLdTVcAAAAAQUIPAAAAAACTYw9eH0EHjJAwzojrnlsH;
66
+ expires=Wed, 31 May 2017 06:05:59 GMT; path=/; Domain=.contentful.com
67
+ X-Iinfo:
68
+ - 0-28664088-28664093 NNNN CT(230 233 0) RT(1464720865378 93) q(0 0 5 -1) r(8
69
+ 8) U5
70
+ X-Cdn:
71
+ - Incapsula
72
+ body:
73
+ encoding: UTF-8
74
+ string: |+
75
+ {
76
+ "name":"management.rb - #79",
77
+ "sys":{
78
+ "type":"Space",
79
+ "id":"ngtgiva4wofg",
80
+ "version":2,
81
+ "createdBy":{
82
+ "sys":{
83
+ "type":"Link",
84
+ "linkType":"User",
85
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
86
+ }
87
+ },
88
+ "createdAt":"2016-01-21T15:22:59Z",
89
+ "updatedBy":{
90
+ "sys":{
91
+ "type":"Link",
92
+ "linkType":"User",
93
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
94
+ }
95
+ },
96
+ "updatedAt":"2016-03-16T15:25:04Z"
97
+ }
98
+ }
99
+
100
+ http_version:
101
+ recorded_at: Tue, 31 May 2016 18:54:26 GMT
102
+ - request:
103
+ method: get
104
+ uri: https://api.contentful.com/spaces/ngtgiva4wofg/content_types
105
+ body:
106
+ encoding: US-ASCII
107
+ string: ''
108
+ headers:
109
+ User-Agent:
110
+ - RubyContentfulManagementGem/1.0.1
111
+ Authorization:
112
+ - Bearer <ACCESS_TOKEN>
113
+ Content-Type:
114
+ - application/vnd.contentful.management.v1+json
115
+ Content-Length:
116
+ - '0'
117
+ Connection:
118
+ - close
119
+ Host:
120
+ - api.contentful.com
121
+ response:
122
+ status:
123
+ code: 200
124
+ message: OK
125
+ headers:
126
+ Access-Control-Allow-Headers:
127
+ - 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,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
128
+ Access-Control-Allow-Methods:
129
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
130
+ Access-Control-Allow-Origin:
131
+ - "*"
132
+ Access-Control-Expose-Headers:
133
+ - Etag
134
+ Access-Control-Max-Age:
135
+ - '1728000'
136
+ Cf-Space-Id:
137
+ - ngtgiva4wofg
138
+ Content-Type:
139
+ - application/vnd.contentful.management.v1+json
140
+ Date:
141
+ - Tue, 31 May 2016 18:54:27 GMT
142
+ Etag:
143
+ - '"622fd07098d9db9238adcc11f6ee4fd8"'
144
+ Server:
145
+ - nginx
146
+ Strict-Transport-Security:
147
+ - max-age=15768000
148
+ X-Content-Type-Options:
149
+ - nosniff
150
+ X-Contentful-Request-Id:
151
+ - content-api:2VMfROcpcskau0EEO6EIMK
152
+ X-Powered-By:
153
+ - Express
154
+ Content-Length:
155
+ - '1498'
156
+ Connection:
157
+ - Close
158
+ Set-Cookie:
159
+ - incap_ses_297_673446=V4cXNZsH5057XVYiHigfBOPdTVcAAAAAJQzqaTclZgRRxJM9QEozxQ==;
160
+ path=/; Domain=.contentful.com
161
+ - nlbi_673446=3cnCH0ST/gxUckAwaoBaJgAAAACKs4jP2acN8quBWxgg+UWT; path=/; Domain=.contentful.com
162
+ - visid_incap_673446=G4yRECUETrGaXfFqWdSCMePdTVcAAAAAQUIPAAAAAADDt7CcQjyHj6i4t9LjEsUc;
163
+ expires=Wed, 31 May 2017 06:05:59 GMT; path=/; Domain=.contentful.com
164
+ X-Iinfo:
165
+ - 4-63007925-63007949 NNNN CT(229 230 0) RT(1464720866313 110) q(0 0 4 -1) r(7
166
+ 7) U5
167
+ X-Cdn:
168
+ - Incapsula
169
+ body:
170
+ encoding: UTF-8
171
+ string: |
172
+ {
173
+ "sys": {
174
+ "type": "Array"
175
+ },
176
+ "total": 1,
177
+ "skip": 0,
178
+ "limit": 100,
179
+ "items": [
180
+ {
181
+ "sys": {
182
+ "space": {
183
+ "sys": {
184
+ "type": "Link",
185
+ "linkType": "Space",
186
+ "id": "ngtgiva4wofg"
187
+ }
188
+ },
189
+ "id": "isssue_79_ct",
190
+ "type": "ContentType",
191
+ "createdAt": "2016-01-21T15:38:02.376Z",
192
+ "updatedAt": "2016-01-21T15:38:03.233Z",
193
+ "createdBy": {
194
+ "sys": {
195
+ "type": "Link",
196
+ "linkType": "User",
197
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
198
+ }
199
+ },
200
+ "updatedBy": {
201
+ "sys": {
202
+ "type": "Link",
203
+ "linkType": "User",
204
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
205
+ }
206
+ },
207
+ "publishedCounter": 1,
208
+ "version": 2,
209
+ "publishedBy": {
210
+ "sys": {
211
+ "type": "Link",
212
+ "linkType": "User",
213
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
214
+ }
215
+ },
216
+ "publishedVersion": 1,
217
+ "firstPublishedAt": "2016-01-21T15:38:03.215Z",
218
+ "publishedAt": "2016-01-21T15:38:03.215Z"
219
+ },
220
+ "displayField": "name",
221
+ "name": "Issue 79 CT",
222
+ "description": "",
223
+ "fields": [
224
+ {
225
+ "id": "name",
226
+ "name": "name",
227
+ "type": "Symbol",
228
+ "localized": false,
229
+ "required": false,
230
+ "validations": [],
231
+ "disabled": false,
232
+ "omitted": false
233
+ }
234
+ ]
235
+ }
236
+ ]
237
+ }
238
+ http_version:
239
+ recorded_at: Tue, 31 May 2016 18:54:27 GMT
240
+ - request:
241
+ method: put
242
+ uri: https://api.contentful.com/spaces/ngtgiva4wofg/content_types/omitted_ct
243
+ body:
244
+ encoding: UTF-8
245
+ string: '{"displayField":"name","name":"Omitted CT","fields":[{"id":"omitted_field","name":"omitted_field","type":"Symbol","omitted":true},{"id":"name","name":"name","type":"Symbol"}]}'
246
+ headers:
247
+ User-Agent:
248
+ - RubyContentfulManagementGem/1.0.1
249
+ Authorization:
250
+ - Bearer <ACCESS_TOKEN>
251
+ Content-Type:
252
+ - application/vnd.contentful.management.v1+json
253
+ Connection:
254
+ - close
255
+ Host:
256
+ - api.contentful.com
257
+ response:
258
+ status:
259
+ code: 201
260
+ message: Created
261
+ headers:
262
+ Access-Control-Allow-Headers:
263
+ - 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,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
264
+ Access-Control-Allow-Methods:
265
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
266
+ Access-Control-Allow-Origin:
267
+ - "*"
268
+ Access-Control-Expose-Headers:
269
+ - Etag
270
+ Access-Control-Max-Age:
271
+ - '1728000'
272
+ Cf-Space-Id:
273
+ - ngtgiva4wofg
274
+ Content-Type:
275
+ - application/vnd.contentful.management.v1+json
276
+ Date:
277
+ - Tue, 31 May 2016 18:54:28 GMT
278
+ Etag:
279
+ - '"77478ab08c5d6c8e264c50556a4f6e73"'
280
+ Server:
281
+ - nginx
282
+ Strict-Transport-Security:
283
+ - max-age=15768000
284
+ X-Content-Type-Options:
285
+ - nosniff
286
+ X-Contentful-Request-Id:
287
+ - content-api:5fmeNXPaD6MkqE8AAysYYs
288
+ X-Powered-By:
289
+ - Express
290
+ Content-Length:
291
+ - '1075'
292
+ Connection:
293
+ - Close
294
+ Set-Cookie:
295
+ - incap_ses_297_673446=tW3efE+8yCEOYFYiHigfBOTdTVcAAAAA8PU3OwasP7BEgETTh5rwWA==;
296
+ path=/; Domain=.contentful.com
297
+ - nlbi_673446=jS7ZRDH482D7TlbbaoBaJgAAAABzFaHtPhYwwoSQNl8/Xcjt; path=/; Domain=.contentful.com
298
+ - visid_incap_673446=Ks/On20cSzCogcqpXvArcOTdTVcAAAAAQUIPAAAAAAA0XZHK2EXDDh3PD8rBTLTD;
299
+ expires=Wed, 31 May 2017 06:06:00 GMT; path=/; Domain=.contentful.com
300
+ X-Iinfo:
301
+ - 7-83338587-83338609 NNNN CT(222 234 0) RT(1464720867246 97) q(0 0 4 -1) r(8
302
+ 8) U5
303
+ X-Cdn:
304
+ - Incapsula
305
+ body:
306
+ encoding: UTF-8
307
+ string: |
308
+ {
309
+ "displayField": "name",
310
+ "name": "Omitted CT",
311
+ "fields": [
312
+ {
313
+ "id": "omitted_field",
314
+ "name": "omitted_field",
315
+ "type": "Symbol",
316
+ "omitted": true,
317
+ "localized": false,
318
+ "required": false,
319
+ "disabled": false,
320
+ "validations": []
321
+ },
322
+ {
323
+ "id": "name",
324
+ "name": "name",
325
+ "type": "Symbol",
326
+ "localized": false,
327
+ "required": false,
328
+ "disabled": false,
329
+ "omitted": false,
330
+ "validations": []
331
+ }
332
+ ],
333
+ "sys": {
334
+ "id": "omitted_ct",
335
+ "type": "ContentType",
336
+ "version": 1,
337
+ "createdAt": "2016-05-31T18:54:28.173Z",
338
+ "createdBy": {
339
+ "sys": {
340
+ "type": "Link",
341
+ "linkType": "User",
342
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
343
+ }
344
+ },
345
+ "space": {
346
+ "sys": {
347
+ "type": "Link",
348
+ "linkType": "Space",
349
+ "id": "ngtgiva4wofg"
350
+ }
351
+ },
352
+ "updatedAt": "2016-05-31T18:54:28.173Z",
353
+ "updatedBy": {
354
+ "sys": {
355
+ "type": "Link",
356
+ "linkType": "User",
357
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
358
+ }
359
+ }
360
+ }
361
+ }
362
+ http_version:
363
+ recorded_at: Tue, 31 May 2016 18:54:28 GMT
364
+ - request:
365
+ method: put
366
+ uri: https://api.contentful.com/spaces/ngtgiva4wofg/content_types/omitted_ct/published
367
+ body:
368
+ encoding: US-ASCII
369
+ string: ''
370
+ headers:
371
+ User-Agent:
372
+ - RubyContentfulManagementGem/1.0.1
373
+ Authorization:
374
+ - Bearer <ACCESS_TOKEN>
375
+ Content-Type:
376
+ - application/vnd.contentful.management.v1+json
377
+ X-Contentful-Version:
378
+ - '1'
379
+ Content-Length:
380
+ - '0'
381
+ Connection:
382
+ - close
383
+ Host:
384
+ - api.contentful.com
385
+ response:
386
+ status:
387
+ code: 200
388
+ message: OK
389
+ headers:
390
+ Access-Control-Allow-Headers:
391
+ - 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,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
392
+ Access-Control-Allow-Methods:
393
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
394
+ Access-Control-Allow-Origin:
395
+ - "*"
396
+ Access-Control-Expose-Headers:
397
+ - Etag
398
+ Access-Control-Max-Age:
399
+ - '1728000'
400
+ Cf-Space-Id:
401
+ - ngtgiva4wofg
402
+ Content-Type:
403
+ - application/vnd.contentful.management.v1+json
404
+ Date:
405
+ - Tue, 31 May 2016 18:54:29 GMT
406
+ Etag:
407
+ - '"56c0db9183d4d55364cdcb2adafe60f0"'
408
+ Server:
409
+ - nginx
410
+ Strict-Transport-Security:
411
+ - max-age=15768000
412
+ X-Content-Type-Options:
413
+ - nosniff
414
+ X-Contentful-Request-Id:
415
+ - content-api:2l8GMpss7GSquOum2yYao4
416
+ X-Powered-By:
417
+ - Express
418
+ Content-Length:
419
+ - '1370'
420
+ Connection:
421
+ - Close
422
+ Set-Cookie:
423
+ - incap_ses_297_673446=H07od/EEnwcfY1YiHigfBOXdTVcAAAAASxE123ANM6IQuVrj4mjvrw==;
424
+ path=/; Domain=.contentful.com
425
+ - nlbi_673446=t7JcReeOdzF2i7eQaoBaJgAAAACkrhXmOoOib69PgCizLpbl; path=/; Domain=.contentful.com
426
+ - visid_incap_673446=6khJgYcyRbaEvfiBG13YqeXdTVcAAAAAQUIPAAAAAABiBbeDZ5qMClLDdUiVLvgj;
427
+ expires=Wed, 31 May 2017 06:05:59 GMT; path=/; Domain=.contentful.com
428
+ X-Iinfo:
429
+ - 6-69968908-69968914 NNNN CT(234 226 0) RT(1464720868321 94) q(0 0 4 -1) r(8
430
+ 8) U5
431
+ X-Cdn:
432
+ - Incapsula
433
+ body:
434
+ encoding: UTF-8
435
+ string: |
436
+ {
437
+ "displayField": "name",
438
+ "name": "Omitted CT",
439
+ "fields": [
440
+ {
441
+ "id": "omitted_field",
442
+ "name": "omitted_field",
443
+ "type": "Symbol",
444
+ "omitted": true,
445
+ "localized": false,
446
+ "required": false,
447
+ "disabled": false,
448
+ "validations": []
449
+ },
450
+ {
451
+ "id": "name",
452
+ "name": "name",
453
+ "type": "Symbol",
454
+ "localized": false,
455
+ "required": false,
456
+ "disabled": false,
457
+ "omitted": false,
458
+ "validations": []
459
+ }
460
+ ],
461
+ "sys": {
462
+ "id": "omitted_ct",
463
+ "type": "ContentType",
464
+ "createdAt": "2016-05-31T18:54:28.173Z",
465
+ "createdBy": {
466
+ "sys": {
467
+ "type": "Link",
468
+ "linkType": "User",
469
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
470
+ }
471
+ },
472
+ "space": {
473
+ "sys": {
474
+ "type": "Link",
475
+ "linkType": "Space",
476
+ "id": "ngtgiva4wofg"
477
+ }
478
+ },
479
+ "version": 2,
480
+ "updatedAt": "2016-05-31T18:54:29.216Z",
481
+ "updatedBy": {
482
+ "sys": {
483
+ "type": "Link",
484
+ "linkType": "User",
485
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
486
+ }
487
+ },
488
+ "firstPublishedAt": "2016-05-31T18:54:29.216Z",
489
+ "publishedCounter": 1,
490
+ "publishedAt": "2016-05-31T18:54:29.216Z",
491
+ "publishedBy": {
492
+ "sys": {
493
+ "type": "Link",
494
+ "linkType": "User",
495
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
496
+ }
497
+ },
498
+ "publishedVersion": 1
499
+ }
500
+ }
501
+ http_version:
502
+ recorded_at: Tue, 31 May 2016 18:54:29 GMT
503
+ - request:
504
+ method: get
505
+ uri: https://api.contentful.com/spaces/ngtgiva4wofg/content_types/omitted_ct
506
+ body:
507
+ encoding: US-ASCII
508
+ string: ''
509
+ headers:
510
+ User-Agent:
511
+ - RubyContentfulManagementGem/1.0.1
512
+ Authorization:
513
+ - Bearer <ACCESS_TOKEN>
514
+ Content-Type:
515
+ - application/vnd.contentful.management.v1+json
516
+ Content-Length:
517
+ - '0'
518
+ Connection:
519
+ - close
520
+ Host:
521
+ - api.contentful.com
522
+ response:
523
+ status:
524
+ code: 200
525
+ message: OK
526
+ headers:
527
+ Access-Control-Allow-Headers:
528
+ - 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,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
529
+ Access-Control-Allow-Methods:
530
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
531
+ Access-Control-Allow-Origin:
532
+ - "*"
533
+ Access-Control-Expose-Headers:
534
+ - Etag
535
+ Access-Control-Max-Age:
536
+ - '1728000'
537
+ Cf-Space-Id:
538
+ - ngtgiva4wofg
539
+ Content-Type:
540
+ - application/vnd.contentful.management.v1+json
541
+ Date:
542
+ - Tue, 31 May 2016 18:54:30 GMT
543
+ Etag:
544
+ - '"8050f1a72af34f997b565273f68639fa"'
545
+ Server:
546
+ - nginx
547
+ Strict-Transport-Security:
548
+ - max-age=15768000
549
+ X-Content-Type-Options:
550
+ - nosniff
551
+ X-Contentful-Request-Id:
552
+ - content-api:5q1oB3ltXaiSgeQIKsAoqu
553
+ X-Powered-By:
554
+ - Express
555
+ Content-Length:
556
+ - '1370'
557
+ Connection:
558
+ - Close
559
+ Set-Cookie:
560
+ - incap_ses_297_673446=fHodP6djXmu+ZVYiHigfBObdTVcAAAAAcFbF2ASy3Y+rL26sfKLYLQ==;
561
+ path=/; Domain=.contentful.com
562
+ - nlbi_673446=rSnUGk4K/Q7HvxXaaoBaJgAAAAA/CUCWcDc34DrJ8HLZPU3D; path=/; Domain=.contentful.com
563
+ - visid_incap_673446=RASMwmvFSZaA+XYuo5IlVubdTVcAAAAAQUIPAAAAAABPaQnZYjDsH5YV7VkXyxIU;
564
+ expires=Wed, 31 May 2017 06:06:00 GMT; path=/; Domain=.contentful.com
565
+ X-Iinfo:
566
+ - 5-75917470-75917483 NNNN CT(221 219 0) RT(1464720869437 95) q(0 0 4 -1) r(7
567
+ 7) U5
568
+ X-Cdn:
569
+ - Incapsula
570
+ body:
571
+ encoding: UTF-8
572
+ string: |
573
+ {
574
+ "displayField": "name",
575
+ "name": "Omitted CT",
576
+ "fields": [
577
+ {
578
+ "id": "omitted_field",
579
+ "name": "omitted_field",
580
+ "type": "Symbol",
581
+ "omitted": true,
582
+ "localized": false,
583
+ "required": false,
584
+ "disabled": false,
585
+ "validations": []
586
+ },
587
+ {
588
+ "id": "name",
589
+ "name": "name",
590
+ "type": "Symbol",
591
+ "localized": false,
592
+ "required": false,
593
+ "disabled": false,
594
+ "omitted": false,
595
+ "validations": []
596
+ }
597
+ ],
598
+ "sys": {
599
+ "id": "omitted_ct",
600
+ "type": "ContentType",
601
+ "createdAt": "2016-05-31T18:54:28.173Z",
602
+ "createdBy": {
603
+ "sys": {
604
+ "type": "Link",
605
+ "linkType": "User",
606
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
607
+ }
608
+ },
609
+ "space": {
610
+ "sys": {
611
+ "type": "Link",
612
+ "linkType": "Space",
613
+ "id": "ngtgiva4wofg"
614
+ }
615
+ },
616
+ "firstPublishedAt": "2016-05-31T18:54:29.216Z",
617
+ "publishedCounter": 1,
618
+ "publishedAt": "2016-05-31T18:54:29.216Z",
619
+ "publishedBy": {
620
+ "sys": {
621
+ "type": "Link",
622
+ "linkType": "User",
623
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
624
+ }
625
+ },
626
+ "publishedVersion": 1,
627
+ "version": 2,
628
+ "updatedAt": "2016-05-31T18:54:29.224Z",
629
+ "updatedBy": {
630
+ "sys": {
631
+ "type": "Link",
632
+ "linkType": "User",
633
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
634
+ }
635
+ }
636
+ }
637
+ }
638
+ http_version:
639
+ recorded_at: Tue, 31 May 2016 18:54:30 GMT
640
+ recorded_with: VCR 3.0.3