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,235 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/4esHTHIVgc0uWkiwGwOsa6
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
+ - Fri, 01 Aug 2014 11:25:32 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1594'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"81ae37b1bcb898886f970354c7b22845"'
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
+ {
57
+ "name": "car_mark",
58
+ "id": "carMark",
59
+ "type": "Text",
60
+ "uiid": "2tak96o94ow",
61
+ "localized": true
62
+ },
63
+ {
64
+ "name": "car_city_plate",
65
+ "id": "carCityPlate",
66
+ "type": "Symbol",
67
+ "uiid": "4gqwj4k6k8w",
68
+ "localized": true
69
+ },
70
+ {
71
+ "name": "car_capacity",
72
+ "id": "carCapacity",
73
+ "type": "Number",
74
+ "uiid": "2ms8n1w14ao",
75
+ "localized": true
76
+ },
77
+ {
78
+ "name": "car_photo",
79
+ "id": "carPhoto",
80
+ "type": "Link",
81
+ "uiid": "33wtzyo9e68",
82
+ "linkType": "Asset",
83
+ "localized": true
84
+ }
85
+ ],
86
+ "name": "Car",
87
+ "sys": {
88
+ "id": "4esHTHIVgc0uWkiwGwOsa6",
89
+ "type": "ContentType",
90
+ "createdAt": "2014-08-01T10:30:19.224Z",
91
+ "createdBy": {
92
+ "sys": {
93
+ "type": "Link",
94
+ "linkType": "User",
95
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
96
+ }
97
+ },
98
+ "space": {
99
+ "sys": {
100
+ "type": "Link",
101
+ "linkType": "Space",
102
+ "id": "yr5m0jky5hsh"
103
+ }
104
+ },
105
+ "firstPublishedAt": "2014-08-01T10:32:26.083Z",
106
+ "publishedCounter": 2,
107
+ "publishedAt": "2014-08-01T11:14:19.463Z",
108
+ "publishedBy": {
109
+ "sys": {
110
+ "type": "Link",
111
+ "linkType": "User",
112
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
113
+ }
114
+ },
115
+ "publishedVersion": 85,
116
+ "version": 86,
117
+ "updatedAt": "2014-08-01T11:14:19.470Z",
118
+ "updatedBy": {
119
+ "sys": {
120
+ "type": "Link",
121
+ "linkType": "User",
122
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
123
+ }
124
+ }
125
+ },
126
+ "description": "Car content type",
127
+ "displayField": "carMark"
128
+ }
129
+ http_version:
130
+ recorded_at: Fri, 01 Aug 2014 11:25:32 GMT
131
+ - request:
132
+ method: post
133
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
134
+ body:
135
+ encoding: UTF-8
136
+ string: '{"fields":{"carMark":{"en-US":"Mercedes Benz","pl":"Mercedes"},"carCityPlate":{"en-US":"en","pl":"bia"},"carCapacity":{"en-US":2.5,"pl":2.5}}}'
137
+ headers:
138
+ User-Agent:
139
+ - RubyContenfulManagementGem/0.0.1
140
+ Authorization:
141
+ - Bearer <ACCESS_TOKEN>
142
+ Content-Type:
143
+ - application/vnd.contentful.management.v1+json
144
+ X-Contentful-Content-Type:
145
+ - 4esHTHIVgc0uWkiwGwOsa6
146
+ Host:
147
+ - api.contentful.com
148
+ response:
149
+ status:
150
+ code: 201
151
+ message: Created
152
+ headers:
153
+ Server:
154
+ - nginx
155
+ Date:
156
+ - Fri, 01 Aug 2014 11:25:33 GMT
157
+ Content-Type:
158
+ - application/vnd.contentful.management.v1+json
159
+ Content-Length:
160
+ - '968'
161
+ Connection:
162
+ - keep-alive
163
+ X-Powered-By:
164
+ - Express
165
+ Cf-Space-Id:
166
+ - yr5m0jky5hsh
167
+ Etag:
168
+ - '"355932a6b6aa069eb051263a9f1ea52c"'
169
+ Access-Control-Allow-Origin:
170
+ - "*"
171
+ Access-Control-Allow-Headers:
172
+ - 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
173
+ Access-Control-Allow-Methods:
174
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
175
+ "^access-Control-Expose-Headers":
176
+ - Etag
177
+ Access-Control-Max-Age:
178
+ - '1728000'
179
+ body:
180
+ encoding: UTF-8
181
+ string: |
182
+ {
183
+ "fields": {
184
+ "carMark": {
185
+ "en-US": "Mercedes Benz",
186
+ "pl": "Mercedes"
187
+ },
188
+ "carCityPlate": {
189
+ "en-US": "en",
190
+ "pl": "bia"
191
+ },
192
+ "carCapacity": {
193
+ "en-US": 2.5,
194
+ "pl": 2.5
195
+ }
196
+ },
197
+ "sys": {
198
+ "id": "664EPJ6zHqAeMO6O0mGggU",
199
+ "type": "Entry",
200
+ "version": 1,
201
+ "createdAt": "2014-08-01T11:25:33.437Z",
202
+ "createdBy": {
203
+ "sys": {
204
+ "type": "Link",
205
+ "linkType": "User",
206
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
207
+ }
208
+ },
209
+ "space": {
210
+ "sys": {
211
+ "type": "Link",
212
+ "linkType": "Space",
213
+ "id": "yr5m0jky5hsh"
214
+ }
215
+ },
216
+ "contentType": {
217
+ "sys": {
218
+ "type": "Link",
219
+ "linkType": "ContentType",
220
+ "id": "4esHTHIVgc0uWkiwGwOsa6"
221
+ }
222
+ },
223
+ "updatedAt": "2014-08-01T11:25:33.437Z",
224
+ "updatedBy": {
225
+ "sys": {
226
+ "type": "Link",
227
+ "linkType": "User",
228
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
229
+ }
230
+ }
231
+ }
232
+ }
233
+ http_version:
234
+ recorded_at: Fri, 01 Aug 2014 11:25:33 GMT
235
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,398 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/Qa8TW5nPWgiU4MA6AGYgq
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
+ - Mon, 04 Aug 2014 07:49:43 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1282'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"9c46cf2349d76d2e816769da6905827c"'
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
+ "sys": {
56
+ "id": "Qa8TW5nPWgiU4MA6AGYgq",
57
+ "type": "Entry",
58
+ "createdAt": "2014-08-04T07:20:11.797Z",
59
+ "createdBy": {
60
+ "sys": {
61
+ "type": "Link",
62
+ "linkType": "User",
63
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
64
+ }
65
+ },
66
+ "space": {
67
+ "sys": {
68
+ "type": "Link",
69
+ "linkType": "Space",
70
+ "id": "yr5m0jky5hsh"
71
+ }
72
+ },
73
+ "contentType": {
74
+ "sys": {
75
+ "type": "Link",
76
+ "linkType": "ContentType",
77
+ "id": "4EnwylPOikyMGUIy8uQgQY"
78
+ }
79
+ },
80
+ "firstPublishedAt": "2014-08-04T07:20:45.855Z",
81
+ "publishedCounter": 1,
82
+ "publishedAt": "2014-08-04T07:20:45.855Z",
83
+ "publishedBy": {
84
+ "sys": {
85
+ "type": "Link",
86
+ "linkType": "User",
87
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
88
+ }
89
+ },
90
+ "publishedVersion": 47,
91
+ "version": 48,
92
+ "updatedAt": "2014-08-04T07:20:45.858Z",
93
+ "updatedBy": {
94
+ "sys": {
95
+ "type": "Link",
96
+ "linkType": "User",
97
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
98
+ }
99
+ }
100
+ },
101
+ "fields": {
102
+ "post_title": {
103
+ "en-US": "Post title"
104
+ },
105
+ "post_body": {
106
+ "en-US": "Post body"
107
+ },
108
+ "post_code": {
109
+ "en-US": "XXXLS"
110
+ },
111
+ "post_created": {
112
+ "en-US": "2014-08-20T11:20:00+02:00"
113
+ }
114
+ }
115
+ }
116
+ http_version:
117
+ recorded_at: Mon, 04 Aug 2014 07:49:43 GMT
118
+ - request:
119
+ method: get
120
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/6xzrdCr33OMAeIYUgs6UKi
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ''
124
+ headers:
125
+ User-Agent:
126
+ - RubyContenfulManagementGem/0.0.1
127
+ Authorization:
128
+ - Bearer <ACCESS_TOKEN>
129
+ Content-Type:
130
+ - application/vnd.contentful.management.v1+json
131
+ Content-Length:
132
+ - '0'
133
+ Host:
134
+ - api.contentful.com
135
+ response:
136
+ status:
137
+ code: 200
138
+ message: OK
139
+ headers:
140
+ Server:
141
+ - nginx
142
+ Date:
143
+ - Mon, 04 Aug 2014 07:49:44 GMT
144
+ Content-Type:
145
+ - application/vnd.contentful.management.v1+json
146
+ Content-Length:
147
+ - '2017'
148
+ Connection:
149
+ - keep-alive
150
+ X-Powered-By:
151
+ - Express
152
+ Cf-Space-Id:
153
+ - yr5m0jky5hsh
154
+ Etag:
155
+ - '"43815bd6c3cd72389bbd86aeda07a923"'
156
+ Access-Control-Allow-Origin:
157
+ - "*"
158
+ Access-Control-Allow-Headers:
159
+ - 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
160
+ Access-Control-Allow-Methods:
161
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
162
+ "^access-Control-Expose-Headers":
163
+ - Etag
164
+ Access-Control-Max-Age:
165
+ - '1728000'
166
+ body:
167
+ encoding: UTF-8
168
+ string: |
169
+ {
170
+ "name": "Blog",
171
+ "description": "Blog's content type",
172
+ "fields": [
173
+ {
174
+ "id": "blog_name",
175
+ "name": "blog_name",
176
+ "type": "Text",
177
+ "uiid": "4j6nspw3bb4"
178
+ },
179
+ {
180
+ "id": "blog_entries",
181
+ "name": "blog_entries",
182
+ "type": "Array",
183
+ "items": {
184
+ "type": "Link",
185
+ "linkType": "Entry"
186
+ },
187
+ "localized": true,
188
+ "uiid": "4fb61794mio"
189
+ },
190
+ {
191
+ "name": "entries",
192
+ "id": "entries",
193
+ "type": "Array",
194
+ "uiid": "4usq6g722gw",
195
+ "items": {
196
+ "type": "Link",
197
+ "linkType": "Entry"
198
+ },
199
+ "localized": true
200
+ },
201
+ {
202
+ "name": "assets",
203
+ "id": "assets",
204
+ "type": "Array",
205
+ "uiid": "4gdlrxqamtc",
206
+ "items": {
207
+ "type": "Link",
208
+ "linkType": "Asset"
209
+ },
210
+ "localized": true
211
+ },
212
+ {
213
+ "name": "entry",
214
+ "id": "entry",
215
+ "type": "Link",
216
+ "uiid": "2x4umbxk4cg",
217
+ "linkType": "Entry"
218
+ },
219
+ {
220
+ "name": "blog_entry",
221
+ "id": "blog_entry",
222
+ "type": "Link",
223
+ "uiid": "3vc40nae0hs",
224
+ "linkType": "Entry"
225
+ }
226
+ ],
227
+ "sys": {
228
+ "id": "6xzrdCr33OMAeIYUgs6UKi",
229
+ "type": "ContentType",
230
+ "createdAt": "2014-07-31T10:33:50.934Z",
231
+ "createdBy": {
232
+ "sys": {
233
+ "type": "Link",
234
+ "linkType": "User",
235
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
236
+ }
237
+ },
238
+ "space": {
239
+ "sys": {
240
+ "type": "Link",
241
+ "linkType": "Space",
242
+ "id": "yr5m0jky5hsh"
243
+ }
244
+ },
245
+ "firstPublishedAt": "2014-07-31T10:34:14.463Z",
246
+ "publishedCounter": 6,
247
+ "publishedAt": "2014-08-04T07:44:58.250Z",
248
+ "publishedBy": {
249
+ "sys": {
250
+ "type": "Link",
251
+ "linkType": "User",
252
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
253
+ }
254
+ },
255
+ "publishedVersion": 104,
256
+ "version": 105,
257
+ "updatedAt": "2014-08-04T07:44:58.256Z",
258
+ "updatedBy": {
259
+ "sys": {
260
+ "type": "Link",
261
+ "linkType": "User",
262
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
263
+ }
264
+ }
265
+ }
266
+ }
267
+ http_version:
268
+ recorded_at: Mon, 04 Aug 2014 07:49:44 GMT
269
+ - request:
270
+ method: post
271
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
272
+ body:
273
+ encoding: UTF-8
274
+ string: '{"fields":{"blog_name":{"en-US":"Piotrek"},"blog_entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}}},"blog_entries":{"en-US":[{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}},{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}},{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}}]}}}'
275
+ headers:
276
+ User-Agent:
277
+ - RubyContenfulManagementGem/0.0.1
278
+ Authorization:
279
+ - Bearer <ACCESS_TOKEN>
280
+ Content-Type:
281
+ - application/vnd.contentful.management.v1+json
282
+ X-Contentful-Content-Type:
283
+ - 6xzrdCr33OMAeIYUgs6UKi
284
+ Host:
285
+ - api.contentful.com
286
+ response:
287
+ status:
288
+ code: 201
289
+ message: Created
290
+ headers:
291
+ Server:
292
+ - nginx
293
+ Date:
294
+ - Mon, 04 Aug 2014 07:49:46 GMT
295
+ Content-Type:
296
+ - application/vnd.contentful.management.v1+json
297
+ Content-Length:
298
+ - '1502'
299
+ Connection:
300
+ - keep-alive
301
+ X-Powered-By:
302
+ - Express
303
+ Cf-Space-Id:
304
+ - yr5m0jky5hsh
305
+ Etag:
306
+ - '"ee33538d18a0d97d376e09aa75543519"'
307
+ Access-Control-Allow-Origin:
308
+ - "*"
309
+ Access-Control-Allow-Headers:
310
+ - 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
311
+ Access-Control-Allow-Methods:
312
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
313
+ "^access-Control-Expose-Headers":
314
+ - Etag
315
+ Access-Control-Max-Age:
316
+ - '1728000'
317
+ body:
318
+ encoding: UTF-8
319
+ string: |
320
+ {
321
+ "fields": {
322
+ "blog_name": {
323
+ "en-US": "Piotrek"
324
+ },
325
+ "blog_entry": {
326
+ "en-US": {
327
+ "sys": {
328
+ "type": "Link",
329
+ "linkType": "Entry",
330
+ "id": "Qa8TW5nPWgiU4MA6AGYgq"
331
+ }
332
+ }
333
+ },
334
+ "blog_entries": {
335
+ "en-US": [
336
+ {
337
+ "sys": {
338
+ "type": "Link",
339
+ "linkType": "Entry",
340
+ "id": "Qa8TW5nPWgiU4MA6AGYgq"
341
+ }
342
+ },
343
+ {
344
+ "sys": {
345
+ "type": "Link",
346
+ "linkType": "Entry",
347
+ "id": "Qa8TW5nPWgiU4MA6AGYgq"
348
+ }
349
+ },
350
+ {
351
+ "sys": {
352
+ "type": "Link",
353
+ "linkType": "Entry",
354
+ "id": "Qa8TW5nPWgiU4MA6AGYgq"
355
+ }
356
+ }
357
+ ]
358
+ }
359
+ },
360
+ "sys": {
361
+ "id": "5hHvXwGvB6gUWigmGYQokU",
362
+ "type": "Entry",
363
+ "version": 1,
364
+ "createdAt": "2014-08-04T07:49:46.659Z",
365
+ "createdBy": {
366
+ "sys": {
367
+ "type": "Link",
368
+ "linkType": "User",
369
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
370
+ }
371
+ },
372
+ "space": {
373
+ "sys": {
374
+ "type": "Link",
375
+ "linkType": "Space",
376
+ "id": "yr5m0jky5hsh"
377
+ }
378
+ },
379
+ "contentType": {
380
+ "sys": {
381
+ "type": "Link",
382
+ "linkType": "ContentType",
383
+ "id": "6xzrdCr33OMAeIYUgs6UKi"
384
+ }
385
+ },
386
+ "updatedAt": "2014-08-04T07:49:46.659Z",
387
+ "updatedBy": {
388
+ "sys": {
389
+ "type": "Link",
390
+ "linkType": "User",
391
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
392
+ }
393
+ }
394
+ }
395
+ }
396
+ http_version:
397
+ recorded_at: Mon, 04 Aug 2014 07:49:46 GMT
398
+ recorded_with: VCR 2.9.2