contentful-management 1.8.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/CHANGELOG.md +15 -0
  4. data/README.md +209 -41
  5. data/contentful-management.gemspec +1 -1
  6. data/lib/contentful/management/asset.rb +1 -1
  7. data/lib/contentful/management/client.rb +155 -31
  8. data/lib/contentful/management/client_organization_methods_factory.rb +23 -0
  9. data/lib/contentful/management/client_personal_access_tokens_methods_factory.rb +27 -0
  10. data/lib/contentful/management/client_snapshot_methods_factory.rb +16 -6
  11. data/lib/contentful/management/client_space_membership_methods_factory.rb +15 -0
  12. data/lib/contentful/management/client_ui_extension_methods_factory.rb +15 -0
  13. data/lib/contentful/management/client_user_methods_factory.rb +27 -0
  14. data/lib/contentful/management/client_webhook_call_methods_factory.rb +30 -0
  15. data/lib/contentful/management/client_webhook_health_methods_factory.rb +27 -0
  16. data/lib/contentful/management/content_type.rb +10 -0
  17. data/lib/contentful/management/content_type_snapshot_methods_factory.rb +35 -0
  18. data/lib/contentful/management/editor_interface.rb +1 -1
  19. data/lib/contentful/management/organization.rb +20 -0
  20. data/lib/contentful/management/personal_access_token.rb +45 -0
  21. data/lib/contentful/management/request.rb +0 -1
  22. data/lib/contentful/management/resource.rb +4 -2
  23. data/lib/contentful/management/resource_builder.rb +15 -0
  24. data/lib/contentful/management/snapshot.rb +31 -20
  25. data/lib/contentful/management/space.rb +32 -10
  26. data/lib/contentful/management/space_membership.rb +43 -0
  27. data/lib/contentful/management/space_space_membership_methods_factory.rb +15 -0
  28. data/lib/contentful/management/space_ui_extension_methods_factory.rb +15 -0
  29. data/lib/contentful/management/ui_extension.rb +106 -0
  30. data/lib/contentful/management/user.rb +28 -0
  31. data/lib/contentful/management/version.rb +1 -1
  32. data/lib/contentful/management/webhook.rb +20 -0
  33. data/lib/contentful/management/webhook_call.rb +77 -0
  34. data/lib/contentful/management/webhook_health.rb +79 -0
  35. data/lib/contentful/management/webhook_webhook_call_methods_factory.rb +30 -0
  36. data/lib/contentful/management/webhook_webhook_health_methods_factory.rb +28 -0
  37. data/spec/fixtures/vcr_cassettes/get_request.yml +34 -17
  38. data/spec/fixtures/vcr_cassettes/organization/all.yml +100 -0
  39. data/spec/fixtures/vcr_cassettes/personal_access_token/all.yml +101 -0
  40. data/spec/fixtures/vcr_cassettes/personal_access_token/create.yml +94 -0
  41. data/spec/fixtures/vcr_cassettes/personal_access_token/find.yml +91 -0
  42. data/spec/fixtures/vcr_cassettes/personal_access_token/find_not_found.yml +88 -0
  43. data/spec/fixtures/vcr_cassettes/personal_access_token/revoke.yml +179 -0
  44. data/spec/fixtures/vcr_cassettes/snapshot/ct_all.yml +207 -0
  45. data/spec/fixtures/vcr_cassettes/snapshot/ct_find.yml +198 -0
  46. data/spec/fixtures/vcr_cassettes/snapshot/ct_find_not_found.yml +94 -0
  47. data/spec/fixtures/vcr_cassettes/space/all_disabled_cache.yml +428 -0
  48. data/spec/fixtures/vcr_cassettes/space/disabled_cache.yml +120 -0
  49. data/spec/fixtures/vcr_cassettes/space_memberships/all.yml +190 -0
  50. data/spec/fixtures/vcr_cassettes/space_memberships/create.yml +143 -0
  51. data/spec/fixtures/vcr_cassettes/space_memberships/delete.yml +322 -0
  52. data/spec/fixtures/vcr_cassettes/space_memberships/find.yml +141 -0
  53. data/spec/fixtures/vcr_cassettes/ui_extension/all.yml +1020 -0
  54. data/spec/fixtures/vcr_cassettes/ui_extension/create.yml +133 -0
  55. data/spec/fixtures/vcr_cassettes/ui_extension/delete.yml +291 -0
  56. data/spec/fixtures/vcr_cassettes/ui_extension/find.yml +126 -0
  57. data/spec/fixtures/vcr_cassettes/user/find.yml +96 -0
  58. data/spec/fixtures/vcr_cassettes/webhook_call/all.yml +151 -0
  59. data/spec/fixtures/vcr_cassettes/webhook_call/find.yml +88 -0
  60. data/spec/fixtures/vcr_cassettes/webhook_call/find_not_found.yml +93 -0
  61. data/spec/fixtures/vcr_cassettes/webhook_health/find.yml +111 -0
  62. data/spec/lib/contentful/management/client_spec.rb +25 -26
  63. data/spec/lib/contentful/management/entry_spec.rb +48 -48
  64. data/spec/lib/contentful/management/organization_spec.rb +33 -0
  65. data/spec/lib/contentful/management/personal_access_token_spec.rb +85 -0
  66. data/spec/lib/contentful/management/snapshot_spec.rb +134 -47
  67. data/spec/lib/contentful/management/space_membership_spec.rb +147 -0
  68. data/spec/lib/contentful/management/space_spec.rb +35 -1
  69. data/spec/lib/contentful/management/ui_extension_spec.rb +276 -0
  70. data/spec/lib/contentful/management/user_spec.rb +52 -0
  71. data/spec/lib/contentful/management/webhook_calls_spec.rb +69 -0
  72. data/spec/lib/contentful/management/webhook_health_spec.rb +51 -0
  73. metadata +88 -8
  74. data/lib/contentful/management/http_client.rb +0 -89
