contentful-management 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. data/.gitignore +24 -0
  2. data/.reek +3 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +16 -0
  5. data/.travis.yml +9 -0
  6. data/CHANGELOG.md +2 -0
  7. data/Gemfile +13 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +408 -0
  10. data/Rakefile +37 -0
  11. data/bin/cma-console +8 -0
  12. data/contentful-management.gemspec +33 -0
  13. data/examples/blog.rb +82 -0
  14. data/examples/content_types.rb +45 -0
  15. data/examples/create_space.rb +35 -0
  16. data/lib/contentful/management.rb +12 -0
  17. data/lib/contentful/management/array.rb +35 -0
  18. data/lib/contentful/management/asset.rb +163 -0
  19. data/lib/contentful/management/client.rb +160 -0
  20. data/lib/contentful/management/content_type.rb +180 -0
  21. data/lib/contentful/management/dynamic_entry.rb +71 -0
  22. data/lib/contentful/management/entry.rb +213 -0
  23. data/lib/contentful/management/error.rb +62 -0
  24. data/lib/contentful/management/field.rb +34 -0
  25. data/lib/contentful/management/file.rb +15 -0
  26. data/lib/contentful/management/http_client.rb +22 -0
  27. data/lib/contentful/management/link.rb +23 -0
  28. data/lib/contentful/management/locale.rb +48 -0
  29. data/lib/contentful/management/location.rb +15 -0
  30. data/lib/contentful/management/request.rb +82 -0
  31. data/lib/contentful/management/resource.rb +166 -0
  32. data/lib/contentful/management/resource/array_like.rb +37 -0
  33. data/lib/contentful/management/resource/fields.rb +69 -0
  34. data/lib/contentful/management/resource/refresher.rb +21 -0
  35. data/lib/contentful/management/resource/system_properties.rb +56 -0
  36. data/lib/contentful/management/resource_builder.rb +269 -0
  37. data/lib/contentful/management/response.rb +72 -0
  38. data/lib/contentful/management/space.rb +159 -0
  39. data/lib/contentful/management/support.rb +24 -0
  40. data/lib/contentful/management/version.rb +6 -0
  41. data/spec/fixtures/vcr_cassettes/array_page_1.yml +1337 -0
  42. data/spec/fixtures/vcr_cassettes/asset/all.yml +611 -0
  43. data/spec/fixtures/vcr_cassettes/asset/archive.yml +228 -0
  44. data/spec/fixtures/vcr_cassettes/asset/archive_published.yml +177 -0
  45. data/spec/fixtures/vcr_cassettes/asset/archived_false.yml +228 -0
  46. data/spec/fixtures/vcr_cassettes/asset/archived_true.yml +228 -0
  47. data/spec/fixtures/vcr_cassettes/asset/create.yml +150 -0
  48. data/spec/fixtures/vcr_cassettes/asset/create_with_already_used_id.yml +56 -0
  49. data/spec/fixtures/vcr_cassettes/asset/create_with_custom_id.yml +150 -0
  50. data/spec/fixtures/vcr_cassettes/asset/destroy.yml +159 -0
  51. data/spec/fixtures/vcr_cassettes/asset/destroy_published.yml +175 -0
  52. data/spec/fixtures/vcr_cassettes/asset/find.yml +108 -0
  53. data/spec/fixtures/vcr_cassettes/asset/find_not_found.yml +64 -0
  54. data/spec/fixtures/vcr_cassettes/asset/image_url.yml +133 -0
  55. data/spec/fixtures/vcr_cassettes/asset/locale.yml +110 -0
  56. data/spec/fixtures/vcr_cassettes/asset/publish.yml +228 -0
  57. data/spec/fixtures/vcr_cassettes/asset/publish_already_published.yml +176 -0
  58. data/spec/fixtures/vcr_cassettes/asset/published_false.yml +228 -0
  59. data/spec/fixtures/vcr_cassettes/asset/published_true.yml +226 -0
  60. data/spec/fixtures/vcr_cassettes/asset/save_update.yml +242 -0
  61. data/spec/fixtures/vcr_cassettes/asset/set_locale.yml +110 -0
  62. data/spec/fixtures/vcr_cassettes/asset/unarchive.yml +228 -0
  63. data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchive.yml +168 -0
  64. data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchived.yml +168 -0
  65. data/spec/fixtures/vcr_cassettes/asset/unpublish.yml +228 -0
  66. data/spec/fixtures/vcr_cassettes/asset/unpublish_already_unpublished.yml +168 -0
  67. data/spec/fixtures/vcr_cassettes/asset/update_file.yml +207 -0
  68. data/spec/fixtures/vcr_cassettes/asset/update_to_specified_locale.yml +224 -0
  69. data/spec/fixtures/vcr_cassettes/asset/update_with_default_locale_without_file.yml +214 -0
  70. data/spec/fixtures/vcr_cassettes/content_type/activate.yml +246 -0
  71. data/spec/fixtures/vcr_cassettes/content_type/activate_with_invalid_version.yml +186 -0
  72. data/spec/fixtures/vcr_cassettes/content_type/activated_false.yml +246 -0
  73. data/spec/fixtures/vcr_cassettes/content_type/activated_true.yml +257 -0
  74. data/spec/fixtures/vcr_cassettes/content_type/all.yml +190 -0
  75. data/spec/fixtures/vcr_cassettes/content_type/create.yml +87 -0
  76. data/spec/fixtures/vcr_cassettes/content_type/create_content_type_with_id.yml +87 -0
  77. data/spec/fixtures/vcr_cassettes/content_type/create_with_Array_field.yml +94 -0
  78. data/spec/fixtures/vcr_cassettes/content_type/create_with_Boolean_field.yml +94 -0
  79. data/spec/fixtures/vcr_cassettes/content_type/create_with_Date_field.yml +94 -0
  80. data/spec/fixtures/vcr_cassettes/content_type/create_with_Integer_field.yml +94 -0
  81. data/spec/fixtures/vcr_cassettes/content_type/create_with_Link_field.yml +95 -0
  82. data/spec/fixtures/vcr_cassettes/content_type/create_with_Location_field.yml +94 -0
  83. data/spec/fixtures/vcr_cassettes/content_type/create_with_Number_field.yml +94 -0
  84. data/spec/fixtures/vcr_cassettes/content_type/create_with_Object_field.yml +94 -0
  85. data/spec/fixtures/vcr_cassettes/content_type/create_with_Symbol_field.yml +94 -0
  86. data/spec/fixtures/vcr_cassettes/content_type/create_with_Text_field.yml +94 -0
  87. data/spec/fixtures/vcr_cassettes/content_type/deactivate.yml +246 -0
  88. data/spec/fixtures/vcr_cassettes/content_type/deactivate_already_deactivated.yml +176 -0
  89. data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_entries.yml +236 -0
  90. data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_version_change.yml +248 -0
  91. data/spec/fixtures/vcr_cassettes/content_type/destroy.yml +148 -0
  92. data/spec/fixtures/vcr_cassettes/content_type/destroy_activated.yml +164 -0
  93. data/spec/fixtures/vcr_cassettes/content_type/entry/create.yml +1344 -0
  94. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_camel_case_id_to_multiple_locales.yml +235 -0
  95. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries.yml +398 -0
  96. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries_for_multiple_locales.yml +3157 -0
  97. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_multiple_locales.yml +230 -0
  98. data/spec/fixtures/vcr_cassettes/content_type/fields/add.yml +345 -0
  99. data/spec/fixtures/vcr_cassettes/content_type/fields/create.yml +353 -0
  100. data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_with_params.yml +228 -0
  101. data/spec/fixtures/vcr_cassettes/content_type/fields/create_with_params.yml +221 -0
  102. data/spec/fixtures/vcr_cassettes/content_type/fields/destroy.yml +349 -0
  103. data/spec/fixtures/vcr_cassettes/content_type/fields/update_field.yml +358 -0
  104. data/spec/fixtures/vcr_cassettes/content_type/find.yml +180 -0
  105. data/spec/fixtures/vcr_cassettes/content_type/find_not_found.yml +64 -0
  106. data/spec/fixtures/vcr_cassettes/content_type/save_new.yml +876 -0
  107. data/spec/fixtures/vcr_cassettes/content_type/save_updated.yml +345 -0
  108. data/spec/fixtures/vcr_cassettes/content_type/save_with_added_field.yml +217 -0
  109. data/spec/fixtures/vcr_cassettes/content_type/update.yml +175 -0
  110. data/spec/fixtures/vcr_cassettes/content_type/update_change_field_name.yml +222 -0
  111. data/spec/fixtures/vcr_cassettes/content_type/update_remove_field.yml +231 -0
  112. data/spec/fixtures/vcr_cassettes/content_type/update_with_fields.yml +222 -0
  113. data/spec/fixtures/vcr_cassettes/content_type/update_with_one_new_field.yml +251 -0
  114. data/spec/fixtures/vcr_cassettes/entry/all.yml +139 -0
  115. data/spec/fixtures/vcr_cassettes/entry/archive.yml +222 -0
  116. data/spec/fixtures/vcr_cassettes/entry/archive_published.yml +187 -0
  117. data/spec/fixtures/vcr_cassettes/entry/archived_false.yml +178 -0
  118. data/spec/fixtures/vcr_cassettes/entry/archived_true.yml +248 -0
  119. data/spec/fixtures/vcr_cassettes/entry/create.yml +245 -0
  120. data/spec/fixtures/vcr_cassettes/entry/create_test.yml +150 -0
  121. data/spec/fixtures/vcr_cassettes/entry/create_with_asset.yml +403 -0
  122. data/spec/fixtures/vcr_cassettes/entry/create_with_assets.yml +419 -0
  123. data/spec/fixtures/vcr_cassettes/entry/create_with_entries.yml +418 -0
  124. data/spec/fixtures/vcr_cassettes/entry/create_with_entry.yml +493 -0
  125. data/spec/fixtures/vcr_cassettes/entry/create_with_location.yml +259 -0
  126. data/spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml +271 -0
  127. data/spec/fixtures/vcr_cassettes/entry/destory_published.yml +172 -0
  128. data/spec/fixtures/vcr_cassettes/entry/destroy.yml +156 -0
  129. data/spec/fixtures/vcr_cassettes/entry/find.yml +129 -0
  130. data/spec/fixtures/vcr_cassettes/entry/find_not_found.yml +64 -0
  131. data/spec/fixtures/vcr_cassettes/entry/publish.yml +248 -0
  132. data/spec/fixtures/vcr_cassettes/entry/publish_already_published.yml +186 -0
  133. data/spec/fixtures/vcr_cassettes/entry/published_false.yml +248 -0
  134. data/spec/fixtures/vcr_cassettes/entry/published_true.yml +257 -0
  135. data/spec/fixtures/vcr_cassettes/entry/save_update.yml +211 -0
  136. data/spec/fixtures/vcr_cassettes/entry/unarchive.yml +248 -0
  137. data/spec/fixtures/vcr_cassettes/entry/unarchive_already_unarchived.yml +178 -0
  138. data/spec/fixtures/vcr_cassettes/entry/unpublish.yml +248 -0
  139. data/spec/fixtures/vcr_cassettes/entry/unpublish_already_unpublished.yml +178 -0
  140. data/spec/fixtures/vcr_cassettes/entry/update.yml +626 -0
  141. data/spec/fixtures/vcr_cassettes/entry/update_unlocalized_field.yml +308 -0
  142. data/spec/fixtures/vcr_cassettes/entry/update_with_custom_locale.yml +332 -0
  143. data/spec/fixtures/vcr_cassettes/get_request.yml +37 -0
  144. data/spec/fixtures/vcr_cassettes/locale/all_for_space.yml +321 -0
  145. data/spec/fixtures/vcr_cassettes/locale/create_for_space.yml +95 -0
  146. data/spec/fixtures/vcr_cassettes/locale/find.yml +95 -0
  147. data/spec/fixtures/vcr_cassettes/locale/find_for_space_not_found.yml +67 -0
  148. data/spec/fixtures/vcr_cassettes/space/all.yml +1201 -0
  149. data/spec/fixtures/vcr_cassettes/space/asset/all.yml +475 -0
  150. data/spec/fixtures/vcr_cassettes/space/asset/assets.yml +826 -0
  151. data/spec/fixtures/vcr_cassettes/space/asset/create.yml +508 -0
  152. data/spec/fixtures/vcr_cassettes/space/asset/create_with_multiple_locales.yml +1062 -0
  153. data/spec/fixtures/vcr_cassettes/space/asset/find.yml +634 -0
  154. data/spec/fixtures/vcr_cassettes/space/content_type/all.yml +470 -0
  155. data/spec/fixtures/vcr_cassettes/space/content_type/content_types.yml +341 -0
  156. data/spec/fixtures/vcr_cassettes/space/content_type/create.yml +425 -0
  157. data/spec/fixtures/vcr_cassettes/space/content_type/find.yml +493 -0
  158. data/spec/fixtures/vcr_cassettes/space/create.yml +85 -0
  159. data/spec/fixtures/vcr_cassettes/space/create_when_limit_has_been_reached.yml +67 -0
  160. data/spec/fixtures/vcr_cassettes/space/create_with_unknown_organization.yml +65 -0
  161. data/spec/fixtures/vcr_cassettes/space/create_without_organization.yml +83 -0
  162. data/spec/fixtures/vcr_cassettes/space/destory.yml +196 -0
  163. data/spec/fixtures/vcr_cassettes/space/entry/all.yml +634 -0
  164. data/spec/fixtures/vcr_cassettes/space/entry/entries.yml +498 -0
  165. data/spec/fixtures/vcr_cassettes/space/entry/find.yml +624 -0
  166. data/spec/fixtures/vcr_cassettes/space/find.yml +270 -0
  167. data/spec/fixtures/vcr_cassettes/space/find_not_found.yml +67 -0
  168. data/spec/fixtures/vcr_cassettes/space/locale/all.yml +690 -0
  169. data/spec/fixtures/vcr_cassettes/space/locale/create.yml +572 -0
  170. data/spec/fixtures/vcr_cassettes/space/locale/create_with_the_same_code.yml +585 -0
  171. data/spec/fixtures/vcr_cassettes/space/locale/find.yml +572 -0
  172. data/spec/fixtures/vcr_cassettes/space/locale/find_not_found.yml +580 -0
  173. data/spec/fixtures/vcr_cassettes/space/locale/locales.yml +480 -0
  174. data/spec/fixtures/vcr_cassettes/space/locale/update.yml +700 -0
  175. data/spec/fixtures/vcr_cassettes/space/save_new_space.yml +67 -0
  176. data/spec/fixtures/vcr_cassettes/space/save_update_space.yml +352 -0
  177. data/spec/fixtures/vcr_cassettes/space/update.yml +350 -0
  178. data/spec/fixtures/vcr_cassettes/space/update_with_the_same_data.yml +350 -0
  179. data/spec/lib/contentful/management/array_spec.rb +59 -0
  180. data/spec/lib/contentful/management/asset_spec.rb +321 -0
  181. data/spec/lib/contentful/management/client_spec.rb +80 -0
  182. data/spec/lib/contentful/management/content_type_spec.rb +455 -0
  183. data/spec/lib/contentful/management/entry_spec.rb +308 -0
  184. data/spec/lib/contentful/management/locale_spec.rb +53 -0
  185. data/spec/lib/contentful/management/space_spec.rb +317 -0
  186. data/spec/spec_helper.rb +10 -0
  187. data/spec/support/vcr.rb +17 -0
  188. metadata +554 -0