@@ -0,0 +1,133 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.contentful.com/spaces/facgnwwgj5fe/extensions
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"extension":{"name":"test extension","fieldTypes":[{"type":"Symbol"},{"type":"Text"}],"srcdoc":"<!doctype
9
+ html><html lang=''en''><head><meta charset=''UTF-8''/><title>Sample Editor
10
+ Extension</title><link rel=''stylesheet'' href=''https://contentful.github.io/ui-extensions-sdk/cf-extension.css''><script
11
+ src=''https://contentful.github.io/ui-extensions-sdk/cf-extension-api.js''></script></head><body><div
12
+ id=''content''></div><script>window.contentfulExtension.init(function (extension)
13
+ {window.alert(extension);var value = extension.field.getValue();extension.field.setValue(''Hello
14
+ world!'');extension.field.onValueChanged(function(value) {if (value !== currentValue)
15
+ {extension.field.setValue(''Hello world!'');}});});</script></body></html>","sidebar":false}}'
16
+ headers:
17
+ X-Contentful-User-Agent:
18
+ - sdk contentful-management.rb/1.8.1; platform ruby/2.4.1; os macOS/16;
19
+ Authorization:
20
+ - Bearer <ACCESS_TOKEN>
21
+ Content-Type:
22
+ - application/vnd.contentful.management.v1+json
23
+ Connection:
24
+ - close
25
+ Host:
26
+ - api.contentful.com
27
+ User-Agent:
28
+ - http.rb/2.2.2
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Access-Control-Allow-Headers:
35
+ - 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,X-Contentful-Enable-Experimental-Feature
36
+ Access-Control-Allow-Methods:
37
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
38
+ Access-Control-Allow-Origin:
39
+ - "*"
40
+ Access-Control-Expose-Headers:
41
+ - Etag
42
+ Access-Control-Max-Age:
43
+ - '1728000'
44
+ Cf-Space-Id:
45
+ - facgnwwgj5fe
46
+ Content-Type:
47
+ - application/vnd.contentful.management.v1+json
48
+ Date:
49
+ - Tue, 05 Sep 2017 12:06:18 GMT
50
+ Etag:
51
+ - '"3c3f283a1b01a549c0467b23caddc121"'
52
+ Server:
53
+ - Contentful
54
+ Strict-Transport-Security:
55
+ - max-age=15768000
56
+ X-Content-Type-Options:
57
+ - nosniff
58
+ X-Contentful-Ratelimit-Hour-Limit:
59
+ - '36000'
60
+ X-Contentful-Ratelimit-Hour-Remaining:
61
+ - '35992'
62
+ X-Contentful-Ratelimit-Reset:
63
+ - '0'
64
+ X-Contentful-Ratelimit-Second-Limit:
65
+ - '10'
66
+ X-Contentful-Ratelimit-Second-Remaining:
67
+ - '9'
68
+ X-Contentful-Request-Id:
69
+ - c6e60fd3e4a9a1acbec3991a9f6a0079
70
+ Content-Length:
71
+ - '1426'
72
+ Connection:
73
+ - Close
74
+ Set-Cookie:
75
+ - incap_ses_189_673446=cA4uHmhj8z439HQjrHifAjqTrlkAAAAAg/c2r7Y/nYzpyOvN8ECksw==;
76
+ path=/; Domain=.contentful.com
77
+ - nlbi_673446=kYviCPxELWJJQtIN6lKYhQAAAAC1CkPOKak9C1gH7hUsadAi; path=/; Domain=.contentful.com
78
+ - visid_incap_673446=00TrCW7NRLS+0fPFLwdAeDqTrlkAAAAAQUIPAAAAAABAvOxm/uUWcs99GFmMpsG2;
79
+ expires=Tue, 04 Sep 2018 12:45:04 GMT; path=/; Domain=.contentful.com
80
+ X-Iinfo:
81
+ - 6-29668290-29668300 NNNN CT(81 168 0) RT(1504613173362 90) q(0 0 3 -1) r(50
82
+ 50) U5
83
+ X-Cdn:
84
+ - Incapsula
85
+ body:
86
+ encoding: ASCII-8BIT
87
+ string: |
88
+ {
89
+ "extension": {
90
+ "name": "test extension",
91
+ "fieldTypes": [
92
+ {
93
+ "type": "Symbol"
94
+ },
95
+ {
96
+ "type": "Text"
97
+ }
98
+ ],
99
+ "srcdoc": "<!doctype html><html lang='en'><head><meta charset='UTF-8'/><title>Sample Editor Extension</title><link rel='stylesheet' href='https://contentful.github.io/ui-extensions-sdk/cf-extension.css'><script src='https://contentful.github.io/ui-extensions-sdk/cf-extension-api.js'></script></head><body><div id='content'></div><script>window.contentfulExtension.init(function (extension) {window.alert(extension);var value = extension.field.getValue();extension.field.setValue('Hello world!');extension.field.onValueChanged(function(value) {if (value !== currentValue) {extension.field.setValue('Hello world!');}});});</script></body></html>",
100
+ "sidebar": false
101
+ },
102
+ "sys": {
103
+ "id": "2rf6QdckyoECCsQeE6gIOg",
104
+ "type": "Extension",
105
+ "version": 1,
106
+ "createdAt": "2017-09-05T12:06:18.463Z",
107
+ "createdBy": {
108
+ "sys": {
109
+ "type": "Link",
110
+ "linkType": "User",
111
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
112
+ }
113
+ },
114
+ "space": {
115
+ "sys": {
116
+ "type": "Link",
117
+ "linkType": "Space",
118
+ "id": "facgnwwgj5fe"
119
+ }
120
+ },
121
+ "updatedAt": "2017-09-05T12:06:18.463Z",
122
+ "updatedBy": {
123
+ "sys": {
124
+ "type": "Link",
125
+ "linkType": "User",
126
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ http_version:
132
+ recorded_at: Tue, 05 Sep 2017 12:06:18 GMT
133
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,291 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/facgnwwgj5fe/extensions/2rf6QdckyoECCsQeE6gIOg
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/1.8.1; platform ruby/2.4.1; os macOS/16;
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.contentful.com
20
+ User-Agent:
21
+ - http.rb/2.2.2
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Access-Control-Allow-Headers:
28
+ - 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,X-Contentful-Enable-Experimental-Feature
29
+ Access-Control-Allow-Methods:
30
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - Etag
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cf-Space-Id:
38
+ - facgnwwgj5fe
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Tue, 05 Sep 2017 12:18:10 GMT
43
+ Etag:
44
+ - '"3c3f283a1b01a549c0467b23caddc121"'
45
+ Server:
46
+ - Contentful
47
+ Strict-Transport-Security:
48
+ - max-age=15768000
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Contentful-Ratelimit-Hour-Limit:
52
+ - '36000'
53
+ X-Contentful-Ratelimit-Hour-Remaining:
54
+ - '35990'
55
+ X-Contentful-Ratelimit-Reset:
56
+ - '0'
57
+ X-Contentful-Ratelimit-Second-Limit:
58
+ - '10'
59
+ X-Contentful-Ratelimit-Second-Remaining:
60
+ - '9'
61
+ X-Contentful-Request-Id:
62
+ - d374897412b5c5a2b36c9c190102b103
63
+ Content-Length:
64
+ - '1426'
65
+ Connection:
66
+ - Close
67
+ Set-Cookie:
68
+ - incap_ses_187_673446=NYHdRTneYUtIAAaB5luYAgGWrlkAAAAAsb1Y5tf8MghbKPDOcWhKeQ==;
69
+ path=/; Domain=.contentful.com
70
+ - nlbi_673446=yccEdsx3BxTCAB2n6lKYhQAAAABl4Fq5rzF7VcvFRTpOzaOf; path=/; Domain=.contentful.com
71
+ - visid_incap_673446=/jEuv0OaSICyEAX1WYBhzwGWrlkAAAAAQUIPAAAAAABfYhkDupEpPqKMMCYAzgAg;
72
+ expires=Wed, 05 Sep 2018 12:02:11 GMT; path=/; Domain=.contentful.com
73
+ X-Iinfo:
74
+ - 9-53465733-53465778 NNNN CT(78 78 0) RT(1504613888921 74) q(0 0 2 -1) r(5
75
+ 5) U5
76
+ X-Cdn:
77
+ - Incapsula
78
+ body:
79
+ encoding: ASCII-8BIT
80
+ string: |
81
+ {
82
+ "extension": {
83
+ "name": "test extension",
84
+ "fieldTypes": [
85
+ {
86
+ "type": "Symbol"
87
+ },
88
+ {
89
+ "type": "Text"
90
+ }
91
+ ],
92
+ "srcdoc": "<!doctype html><html lang='en'><head><meta charset='UTF-8'/><title>Sample Editor Extension</title><link rel='stylesheet' href='https://contentful.github.io/ui-extensions-sdk/cf-extension.css'><script src='https://contentful.github.io/ui-extensions-sdk/cf-extension-api.js'></script></head><body><div id='content'></div><script>window.contentfulExtension.init(function (extension) {window.alert(extension);var value = extension.field.getValue();extension.field.setValue('Hello world!');extension.field.onValueChanged(function(value) {if (value !== currentValue) {extension.field.setValue('Hello world!');}});});</script></body></html>",
93
+ "sidebar": false
94
+ },
95
+ "sys": {
96
+ "id": "2rf6QdckyoECCsQeE6gIOg",
97
+ "type": "Extension",
98
+ "version": 1,
99
+ "createdAt": "2017-09-05T12:06:18.463Z",
100
+ "createdBy": {
101
+ "sys": {
102
+ "type": "Link",
103
+ "linkType": "User",
104
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
105
+ }
106
+ },
107
+ "space": {
108
+ "sys": {
109
+ "type": "Link",
110
+ "linkType": "Space",
111
+ "id": "facgnwwgj5fe"
112
+ }
113
+ },
114
+ "updatedAt": "2017-09-05T12:06:18.463Z",
115
+ "updatedBy": {
116
+ "sys": {
117
+ "type": "Link",
118
+ "linkType": "User",
119
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
120
+ }
121
+ }
122
+ }
123
+ }
124
+ http_version:
125
+ recorded_at: Tue, 05 Sep 2017 12:18:10 GMT
126
+ - request:
127
+ method: delete
128
+ uri: https://api.contentful.com/spaces/facgnwwgj5fe/extensions/2rf6QdckyoECCsQeE6gIOg
129
+ body:
130
+ encoding: US-ASCII
131
+ string: ''
132
+ headers:
133
+ X-Contentful-User-Agent:
134
+ - sdk contentful-management.rb/1.8.1; platform ruby/2.4.1; os macOS/16;
135
+ Authorization:
136
+ - Bearer <ACCESS_TOKEN>
137
+ Content-Type:
138
+ - application/vnd.contentful.management.v1+json
139
+ Connection:
140
+ - close
141
+ Host:
142
+ - api.contentful.com
143
+ User-Agent:
144
+ - http.rb/2.2.2
145
+ response:
146
+ status:
147
+ code: 204
148
+ message: No Content
149
+ headers:
150
+ Access-Control-Allow-Headers:
151
+ - 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,X-Contentful-Enable-Experimental-Feature
152
+ Access-Control-Allow-Methods:
153
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
154
+ Access-Control-Allow-Origin:
155
+ - "*"
156
+ Access-Control-Expose-Headers:
157
+ - Etag
158
+ Access-Control-Max-Age:
159
+ - '1728000'
160
+ Cf-Space-Id:
161
+ - facgnwwgj5fe
162
+ Content-Type:
163
+ - application/vnd.contentful.management.v1+json
164
+ Date:
165
+ - Tue, 05 Sep 2017 12:18:10 GMT
166
+ Server:
167
+ - Contentful
168
+ Strict-Transport-Security:
169
+ - max-age=15768000
170
+ X-Content-Type-Options:
171
+ - nosniff
172
+ X-Contentful-Ratelimit-Hour-Limit:
173
+ - '36000'
174
+ X-Contentful-Ratelimit-Hour-Remaining:
175
+ - '35989'
176
+ X-Contentful-Ratelimit-Reset:
177
+ - '0'
178
+ X-Contentful-Ratelimit-Second-Limit:
179
+ - '10'
180
+ X-Contentful-Ratelimit-Second-Remaining:
181
+ - '9'
182
+ X-Contentful-Request-Id:
183
+ - 0e8da9ab39fd05d69b650e8f3aa875e2
184
+ Connection:
185
+ - Close
186
+ Set-Cookie:
187
+ - incap_ses_187_673446=if7qbZi0OyUMBgaB5luYAgKWrlkAAAAAcGPB1zu4iaE9re80xcdBIQ==;
188
+ path=/; Domain=.contentful.com
189
+ - nlbi_673446=yhwJI6qucUvmt4OD6lKYhQAAAADDK3z2LVUxdzv5BErh1y7O; path=/; Domain=.contentful.com
190
+ - visid_incap_673446=6b26UlQNRWWoPJN1LMwhTQKWrlkAAAAAQUIPAAAAAADvQDyGFL4boRCfFgYVDs4/;
191
+ expires=Wed, 05 Sep 2018 12:02:11 GMT; path=/; Domain=.contentful.com
192
+ X-Iinfo:
193
+ - 9-53465940-53465951 NNNN CT(89 179 0) RT(1504613889476 83) q(0 0 3 -1) r(6
194
+ 6) U5
195
+ X-Cdn:
196
+ - Incapsula
197
+ body:
198
+ encoding: ASCII-8BIT
199
+ string: ''
200
+ http_version:
201
+ recorded_at: Tue, 05 Sep 2017 12:18:11 GMT
202
+ - request:
203
+ method: get
204
+ uri: https://api.contentful.com/spaces/facgnwwgj5fe/extensions/2rf6QdckyoECCsQeE6gIOg
205
+ body:
206
+ encoding: US-ASCII
207
+ string: ''
208
+ headers:
209
+ X-Contentful-User-Agent:
210
+ - sdk contentful-management.rb/1.8.1; platform ruby/2.4.1; os macOS/16;
211
+ Authorization:
212
+ - Bearer <ACCESS_TOKEN>
213
+ Content-Type:
214
+ - application/vnd.contentful.management.v1+json
215
+ Connection:
216
+ - close
217
+ Host:
218
+ - api.contentful.com
219
+ User-Agent:
220
+ - http.rb/2.2.2
221
+ response:
222
+ status:
223
+ code: 404
224
+ message: Not Found
225
+ headers:
226
+ Access-Control-Allow-Headers:
227
+ - 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,X-Contentful-Enable-Experimental-Feature
228
+ Access-Control-Allow-Methods:
229
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
230
+ Access-Control-Allow-Origin:
231
+ - "*"
232
+ Access-Control-Expose-Headers:
233
+ - Etag
234
+ Access-Control-Max-Age:
235
+ - '1728000'
236
+ Content-Type:
237
+ - application/vnd.contentful.management.v1+json
238
+ Date:
239
+ - Tue, 05 Sep 2017 12:18:15 GMT
240
+ Server:
241
+ - Contentful
242
+ Strict-Transport-Security:
243
+ - max-age=15768000
244
+ X-Content-Type-Options:
245
+ - nosniff
246
+ X-Contentful-Ratelimit-Hour-Limit:
247
+ - '36000'
248
+ X-Contentful-Ratelimit-Hour-Remaining:
249
+ - '35988'
250
+ X-Contentful-Ratelimit-Reset:
251
+ - '0'
252
+ X-Contentful-Ratelimit-Second-Limit:
253
+ - '10'
254
+ X-Contentful-Ratelimit-Second-Remaining:
255
+ - '9'
256
+ X-Contentful-Request-Id:
257
+ - d603bc5d7e15bc36625bcad4796ab0ae
258
+ Transfer-Encoding:
259
+ - chunked
260
+ Connection:
261
+ - Close
262
+ Set-Cookie:
263
+ - incap_ses_187_673446=2Q9PRkvWnxcxKAaB5luYAgaWrlkAAAAA30O5kfoO5CnSxZgAlIQn/Q==;
264
+ path=/; Domain=.contentful.com
265
+ - nlbi_673446=tQjMHDC2snpHZKcT6lKYhQAAAABbIJQYqtBrIRlcNchqllWl; path=/; Domain=.contentful.com
266
+ - visid_incap_673446=d5Fgag7WRImUyQHaaFhuigaWrlkAAAAAQUIPAAAAAAD9fWFQHtChGdzEKMCad4lz;
267
+ expires=Wed, 05 Sep 2018 12:02:12 GMT; path=/; Domain=.contentful.com
268
+ X-Iinfo:
269
+ - 0-17229234-17229248 NNNN CT(93 77 0) RT(1504613890213 70) q(0 0 2 -1) r(43
270
+ 43) U5
271
+ X-Cdn:
272
+ - Incapsula
273
+ body:
274
+ encoding: ASCII-8BIT
275
+ string: |
276
+ {
277
+ "sys": {
278
+ "type": "Error",
279
+ "id": "NotFound"
280
+ },
281
+ "message": "The resource could not be found.",
282
+ "details": {
283
+ "type": "Extension",
284
+ "space": "facgnwwgj5fe",
285
+ "id": "2rf6QdckyoECCsQeE6gIOg"
286
+ },
287
+ "requestId": "d603bc5d7e15bc36625bcad4796ab0ae"
288
+ }
289
+ http_version:
290
+ recorded_at: Tue, 05 Sep 2017 12:18:15 GMT
291
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,126 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/arqlnkt58eul/extensions/2ZJduY1pKEma6G8Y2ImqYU
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/1.8.1; platform ruby/2.4.1; os macOS/16;
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.contentful.com
20
+ User-Agent:
21
+ - http.rb/2.2.2
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Access-Control-Allow-Headers:
28
+ - 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,X-Contentful-Enable-Experimental-Feature
29
+ Access-Control-Allow-Methods:
30
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - Etag
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cf-Space-Id:
38
+ - arqlnkt58eul
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Tue, 05 Sep 2017 07:52:23 GMT
43
+ Etag:
44
+ - '"99ea76707e6a1fc674843e1499562353"'
45
+ Server:
46
+ - Contentful
47
+ Strict-Transport-Security:
48
+ - max-age=15768000
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Contentful-Ratelimit-Hour-Limit:
52
+ - '36000'
53
+ X-Contentful-Ratelimit-Hour-Remaining:
54
+ - '35991'
55
+ X-Contentful-Ratelimit-Reset:
56
+ - '0'
57
+ X-Contentful-Ratelimit-Second-Limit:
58
+ - '10'
59
+ X-Contentful-Ratelimit-Second-Remaining:
60
+ - '9'
61
+ X-Contentful-Request-Id:
62
+ - c1ee2bfbd07b40eb4ca782c86b5db7fc
63
+ Content-Length:
64
+ - '1442'
65
+ Connection:
66
+ - Close
67
+ Set-Cookie:
68
+ - incap_ses_187_673446=LEBleZ5cDypZrHWA5luYArZXrlkAAAAA/78AGFF04PjiRst9agH4Dg==;
69
+ path=/; Domain=.contentful.com
70
+ - nlbi_673446=SdYUCCadkVTsjikY6lKYhQAAAAB0s0Vpgmvm1wWxmDQ1HerA; path=/; Domain=.contentful.com
71
+ - visid_incap_673446=NvnxbVuhTSyeHFPD+nYnHrZXrlkAAAAAQUIPAAAAAAAb6r98US0Cl2CTqNgeh4zz;
72
+ expires=Tue, 04 Sep 2018 12:02:11 GMT; path=/; Domain=.contentful.com
73
+ X-Iinfo:
74
+ - 0-15790052-15790054 NNNN CT(88 86 0) RT(1504597938029 66) q(0 0 2 -1) r(44
75
+ 44) U5
76
+ X-Cdn:
77
+ - Incapsula
78
+ body:
79
+ encoding: ASCII-8BIT
80
+ string: |
81
+ {
82
+ "extension": {
83
+ "srcdoc": "<!doctype html><html lang='en'><head><meta charset='UTF-8'/><title>Sample Editor Extension</title><link rel='stylesheet' href='https://contentful.github.io/ui-extensions-sdk/cf-extension.css'><script src='https://contentful.github.io/ui-extensions-sdk/cf-extension-api.js'></script></head><body><div id='content'></div><script>window.contentfulExtension.init(function (extension) {window.alert(extension);var value = extension.field.getValue();extension.field.setValue('Hello world!');extension.field.onValueChanged(function(value) {if (value !== currentValue) {extension.field.setValue('Hello world!');}});});</script></body></html>",
84
+ "name": "My awesome extension by srcDoc",
85
+ "fieldTypes": [
86
+ {
87
+ "type": "Symbol"
88
+ },
89
+ {
90
+ "type": "Text"
91
+ }
92
+ ],
93
+ "sidebar": false
94
+ },
95
+ "sys": {
96
+ "id": "2ZJduY1pKEma6G8Y2ImqYU",
97
+ "type": "Extension",
98
+ "version": 1,
99
+ "createdAt": "2017-06-29T11:04:33.874Z",
100
+ "createdBy": {
101
+ "sys": {
102
+ "type": "Link",
103
+ "linkType": "User",
104
+ "id": "7uJNojWP0gbuP7Pplz7Syo"
105
+ }
106
+ },
107
+ "space": {
108
+ "sys": {
109
+ "type": "Link",
110
+ "linkType": "Space",
111
+ "id": "arqlnkt58eul"
112
+ }
113
+ },
114
+ "updatedAt": "2017-06-29T11:04:33.874Z",
115
+ "updatedBy": {
116
+ "sys": {
117
+ "type": "Link",
118
+ "linkType": "User",
119
+ "id": "7uJNojWP0gbuP7Pplz7Syo"
120
+ }
121
+ }
122
+ }
123
+ }
124
+ http_version:
125
+ recorded_at: Tue, 05 Sep 2017 07:52:23 GMT
126
+ recorded_with: VCR 3.0.3