@@ -0,0 +1,626 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/codequest_id_test_custom_id
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContenfulManagementGem/0.0.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
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Wed, 30 Jul 2014 14:11:06 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1132'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"f00ac5671462e801298d7c218f4a985a"'
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": "titlebyCreateAPI_custom_id"
58
+ },
59
+ "description": {
60
+ "en-US": "descByAPI_custom_id"
61
+ },
62
+ "file": {
63
+ "en-US": {
64
+ "contentType": "image/jpeg",
65
+ "fileName": "codequest.jpg",
66
+ "details": {
67
+ "image": {
68
+ "width": 90,
69
+ "height": 90
70
+ },
71
+ "size": 7094
72
+ },
73
+ "url": "//images.contentful.com/yr5m0jky5hsh/codequest_id_test_custom_id/a737f4d7e9cb9b009f12264a91c25336/codequest.jpg"
74
+ }
75
+ }
76
+ },
77
+ "sys": {
78
+ "id": "codequest_id_test_custom_id",
79
+ "type": "Asset",
80
+ "createdAt": "2014-07-30T13:24:53.570Z",
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": "yr5m0jky5hsh"
93
+ }
94
+ },
95
+ "version": 2,
96
+ "updatedAt": "2014-07-30T13:24:54.606Z",
97
+ "updatedBy": {
98
+ "sys": {
99
+ "type": "Link",
100
+ "linkType": "User",
101
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
102
+ }
103
+ }
104
+ }
105
+ }
106
+ http_version:
107
+ recorded_at: Wed, 30 Jul 2014 14:11:06 GMT
108
+ - request:
109
+ method: get
110
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/1d1QDYzeiyWmgqQYysae8u
111
+ body:
112
+ encoding: US-ASCII
113
+ string: ''
114
+ headers:
115
+ User-Agent:
116
+ - RubyContenfulManagementGem/0.0.1
117
+ Authorization:
118
+ - Bearer <ACCESS_TOKEN>
119
+ Content-Type:
120
+ - application/vnd.contentful.management.v1+json
121
+ Content-Length:
122
+ - '0'
123
+ Host:
124
+ - api.contentful.com
125
+ response:
126
+ status:
127
+ code: 200
128
+ message: OK
129
+ headers:
130
+ Server:
131
+ - nginx
132
+ Date:
133
+ - Wed, 30 Jul 2014 14:11:07 GMT
134
+ Content-Type:
135
+ - application/vnd.contentful.management.v1+json
136
+ Content-Length:
137
+ - '1227'
138
+ Connection:
139
+ - keep-alive
140
+ X-Powered-By:
141
+ - Express
142
+ Cf-Space-Id:
143
+ - yr5m0jky5hsh
144
+ Etag:
145
+ - '"1dbef3bc858d62efda5955b46c4d4e20"'
146
+ Access-Control-Allow-Origin:
147
+ - "*"
148
+ Access-Control-Allow-Headers:
149
+ - 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
150
+ Access-Control-Allow-Methods:
151
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
152
+ "^access-Control-Expose-Headers":
153
+ - Etag
154
+ Access-Control-Max-Age:
155
+ - '1728000'
156
+ body:
157
+ encoding: UTF-8
158
+ string: |
159
+ {
160
+ "fields": {
161
+ "name": {
162
+ "en-US": "Tom Handy"
163
+ },
164
+ "age": {
165
+ "en-US": 30
166
+ },
167
+ "city": {
168
+ "en-US": {
169
+ "lat": 22.44,
170
+ "lon": 33.33
171
+ }
172
+ }
173
+ },
174
+ "sys": {
175
+ "id": "1d1QDYzeiyWmgqQYysae8u",
176
+ "type": "Entry",
177
+ "createdAt": "2014-07-30T13:07:10.630Z",
178
+ "createdBy": {
179
+ "sys": {
180
+ "type": "Link",
181
+ "linkType": "User",
182
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
183
+ }
184
+ },
185
+ "space": {
186
+ "sys": {
187
+ "type": "Link",
188
+ "linkType": "Space",
189
+ "id": "yr5m0jky5hsh"
190
+ }
191
+ },
192
+ "contentType": {
193
+ "sys": {
194
+ "type": "Link",
195
+ "linkType": "ContentType",
196
+ "id": "5DSpuKrl04eMAGQoQckeIq"
197
+ }
198
+ },
199
+ "firstPublishedAt": "2014-07-30T13:34:58.934Z",
200
+ "publishedCounter": 1,
201
+ "publishedAt": "2014-07-30T13:34:58.934Z",
202
+ "publishedBy": {
203
+ "sys": {
204
+ "type": "Link",
205
+ "linkType": "User",
206
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
207
+ }
208
+ },
209
+ "publishedVersion": 1,
210
+ "version": 2,
211
+ "updatedAt": "2014-07-30T13:34:58.938Z",
212
+ "updatedBy": {
213
+ "sys": {
214
+ "type": "Link",
215
+ "linkType": "User",
216
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
217
+ }
218
+ }
219
+ }
220
+ }
221
+ http_version:
222
+ recorded_at: Wed, 30 Jul 2014 14:11:07 GMT
223
+ - request:
224
+ method: get
225
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/4o6ghKSmSko4i828YCYaEo
226
+ body:
227
+ encoding: US-ASCII
228
+ string: ''
229
+ headers:
230
+ User-Agent:
231
+ - RubyContenfulManagementGem/0.0.1
232
+ Authorization:
233
+ - Bearer <ACCESS_TOKEN>
234
+ Content-Type:
235
+ - application/vnd.contentful.management.v1+json
236
+ Content-Length:
237
+ - '0'
238
+ Host:
239
+ - api.contentful.com
240
+ response:
241
+ status:
242
+ code: 200
243
+ message: OK
244
+ headers:
245
+ Server:
246
+ - nginx
247
+ Date:
248
+ - Wed, 30 Jul 2014 14:11:07 GMT
249
+ Content-Type:
250
+ - application/vnd.contentful.management.v1+json
251
+ Content-Length:
252
+ - '2847'
253
+ Connection:
254
+ - keep-alive
255
+ X-Powered-By:
256
+ - Express
257
+ Cf-Space-Id:
258
+ - yr5m0jky5hsh
259
+ Etag:
260
+ - '"e417c1e3bb8f6b670aa689d877cc157d"'
261
+ Access-Control-Allow-Origin:
262
+ - "*"
263
+ Access-Control-Allow-Headers:
264
+ - 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
265
+ Access-Control-Allow-Methods:
266
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
267
+ "^access-Control-Expose-Headers":
268
+ - Etag
269
+ Access-Control-Max-Age:
270
+ - '1728000'
271
+ body:
272
+ encoding: UTF-8
273
+ string: |
274
+ {
275
+ "fields": {
276
+ "name": {
277
+ "en-US": "Tom Handy",
278
+ "pl": "testName"
279
+ },
280
+ "age": {
281
+ "en-US": 20
282
+ },
283
+ "bool": {
284
+ "en-US": false
285
+ },
286
+ "birthday": {
287
+ "en-US": "2000-07-12T11:11:00+02:00"
288
+ },
289
+ "city": {
290
+ "en-US": {
291
+ "lat": 22.44,
292
+ "lon": 33.33
293
+ }
294
+ },
295
+ "asset": {
296
+ "en-US": {
297
+ "sys": {
298
+ "type": "Link",
299
+ "linkType": "Asset",
300
+ "id": "codequest_id_test_custom_id"
301
+ }
302
+ }
303
+ },
304
+ "assets": {
305
+ "en-US": [
306
+ {
307
+ "sys": {
308
+ "type": "Link",
309
+ "linkType": "Asset",
310
+ "id": "codequest_id_test_custom_id"
311
+ }
312
+ },
313
+ {
314
+ "sys": {
315
+ "type": "Link",
316
+ "linkType": "Asset",
317
+ "id": "codequest_id_test_custom_id"
318
+ }
319
+ },
320
+ {
321
+ "sys": {
322
+ "type": "Link",
323
+ "linkType": "Asset",
324
+ "id": "codequest_id_test_custom_id"
325
+ }
326
+ }
327
+ ]
328
+ },
329
+ "entry": {
330
+ "en-US": {
331
+ "sys": {
332
+ "type": "Link",
333
+ "linkType": "Entry",
334
+ "id": "1d1QDYzeiyWmgqQYysae8u"
335
+ }
336
+ }
337
+ },
338
+ "entries": {
339
+ "en-US": [
340
+ {
341
+ "sys": {
342
+ "type": "Link",
343
+ "linkType": "Entry",
344
+ "id": "1d1QDYzeiyWmgqQYysae8u"
345
+ }
346
+ },
347
+ {
348
+ "sys": {
349
+ "type": "Link",
350
+ "linkType": "Entry",
351
+ "id": "1d1QDYzeiyWmgqQYysae8u"
352
+ }
353
+ },
354
+ {
355
+ "sys": {
356
+ "type": "Link",
357
+ "linkType": "Entry",
358
+ "id": "1d1QDYzeiyWmgqQYysae8u"
359
+ }
360
+ }
361
+ ]
362
+ },
363
+ "symbols": {
364
+ "en-US": [
365
+ "PL",
366
+ "USD",
367
+ "XX"
368
+ ]
369
+ }
370
+ },
371
+ "sys": {
372
+ "id": "4o6ghKSmSko4i828YCYaEo",
373
+ "type": "Entry",
374
+ "createdAt": "2014-07-30T13:44:39.414Z",
375
+ "createdBy": {
376
+ "sys": {
377
+ "type": "Link",
378
+ "linkType": "User",
379
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
380
+ }
381
+ },
382
+ "space": {
383
+ "sys": {
384
+ "type": "Link",
385
+ "linkType": "Space",
386
+ "id": "yr5m0jky5hsh"
387
+ }
388
+ },
389
+ "contentType": {
390
+ "sys": {
391
+ "type": "Link",
392
+ "linkType": "ContentType",
393
+ "id": "5DSpuKrl04eMAGQoQckeIq"
394
+ }
395
+ },
396
+ "firstPublishedAt": "2014-07-30T13:44:42.304Z",
397
+ "publishedCounter": 2,
398
+ "publishedAt": "2014-07-30T13:53:55.981Z",
399
+ "publishedBy": {
400
+ "sys": {
401
+ "type": "Link",
402
+ "linkType": "User",
403
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
404
+ }
405
+ },
406
+ "publishedVersion": 3,
407
+ "version": 5,
408
+ "updatedAt": "2014-07-30T13:57:21.976Z",
409
+ "updatedBy": {
410
+ "sys": {
411
+ "type": "Link",
412
+ "linkType": "User",
413
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
414
+ }
415
+ }
416
+ }
417
+ }
418
+ http_version:
419
+ recorded_at: Wed, 30 Jul 2014 14:11:07 GMT
420
+ - request:
421
+ method: put
422
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/4o6ghKSmSko4i828YCYaEo
423
+ body:
424
+ encoding: UTF-8
425
+ string: '{"fields":{"name":{"en-US":"Tom Handy","pl":"testName"},"age":{"en-US":20,"pl":null},"bool":{"en-US":false,"pl":null},"birthday":{"en-US":"2000-07-12T11:11:00+02:00","pl":null},"city":{"en-US":{"lat":22.44,"lon":33.33,"lat":22.44,"lon":33.33},"pl":null},"asset":{"en-US":{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom_id"},"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom_id"}},"pl":null},"assets":{"en-US":[{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom_id"}},{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom_id"}},{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom_id"}}],"pl":null},"entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"},"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}},"pl":null},"entries":{"en-US":[{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}},{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}},{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}}],"pl":null},"symbols":{"en-US":["PL","USD","XX"],"pl":null}}}'
426
+ headers:
427
+ User-Agent:
428
+ - RubyContenfulManagementGem/0.0.1
429
+ Authorization:
430
+ - Bearer <ACCESS_TOKEN>
431
+ Content-Type:
432
+ - application/vnd.contentful.management.v1+json
433
+ X-Contentful-Version:
434
+ - '5'
435
+ Host:
436
+ - api.contentful.com
437
+ response:
438
+ status:
439
+ code: 200
440
+ message: OK
441
+ headers:
442
+ Server:
443
+ - nginx
444
+ Date:
445
+ - Wed, 30 Jul 2014 14:11:08 GMT
446
+ Content-Type:
447
+ - application/vnd.contentful.management.v1+json
448
+ Content-Length:
449
+ - '3009'
450
+ Connection:
451
+ - keep-alive
452
+ X-Powered-By:
453
+ - Express
454
+ Cf-Space-Id:
455
+ - yr5m0jky5hsh
456
+ Etag:
457
+ - '"04dab1b6dc921eabac5fc3c433eb9c91"'
458
+ Access-Control-Allow-Origin:
459
+ - "*"
460
+ Access-Control-Allow-Headers:
461
+ - 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
462
+ Access-Control-Allow-Methods:
463
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
464
+ "^access-Control-Expose-Headers":
465
+ - Etag
466
+ Access-Control-Max-Age:
467
+ - '1728000'
468
+ body:
469
+ encoding: UTF-8
470
+ string: |
471
+ {
472
+ "fields": {
473
+ "name": {
474
+ "en-US": "Tom Handy",
475
+ "pl": "testName"
476
+ },
477
+ "age": {
478
+ "en-US": 20,
479
+ "pl": null
480
+ },
481
+ "bool": {
482
+ "en-US": false,
483
+ "pl": null
484
+ },
485
+ "birthday": {
486
+ "en-US": "2000-07-12T11:11:00+02:00",
487
+ "pl": null
488
+ },
489
+ "city": {
490
+ "en-US": {
491
+ "lat": 22.44,
492
+ "lon": 33.33
493
+ },
494
+ "pl": null
495
+ },
496
+ "asset": {
497
+ "en-US": {
498
+ "sys": {
499
+ "type": "Link",
500
+ "linkType": "Asset",
501
+ "id": "codequest_id_test_custom_id"
502
+ }
503
+ },
504
+ "pl": null
505
+ },
506
+ "assets": {
507
+ "en-US": [
508
+ {
509
+ "sys": {
510
+ "type": "Link",
511
+ "linkType": "Asset",
512
+ "id": "codequest_id_test_custom_id"
513
+ }
514
+ },
515
+ {
516
+ "sys": {
517
+ "type": "Link",
518
+ "linkType": "Asset",
519
+ "id": "codequest_id_test_custom_id"
520
+ }
521
+ },
522
+ {
523
+ "sys": {
524
+ "type": "Link",
525
+ "linkType": "Asset",
526
+ "id": "codequest_id_test_custom_id"
527
+ }
528
+ }
529
+ ],
530
+ "pl": null
531
+ },
532
+ "entry": {
533
+ "en-US": {
534
+ "sys": {
535
+ "type": "Link",
536
+ "linkType": "Entry",
537
+ "id": "1d1QDYzeiyWmgqQYysae8u"
538
+ }
539
+ },
540
+ "pl": null
541
+ },
542
+ "entries": {
543
+ "en-US": [
544
+ {
545
+ "sys": {
546
+ "type": "Link",
547
+ "linkType": "Entry",
548
+ "id": "1d1QDYzeiyWmgqQYysae8u"
549
+ }
550
+ },
551
+ {
552
+ "sys": {
553
+ "type": "Link",
554
+ "linkType": "Entry",
555
+ "id": "1d1QDYzeiyWmgqQYysae8u"
556
+ }
557
+ },
558
+ {
559
+ "sys": {
560
+ "type": "Link",
561
+ "linkType": "Entry",
562
+ "id": "1d1QDYzeiyWmgqQYysae8u"
563
+ }
564
+ }
565
+ ],
566
+ "pl": null
567
+ },
568
+ "symbols": {
569
+ "en-US": [
570
+ "PL",
571
+ "USD",
572
+ "XX"
573
+ ],
574
+ "pl": null
575
+ }
576
+ },
577
+ "sys": {
578
+ "id": "4o6ghKSmSko4i828YCYaEo",
579
+ "type": "Entry",
580
+ "createdAt": "2014-07-30T13:44:39.414Z",
581
+ "createdBy": {
582
+ "sys": {
583
+ "type": "Link",
584
+ "linkType": "User",
585
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
586
+ }
587
+ },
588
+ "space": {
589
+ "sys": {
590
+ "type": "Link",
591
+ "linkType": "Space",
592
+ "id": "yr5m0jky5hsh"
593
+ }
594
+ },
595
+ "contentType": {
596
+ "sys": {
597
+ "type": "Link",
598
+ "linkType": "ContentType",
599
+ "id": "5DSpuKrl04eMAGQoQckeIq"
600
+ }
601
+ },
602
+ "firstPublishedAt": "2014-07-30T13:44:42.304Z",
603
+ "publishedCounter": 2,
604
+ "publishedAt": "2014-07-30T13:53:55.981Z",
605
+ "publishedBy": {
606
+ "sys": {
607
+ "type": "Link",
608
+ "linkType": "User",
609
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
610
+ }
611
+ },
612
+ "publishedVersion": 3,
613
+ "version": 6,
614
+ "updatedAt": "2014-07-30T14:11:08.606Z",
615
+ "updatedBy": {
616
+ "sys": {
617
+ "type": "Link",
618
+ "linkType": "User",
619
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
620
+ }
621
+ }
622
+ }
623
+ }
624
+ http_version:
625
+ recorded_at: Wed, 30 Jul 2014 14:11:08 GMT
626
+ recorded_with: VCR 2.9.2