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,148 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/66jvD8UhNKmWGk24KKq0EW
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
+ - Thu, 31 Jul 2014 08:43:19 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '887'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"49cca26db75df5b76339b0d39c0caa26"'
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": "xxx",
58
+ "id": "xxx",
59
+ "type": "Text",
60
+ "uiid": "39vj7mj5am8"
61
+ }
62
+ ],
63
+ "name": "ContentTypeToDestroy",
64
+ "sys": {
65
+ "id": "66jvD8UhNKmWGk24KKq0EW",
66
+ "type": "ContentType",
67
+ "createdAt": "2014-07-31T08:40:59.948Z",
68
+ "createdBy": {
69
+ "sys": {
70
+ "type": "Link",
71
+ "linkType": "User",
72
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
73
+ }
74
+ },
75
+ "space": {
76
+ "sys": {
77
+ "type": "Link",
78
+ "linkType": "Space",
79
+ "id": "yr5m0jky5hsh"
80
+ }
81
+ },
82
+ "firstPublishedAt": "2014-07-31T08:41:22.819Z",
83
+ "publishedCounter": 1,
84
+ "version": 53,
85
+ "updatedAt": "2014-07-31T08:42:54.188Z",
86
+ "updatedBy": {
87
+ "sys": {
88
+ "type": "Link",
89
+ "linkType": "User",
90
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
91
+ }
92
+ }
93
+ },
94
+ "description": "Delete me ",
95
+ "displayField": "xxx"
96
+ }
97
+ http_version:
98
+ recorded_at: Thu, 31 Jul 2014 08:43:20 GMT
99
+ - request:
100
+ method: delete
101
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/66jvD8UhNKmWGk24KKq0EW
102
+ body:
103
+ encoding: US-ASCII
104
+ string: ''
105
+ headers:
106
+ User-Agent:
107
+ - RubyContenfulManagementGem/0.0.1
108
+ Authorization:
109
+ - Bearer <ACCESS_TOKEN>
110
+ Content-Type:
111
+ - application/vnd.contentful.management.v1+json
112
+ Content-Length:
113
+ - '0'
114
+ Host:
115
+ - api.contentful.com
116
+ response:
117
+ status:
118
+ code: 204
119
+ message: No Content
120
+ headers:
121
+ Server:
122
+ - nginx
123
+ Date:
124
+ - Thu, 31 Jul 2014 08:43:20 GMT
125
+ Content-Type:
126
+ - application/vnd.contentful.management.v1+json
127
+ Connection:
128
+ - keep-alive
129
+ X-Powered-By:
130
+ - Express
131
+ Cf-Space-Id:
132
+ - yr5m0jky5hsh
133
+ Access-Control-Allow-Origin:
134
+ - "*"
135
+ Access-Control-Allow-Headers:
136
+ - 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
137
+ Access-Control-Allow-Methods:
138
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
139
+ "^access-Control-Expose-Headers":
140
+ - Etag
141
+ Access-Control-Max-Age:
142
+ - '1728000'
143
+ body:
144
+ encoding: UTF-8
145
+ string: ''
146
+ http_version:
147
+ recorded_at: Thu, 31 Jul 2014 08:43:20 GMT
148
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,164 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/66jvD8UhNKmWGk24KKq0EW
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
+ - Thu, 31 Jul 2014 08:42:20 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1104'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"4556d9fddbeb49ba368449eb958a8ba1"'
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": "xxx",
58
+ "id": "xxx",
59
+ "type": "Text",
60
+ "uiid": "39vj7mj5am8"
61
+ }
62
+ ],
63
+ "name": "ContentTypeToDestroy",
64
+ "sys": {
65
+ "id": "66jvD8UhNKmWGk24KKq0EW",
66
+ "type": "ContentType",
67
+ "createdAt": "2014-07-31T08:40:59.948Z",
68
+ "createdBy": {
69
+ "sys": {
70
+ "type": "Link",
71
+ "linkType": "User",
72
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
73
+ }
74
+ },
75
+ "space": {
76
+ "sys": {
77
+ "type": "Link",
78
+ "linkType": "Space",
79
+ "id": "yr5m0jky5hsh"
80
+ }
81
+ },
82
+ "firstPublishedAt": "2014-07-31T08:41:22.819Z",
83
+ "publishedCounter": 1,
84
+ "publishedAt": "2014-07-31T08:41:22.819Z",
85
+ "publishedBy": {
86
+ "sys": {
87
+ "type": "Link",
88
+ "linkType": "User",
89
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
90
+ }
91
+ },
92
+ "publishedVersion": 51,
93
+ "version": 52,
94
+ "updatedAt": "2014-07-31T08:41:22.824Z",
95
+ "updatedBy": {
96
+ "sys": {
97
+ "type": "Link",
98
+ "linkType": "User",
99
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
100
+ }
101
+ }
102
+ },
103
+ "description": "Delete me ",
104
+ "displayField": "xxx"
105
+ }
106
+ http_version:
107
+ recorded_at: Thu, 31 Jul 2014 08:42:20 GMT
108
+ - request:
109
+ method: delete
110
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/66jvD8UhNKmWGk24KKq0EW
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: 400
128
+ message: Bad Request
129
+ headers:
130
+ Server:
131
+ - nginx
132
+ Date:
133
+ - Thu, 31 Jul 2014 08:42:20 GMT
134
+ Content-Type:
135
+ - application/vnd.contentful.management.v1+json
136
+ Transfer-Encoding:
137
+ - chunked
138
+ Connection:
139
+ - keep-alive
140
+ X-Powered-By:
141
+ - Express
142
+ Access-Control-Allow-Origin:
143
+ - "*"
144
+ Access-Control-Allow-Headers:
145
+ - 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
146
+ Access-Control-Allow-Methods:
147
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
148
+ "^access-Control-Expose-Headers":
149
+ - Etag
150
+ Access-Control-Max-Age:
151
+ - '1728000'
152
+ body:
153
+ encoding: UTF-8
154
+ string: |
155
+ {
156
+ "sys": {
157
+ "type": "Error",
158
+ "id": "BadRequest"
159
+ },
160
+ "message": "Cannot deleted published"
161
+ }
162
+ http_version:
163
+ recorded_at: Thu, 31 Jul 2014 08:42:20 GMT
164
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,1344 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/5DSpuKrl04eMAGQoQckeIq
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 07:23:13 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '2694'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"0d232e3ca0d9eea2582d69148be0df3b"'
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
+ "name": "Author",
56
+ "description": "Author content",
57
+ "fields": [
58
+ {
59
+ "id": "name",
60
+ "name": "name",
61
+ "type": "Text",
62
+ "localized": true,
63
+ "uiid": "3jp09h4ba4g"
64
+ },
65
+ {
66
+ "id": "age",
67
+ "name": "age",
68
+ "type": "Integer",
69
+ "localized": true,
70
+ "uiid": "43my1e8ybr4"
71
+ },
72
+ {
73
+ "id": "city",
74
+ "name": "city",
75
+ "type": "Location",
76
+ "uiid": "45uoowshekg"
77
+ },
78
+ {
79
+ "id": "assets",
80
+ "name": "assets",
81
+ "type": "Array",
82
+ "items": {
83
+ "type": "Link",
84
+ "linkType": "Asset"
85
+ },
86
+ "localized": true,
87
+ "uiid": "4p8d3di8b28"
88
+ },
89
+ {
90
+ "id": "entries",
91
+ "name": "entries",
92
+ "type": "Array",
93
+ "items": {
94
+ "type": "Link",
95
+ "linkType": "Entry"
96
+ },
97
+ "uiid": "4t2r2mpmwow"
98
+ },
99
+ {
100
+ "id": "entry",
101
+ "name": "entry",
102
+ "type": "Link",
103
+ "linkType": "Entry",
104
+ "uiid": "2u2x6csxtkw"
105
+ },
106
+ {
107
+ "id": "asset",
108
+ "name": "asset",
109
+ "type": "Link",
110
+ "linkType": "Asset",
111
+ "uiid": "3pktxccvjeo"
112
+ },
113
+ {
114
+ "id": "bool",
115
+ "name": "bool",
116
+ "type": "Boolean",
117
+ "localized": true,
118
+ "uiid": "4p882yc9728"
119
+ },
120
+ {
121
+ "id": "symbols",
122
+ "name": "symbols",
123
+ "type": "Array",
124
+ "items": {
125
+ "type": "Symbol"
126
+ },
127
+ "uiid": "2mcqj4tdczk"
128
+ },
129
+ {
130
+ "id": "birthday",
131
+ "name": "birthday",
132
+ "type": "Date",
133
+ "uiid": "3h1dkdm8we8"
134
+ },
135
+ {
136
+ "id": "symbol",
137
+ "name": "Symbol",
138
+ "type": "Symbol",
139
+ "required": true,
140
+ "localized": true,
141
+ "uiid": "30rwyn42a68"
142
+ },
143
+ {
144
+ "id": "eye_color",
145
+ "name": "Eyes color",
146
+ "type": "Text",
147
+ "uiid": "46h9q3btwcg"
148
+ }
149
+ ],
150
+ "sys": {
151
+ "id": "5DSpuKrl04eMAGQoQckeIq",
152
+ "type": "ContentType",
153
+ "createdAt": "2014-07-30T12:35:01.110Z",
154
+ "createdBy": {
155
+ "sys": {
156
+ "type": "Link",
157
+ "linkType": "User",
158
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
159
+ }
160
+ },
161
+ "space": {
162
+ "sys": {
163
+ "type": "Link",
164
+ "linkType": "Space",
165
+ "id": "yr5m0jky5hsh"
166
+ }
167
+ },
168
+ "firstPublishedAt": "2014-07-30T12:37:42.035Z",
169
+ "publishedCounter": 9,
170
+ "publishedAt": "2014-07-31T10:21:36.870Z",
171
+ "publishedBy": {
172
+ "sys": {
173
+ "type": "Link",
174
+ "linkType": "User",
175
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
176
+ }
177
+ },
178
+ "publishedVersion": 206,
179
+ "version": 213,
180
+ "updatedAt": "2014-07-31T13:23:46.624Z",
181
+ "updatedBy": {
182
+ "sys": {
183
+ "type": "Link",
184
+ "linkType": "User",
185
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ http_version:
191
+ recorded_at: Fri, 01 Aug 2014 07:23:13 GMT
192
+ - request:
193
+ method: post
194
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
195
+ body:
196
+ encoding: UTF-8
197
+ string: '{"fields":{"name":{"en-US":"Piotrek"}}}'
198
+ headers:
199
+ User-Agent:
200
+ - RubyContenfulManagementGem/0.0.1
201
+ Authorization:
202
+ - Bearer <ACCESS_TOKEN>
203
+ Content-Type:
204
+ - application/vnd.contentful.management.v1+json
205
+ X-Contentful-Content-Type:
206
+ - 5DSpuKrl04eMAGQoQckeIq
207
+ Host:
208
+ - api.contentful.com
209
+ response:
210
+ status:
211
+ code: 201
212
+ message: Created
213
+ headers:
214
+ Server:
215
+ - nginx
216
+ Date:
217
+ - Fri, 01 Aug 2014 07:23:13 GMT
218
+ Content-Type:
219
+ - application/vnd.contentful.management.v1+json
220
+ Content-Length:
221
+ - '803'
222
+ Connection:
223
+ - keep-alive
224
+ X-Powered-By:
225
+ - Express
226
+ Cf-Space-Id:
227
+ - yr5m0jky5hsh
228
+ Etag:
229
+ - '"6a0369645597490dc65f0569d63695be"'
230
+ Access-Control-Allow-Origin:
231
+ - "*"
232
+ Access-Control-Allow-Headers:
233
+ - 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
234
+ Access-Control-Allow-Methods:
235
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
236
+ "^access-Control-Expose-Headers":
237
+ - Etag
238
+ Access-Control-Max-Age:
239
+ - '1728000'
240
+ body:
241
+ encoding: UTF-8
242
+ string: |
243
+ {
244
+ "fields": {
245
+ "name": {
246
+ "en-US": "Piotrek"
247
+ }
248
+ },
249
+ "sys": {
250
+ "id": "5WzsRfbe9OgKQaKeA4CQ0a",
251
+ "type": "Entry",
252
+ "version": 1,
253
+ "createdAt": "2014-08-01T07:23:13.802Z",
254
+ "createdBy": {
255
+ "sys": {
256
+ "type": "Link",
257
+ "linkType": "User",
258
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
259
+ }
260
+ },
261
+ "space": {
262
+ "sys": {
263
+ "type": "Link",
264
+ "linkType": "Space",
265
+ "id": "yr5m0jky5hsh"
266
+ }
267
+ },
268
+ "contentType": {
269
+ "sys": {
270
+ "type": "Link",
271
+ "linkType": "ContentType",
272
+ "id": "5DSpuKrl04eMAGQoQckeIq"
273
+ }
274
+ },
275
+ "updatedAt": "2014-08-01T07:23:13.802Z",
276
+ "updatedBy": {
277
+ "sys": {
278
+ "type": "Link",
279
+ "linkType": "User",
280
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
281
+ }
282
+ }
283
+ }
284
+ }
285
+ http_version:
286
+ recorded_at: Fri, 01 Aug 2014 07:23:13 GMT
287
+ - request:
288
+ method: get
289
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh
290
+ body:
291
+ encoding: US-ASCII
292
+ string: ''
293
+ headers:
294
+ User-Agent:
295
+ - RubyContenfulManagementGem/0.0.1
296
+ Authorization:
297
+ - Bearer <ACCESS_TOKEN>
298
+ Content-Type:
299
+ - application/vnd.contentful.management.v1+json
300
+ Content-Length:
301
+ - '0'
302
+ X-Contentful-Content-Type:
303
+ - 5DSpuKrl04eMAGQoQckeIq
304
+ Host:
305
+ - api.contentful.com
306
+ response:
307
+ status:
308
+ code: 200
309
+ message: OK
310
+ headers:
311
+ Server:
312
+ - nginx
313
+ Date:
314
+ - Fri, 01 Aug 2014 07:23:14 GMT
315
+ Content-Type:
316
+ - application/vnd.contentful.management.v1+json
317
+ Content-Length:
318
+ - '451'
319
+ Connection:
320
+ - keep-alive
321
+ Status:
322
+ - 200 OK
323
+ X-Contentful-Request-Id:
324
+ - 85f-1334592145
325
+ Etag:
326
+ - '"d4c68b318e3d8e9caef04be009d6c4b7"'
327
+ Accept-Ranges:
328
+ - bytes
329
+ Cache-Control:
330
+ - max-age=0
331
+ Access-Control-Allow-Origin:
332
+ - "*"
333
+ Access-Control-Allow-Headers:
334
+ - 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
335
+ Access-Control-Allow-Methods:
336
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
337
+ "^access-Control-Expose-Headers":
338
+ - Etag
339
+ Access-Control-Max-Age:
340
+ - '1728000'
341
+ body:
342
+ encoding: UTF-8
343
+ string: |
344
+ {
345
+ "sys":{
346
+ "type":"Space",
347
+ "id":"yr5m0jky5hsh",
348
+ "version":10,
349
+ "createdBy":{
350
+ "sys":{
351
+ "type":"Link",
352
+ "linkType":"User",
353
+ "id":"0fn5fOWn4WsKFyYla1gI5h"
354
+ }
355
+ },
356
+ "createdAt":"2014-07-30T07:46:19Z",
357
+ "updatedBy":{
358
+ "sys":{
359
+ "type":"Link",
360
+ "linkType":"User",
361
+ "id":"1E7acJL8I5XUXAMHQt9Grs"
362
+ }
363
+ },
364
+ "updatedAt":"2014-07-31T07:26:59Z"
365
+ },
366
+ "name":"BlogSpace"}
367
+ http_version:
368
+ recorded_at: Fri, 01 Aug 2014 07:23:14 GMT
369
+ - request:
370
+ method: get
371
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
372
+ body:
373
+ encoding: US-ASCII
374
+ string: ''
375
+ headers:
376
+ User-Agent:
377
+ - RubyContenfulManagementGem/0.0.1
378
+ Authorization:
379
+ - Bearer <ACCESS_TOKEN>
380
+ Content-Type:
381
+ - application/vnd.contentful.management.v1+json
382
+ Content-Length:
383
+ - '0'
384
+ X-Contentful-Content-Type:
385
+ - 5DSpuKrl04eMAGQoQckeIq
386
+ Host:
387
+ - api.contentful.com
388
+ response:
389
+ status:
390
+ code: 200
391
+ message: OK
392
+ headers:
393
+ Server:
394
+ - nginx
395
+ Date:
396
+ - Fri, 01 Aug 2014 07:23:15 GMT
397
+ Content-Type:
398
+ - application/vnd.contentful.management.v1+json
399
+ Content-Length:
400
+ - '6481'
401
+ Connection:
402
+ - keep-alive
403
+ X-Powered-By:
404
+ - Express
405
+ Cf-Space-Id:
406
+ - yr5m0jky5hsh
407
+ Etag:
408
+ - '"34168171f28b21529a344f25b5461276"'
409
+ Access-Control-Allow-Origin:
410
+ - "*"
411
+ Access-Control-Allow-Headers:
412
+ - 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
413
+ Access-Control-Allow-Methods:
414
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
415
+ "^access-Control-Expose-Headers":
416
+ - Etag
417
+ Access-Control-Max-Age:
418
+ - '1728000'
419
+ body:
420
+ encoding: UTF-8
421
+ string: |
422
+ {
423
+ "sys": {
424
+ "type": "Array"
425
+ },
426
+ "total": 3,
427
+ "skip": 0,
428
+ "limit": 100,
429
+ "items": [
430
+ {
431
+ "fields": [
432
+ {
433
+ "name": "post_title",
434
+ "id": "post_title",
435
+ "type": "Text",
436
+ "uiid": "3y811ua4gsg",
437
+ "localized": true
438
+ },
439
+ {
440
+ "name": "post_body",
441
+ "id": "post_body",
442
+ "type": "Text",
443
+ "uiid": "2wcy8gvpn28",
444
+ "localized": true
445
+ },
446
+ {
447
+ "name": "post_code",
448
+ "id": "post_code",
449
+ "type": "Symbol",
450
+ "uiid": "42ip6svqlts",
451
+ "localized": true
452
+ },
453
+ {
454
+ "name": "post_created",
455
+ "id": "post_created",
456
+ "type": "Date",
457
+ "uiid": "3qb1v37yebk"
458
+ }
459
+ ],
460
+ "name": "Post",
461
+ "sys": {
462
+ "id": "4EnwylPOikyMGUIy8uQgQY",
463
+ "type": "ContentType",
464
+ "createdAt": "2014-07-31T08:46:36.678Z",
465
+ "createdBy": {
466
+ "sys": {
467
+ "type": "Link",
468
+ "linkType": "User",
469
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
470
+ }
471
+ },
472
+ "space": {
473
+ "sys": {
474
+ "type": "Link",
475
+ "linkType": "Space",
476
+ "id": "yr5m0jky5hsh"
477
+ }
478
+ },
479
+ "firstPublishedAt": "2014-07-31T08:51:14.655Z",
480
+ "publishedCounter": 5,
481
+ "version": 214,
482
+ "updatedAt": "2014-07-31T09:01:09.129Z",
483
+ "updatedBy": {
484
+ "sys": {
485
+ "type": "Link",
486
+ "linkType": "User",
487
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
488
+ }
489
+ }
490
+ },
491
+ "description": "Content with Post fields",
492
+ "displayField": "postTitl"
493
+ },
494
+ {
495
+ "name": "Author",
496
+ "description": "Author content",
497
+ "fields": [
498
+ {
499
+ "id": "name",
500
+ "name": "name",
501
+ "type": "Text",
502
+ "localized": true,
503
+ "uiid": "3jp09h4ba4g"
504
+ },
505
+ {
506
+ "id": "age",
507
+ "name": "age",
508
+ "type": "Integer",
509
+ "localized": true,
510
+ "uiid": "43my1e8ybr4"
511
+ },
512
+ {
513
+ "id": "city",
514
+ "name": "city",
515
+ "type": "Location",
516
+ "uiid": "45uoowshekg"
517
+ },
518
+ {
519
+ "id": "assets",
520
+ "name": "assets",
521
+ "type": "Array",
522
+ "items": {
523
+ "type": "Link",
524
+ "linkType": "Asset"
525
+ },
526
+ "localized": true,
527
+ "uiid": "4p8d3di8b28"
528
+ },
529
+ {
530
+ "id": "entries",
531
+ "name": "entries",
532
+ "type": "Array",
533
+ "items": {
534
+ "type": "Link",
535
+ "linkType": "Entry"
536
+ },
537
+ "uiid": "4t2r2mpmwow"
538
+ },
539
+ {
540
+ "id": "entry",
541
+ "name": "entry",
542
+ "type": "Link",
543
+ "linkType": "Entry",
544
+ "uiid": "2u2x6csxtkw"
545
+ },
546
+ {
547
+ "id": "asset",
548
+ "name": "asset",
549
+ "type": "Link",
550
+ "linkType": "Asset",
551
+ "uiid": "3pktxccvjeo"
552
+ },
553
+ {
554
+ "id": "bool",
555
+ "name": "bool",
556
+ "type": "Boolean",
557
+ "localized": true,
558
+ "uiid": "4p882yc9728"
559
+ },
560
+ {
561
+ "id": "symbols",
562
+ "name": "symbols",
563
+ "type": "Array",
564
+ "items": {
565
+ "type": "Symbol"
566
+ },
567
+ "uiid": "2mcqj4tdczk"
568
+ },
569
+ {
570
+ "id": "birthday",
571
+ "name": "birthday",
572
+ "type": "Date",
573
+ "uiid": "3h1dkdm8we8"
574
+ },
575
+ {
576
+ "id": "symbol",
577
+ "name": "Symbol",
578
+ "type": "Symbol",
579
+ "required": true,
580
+ "localized": true,
581
+ "uiid": "30rwyn42a68"
582
+ },
583
+ {
584
+ "id": "eye_color",
585
+ "name": "Eyes color",
586
+ "type": "Text",
587
+ "uiid": "46h9q3btwcg"
588
+ }
589
+ ],
590
+ "sys": {
591
+ "id": "5DSpuKrl04eMAGQoQckeIq",
592
+ "type": "ContentType",
593
+ "createdAt": "2014-07-30T12:35:01.110Z",
594
+ "createdBy": {
595
+ "sys": {
596
+ "type": "Link",
597
+ "linkType": "User",
598
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
599
+ }
600
+ },
601
+ "space": {
602
+ "sys": {
603
+ "type": "Link",
604
+ "linkType": "Space",
605
+ "id": "yr5m0jky5hsh"
606
+ }
607
+ },
608
+ "firstPublishedAt": "2014-07-30T12:37:42.035Z",
609
+ "publishedCounter": 9,
610
+ "publishedAt": "2014-07-31T10:21:36.870Z",
611
+ "publishedBy": {
612
+ "sys": {
613
+ "type": "Link",
614
+ "linkType": "User",
615
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
616
+ }
617
+ },
618
+ "publishedVersion": 206,
619
+ "version": 213,
620
+ "updatedAt": "2014-07-31T13:23:46.624Z",
621
+ "updatedBy": {
622
+ "sys": {
623
+ "type": "Link",
624
+ "linkType": "User",
625
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
626
+ }
627
+ }
628
+ }
629
+ },
630
+ {
631
+ "name": "Blog",
632
+ "description": "Blog's content type",
633
+ "fields": [
634
+ {
635
+ "id": "blog_name",
636
+ "name": "blog_name",
637
+ "type": "Text",
638
+ "uiid": "4j6nspw3bb4"
639
+ },
640
+ {
641
+ "id": "blog_entries",
642
+ "name": "Entries",
643
+ "type": "Array",
644
+ "items": {
645
+ "type": "Link",
646
+ "linkType": "Entry"
647
+ },
648
+ "localized": true,
649
+ "uiid": "4fb61794mio"
650
+ }
651
+ ],
652
+ "sys": {
653
+ "id": "6xzrdCr33OMAeIYUgs6UKi",
654
+ "type": "ContentType",
655
+ "createdAt": "2014-07-31T10:33:50.934Z",
656
+ "createdBy": {
657
+ "sys": {
658
+ "type": "Link",
659
+ "linkType": "User",
660
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
661
+ }
662
+ },
663
+ "space": {
664
+ "sys": {
665
+ "type": "Link",
666
+ "linkType": "Space",
667
+ "id": "yr5m0jky5hsh"
668
+ }
669
+ },
670
+ "firstPublishedAt": "2014-07-31T10:34:14.463Z",
671
+ "publishedCounter": 2,
672
+ "publishedAt": "2014-07-31T10:35:45.237Z",
673
+ "publishedBy": {
674
+ "sys": {
675
+ "type": "Link",
676
+ "linkType": "User",
677
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
678
+ }
679
+ },
680
+ "publishedVersion": 47,
681
+ "version": 50,
682
+ "updatedAt": "2014-07-31T13:23:40.432Z",
683
+ "updatedBy": {
684
+ "sys": {
685
+ "type": "Link",
686
+ "linkType": "User",
687
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
688
+ }
689
+ }
690
+ }
691
+ }
692
+ ]
693
+ }
694
+ http_version:
695
+ recorded_at: Fri, 01 Aug 2014 07:23:15 GMT
696
+ - request:
697
+ method: get
698
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
699
+ body:
700
+ encoding: US-ASCII
701
+ string: ''
702
+ headers:
703
+ User-Agent:
704
+ - RubyContenfulManagementGem/0.0.1
705
+ Authorization:
706
+ - Bearer <ACCESS_TOKEN>
707
+ Content-Type:
708
+ - application/vnd.contentful.management.v1+json
709
+ Content-Length:
710
+ - '0'
711
+ X-Contentful-Content-Type:
712
+ - 5DSpuKrl04eMAGQoQckeIq
713
+ Host:
714
+ - api.contentful.com
715
+ response:
716
+ status:
717
+ code: 200
718
+ message: OK
719
+ headers:
720
+ Server:
721
+ - nginx
722
+ Date:
723
+ - Fri, 01 Aug 2014 07:23:15 GMT
724
+ Content-Type:
725
+ - application/vnd.contentful.management.v1+json
726
+ Content-Length:
727
+ - '13815'
728
+ Connection:
729
+ - keep-alive
730
+ X-Powered-By:
731
+ - Express
732
+ Cf-Space-Id:
733
+ - yr5m0jky5hsh
734
+ Etag:
735
+ - '"2af809ba833bd8a6b0c9d68d26fbcf2c"'
736
+ Access-Control-Allow-Origin:
737
+ - "*"
738
+ Access-Control-Allow-Headers:
739
+ - 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
740
+ Access-Control-Allow-Methods:
741
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
742
+ "^access-Control-Expose-Headers":
743
+ - Etag
744
+ Access-Control-Max-Age:
745
+ - '1728000'
746
+ body:
747
+ encoding: UTF-8
748
+ string: |
749
+ {
750
+ "sys": {
751
+ "type": "Array"
752
+ },
753
+ "total": 9,
754
+ "skip": 0,
755
+ "limit": 100,
756
+ "items": [
757
+ {
758
+ "sys": {
759
+ "id": "4Rouux8SoUCKwkyCq2I0E0",
760
+ "type": "Entry",
761
+ "createdAt": "2014-07-30T12:37:49.078Z",
762
+ "createdBy": {
763
+ "sys": {
764
+ "type": "Link",
765
+ "linkType": "User",
766
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
767
+ }
768
+ },
769
+ "space": {
770
+ "sys": {
771
+ "type": "Link",
772
+ "linkType": "Space",
773
+ "id": "yr5m0jky5hsh"
774
+ }
775
+ },
776
+ "contentType": {
777
+ "sys": {
778
+ "type": "Link",
779
+ "linkType": "ContentType",
780
+ "id": "5DSpuKrl04eMAGQoQckeIq"
781
+ }
782
+ },
783
+ "firstPublishedAt": "2014-07-30T12:39:05.868Z",
784
+ "publishedCounter": 6,
785
+ "archivedAt": "2014-07-30T12:58:09.099Z",
786
+ "archivedBy": {
787
+ "sys": {
788
+ "type": "Link",
789
+ "linkType": "User",
790
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
791
+ }
792
+ },
793
+ "archivedVersion": 41,
794
+ "version": 42,
795
+ "updatedAt": "2014-07-30T12:58:09.101Z",
796
+ "updatedBy": {
797
+ "sys": {
798
+ "type": "Link",
799
+ "linkType": "User",
800
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
801
+ }
802
+ }
803
+ },
804
+ "fields": {
805
+ "name": {
806
+ "en-US": "Tom Handy"
807
+ },
808
+ "age": {
809
+ "en-US": 39
810
+ },
811
+ "city": {
812
+ "en-US": {
813
+ "lat": 52.1464575,
814
+ "lon": 21.05050319999998
815
+ }
816
+ },
817
+ "assets": {
818
+ "en-US": [
819
+ {
820
+ "sys": {
821
+ "type": "Link",
822
+ "linkType": "Asset",
823
+ "id": "4k8mYw2MzS6kYG0eGq0Yi0"
824
+ }
825
+ }
826
+ ]
827
+ }
828
+ }
829
+ },
830
+ {
831
+ "fields": {
832
+ "name": {
833
+ "en-US": "Tom Handy",
834
+ "pl": "testName"
835
+ },
836
+ "age": {
837
+ "en-US": 20,
838
+ "pl": null
839
+ },
840
+ "bool": {
841
+ "en-US": false,
842
+ "pl": null
843
+ },
844
+ "birthday": {
845
+ "en-US": "2000-07-12T11:11:00+02:00",
846
+ "pl": null
847
+ },
848
+ "city": {
849
+ "en-US": {
850
+ "lat": 22.44,
851
+ "lon": 33.33
852
+ },
853
+ "pl": null
854
+ },
855
+ "asset": {
856
+ "en-US": {
857
+ "sys": {
858
+ "type": "Link",
859
+ "linkType": "Asset",
860
+ "id": "codequest_id_test_custom_id"
861
+ }
862
+ },
863
+ "pl": null
864
+ },
865
+ "assets": {
866
+ "en-US": [
867
+ {
868
+ "sys": {
869
+ "type": "Link",
870
+ "linkType": "Asset",
871
+ "id": "codequest_id_test_custom_id"
872
+ }
873
+ },
874
+ {
875
+ "sys": {
876
+ "type": "Link",
877
+ "linkType": "Asset",
878
+ "id": "codequest_id_test_custom_id"
879
+ }
880
+ },
881
+ {
882
+ "sys": {
883
+ "type": "Link",
884
+ "linkType": "Asset",
885
+ "id": "codequest_id_test_custom_id"
886
+ }
887
+ }
888
+ ],
889
+ "pl": null
890
+ },
891
+ "entry": {
892
+ "en-US": {
893
+ "sys": {
894
+ "type": "Link",
895
+ "linkType": "Entry",
896
+ "id": "1d1QDYzeiyWmgqQYysae8u"
897
+ }
898
+ },
899
+ "pl": null
900
+ },
901
+ "entries": {
902
+ "en-US": [
903
+ {
904
+ "sys": {
905
+ "type": "Link",
906
+ "linkType": "Entry",
907
+ "id": "1d1QDYzeiyWmgqQYysae8u"
908
+ }
909
+ },
910
+ {
911
+ "sys": {
912
+ "type": "Link",
913
+ "linkType": "Entry",
914
+ "id": "1d1QDYzeiyWmgqQYysae8u"
915
+ }
916
+ },
917
+ {
918
+ "sys": {
919
+ "type": "Link",
920
+ "linkType": "Entry",
921
+ "id": "1d1QDYzeiyWmgqQYysae8u"
922
+ }
923
+ }
924
+ ],
925
+ "pl": null
926
+ },
927
+ "symbols": {
928
+ "en-US": [
929
+ "PL",
930
+ "USD",
931
+ "XX"
932
+ ],
933
+ "pl": null
934
+ }
935
+ },
936
+ "sys": {
937
+ "id": "4o6ghKSmSko4i828YCYaEo",
938
+ "type": "Entry",
939
+ "createdAt": "2014-07-30T13:44:39.414Z",
940
+ "createdBy": {
941
+ "sys": {
942
+ "type": "Link",
943
+ "linkType": "User",
944
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
945
+ }
946
+ },
947
+ "space": {
948
+ "sys": {
949
+ "type": "Link",
950
+ "linkType": "Space",
951
+ "id": "yr5m0jky5hsh"
952
+ }
953
+ },
954
+ "contentType": {
955
+ "sys": {
956
+ "type": "Link",
957
+ "linkType": "ContentType",
958
+ "id": "5DSpuKrl04eMAGQoQckeIq"
959
+ }
960
+ },
961
+ "firstPublishedAt": "2014-07-30T13:44:42.304Z",
962
+ "publishedCounter": 2,
963
+ "publishedAt": "2014-07-30T13:53:55.981Z",
964
+ "publishedBy": {
965
+ "sys": {
966
+ "type": "Link",
967
+ "linkType": "User",
968
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
969
+ }
970
+ },
971
+ "publishedVersion": 3,
972
+ "version": 6,
973
+ "updatedAt": "2014-07-30T14:11:08.611Z",
974
+ "updatedBy": {
975
+ "sys": {
976
+ "type": "Link",
977
+ "linkType": "User",
978
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
979
+ }
980
+ }
981
+ }
982
+ },
983
+ {
984
+ "fields": {
985
+ "name": {
986
+ "en-US": "Tom Handy"
987
+ },
988
+ "age": {
989
+ "en-US": 30
990
+ },
991
+ "city": {
992
+ "en-US": {
993
+ "lat": 22.44,
994
+ "lon": 33.33
995
+ }
996
+ }
997
+ },
998
+ "sys": {
999
+ "id": "1d1QDYzeiyWmgqQYysae8u",
1000
+ "type": "Entry",
1001
+ "createdAt": "2014-07-30T13:07:10.630Z",
1002
+ "createdBy": {
1003
+ "sys": {
1004
+ "type": "Link",
1005
+ "linkType": "User",
1006
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1007
+ }
1008
+ },
1009
+ "space": {
1010
+ "sys": {
1011
+ "type": "Link",
1012
+ "linkType": "Space",
1013
+ "id": "yr5m0jky5hsh"
1014
+ }
1015
+ },
1016
+ "contentType": {
1017
+ "sys": {
1018
+ "type": "Link",
1019
+ "linkType": "ContentType",
1020
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1021
+ }
1022
+ },
1023
+ "firstPublishedAt": "2014-07-30T13:34:58.934Z",
1024
+ "publishedCounter": 1,
1025
+ "publishedAt": "2014-07-30T13:34:58.934Z",
1026
+ "publishedBy": {
1027
+ "sys": {
1028
+ "type": "Link",
1029
+ "linkType": "User",
1030
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1031
+ }
1032
+ },
1033
+ "publishedVersion": 1,
1034
+ "version": 2,
1035
+ "updatedAt": "2014-07-30T13:34:58.938Z",
1036
+ "updatedBy": {
1037
+ "sys": {
1038
+ "type": "Link",
1039
+ "linkType": "User",
1040
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1041
+ }
1042
+ }
1043
+ }
1044
+ },
1045
+ {
1046
+ "fields": {
1047
+ "name": {
1048
+ "en-US": "OneAsset"
1049
+ },
1050
+ "asset": {
1051
+ "en-US": {
1052
+ "sys": {
1053
+ "type": "Link",
1054
+ "linkType": "Asset",
1055
+ "id": "codequest_id_test_custom"
1056
+ }
1057
+ }
1058
+ }
1059
+ },
1060
+ "sys": {
1061
+ "id": "32fJQBBr0I0oa4m4wyIA4E",
1062
+ "type": "Entry",
1063
+ "createdAt": "2014-07-31T14:31:24.707Z",
1064
+ "createdBy": {
1065
+ "sys": {
1066
+ "type": "Link",
1067
+ "linkType": "User",
1068
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1069
+ }
1070
+ },
1071
+ "space": {
1072
+ "sys": {
1073
+ "type": "Link",
1074
+ "linkType": "Space",
1075
+ "id": "yr5m0jky5hsh"
1076
+ }
1077
+ },
1078
+ "contentType": {
1079
+ "sys": {
1080
+ "type": "Link",
1081
+ "linkType": "ContentType",
1082
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1083
+ }
1084
+ },
1085
+ "version": 1,
1086
+ "updatedAt": "2014-07-31T14:31:24.711Z",
1087
+ "updatedBy": {
1088
+ "sys": {
1089
+ "type": "Link",
1090
+ "linkType": "User",
1091
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1092
+ }
1093
+ }
1094
+ }
1095
+ },
1096
+ {
1097
+ "fields": {
1098
+ "name": {
1099
+ "en-US": "OneAsset"
1100
+ },
1101
+ "asset": {
1102
+ "en-US": {
1103
+ "sys": {
1104
+ "type": "Link",
1105
+ "linkType": "Asset",
1106
+ "id": "codequest_id_test_custom"
1107
+ }
1108
+ }
1109
+ }
1110
+ },
1111
+ "sys": {
1112
+ "id": "3ByibvkoV2UGk6M6CyOam4",
1113
+ "type": "Entry",
1114
+ "createdAt": "2014-07-31T14:34:34.325Z",
1115
+ "createdBy": {
1116
+ "sys": {
1117
+ "type": "Link",
1118
+ "linkType": "User",
1119
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1120
+ }
1121
+ },
1122
+ "space": {
1123
+ "sys": {
1124
+ "type": "Link",
1125
+ "linkType": "Space",
1126
+ "id": "yr5m0jky5hsh"
1127
+ }
1128
+ },
1129
+ "contentType": {
1130
+ "sys": {
1131
+ "type": "Link",
1132
+ "linkType": "ContentType",
1133
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1134
+ }
1135
+ },
1136
+ "version": 1,
1137
+ "updatedAt": "2014-07-31T14:34:34.328Z",
1138
+ "updatedBy": {
1139
+ "sys": {
1140
+ "type": "Link",
1141
+ "linkType": "User",
1142
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1143
+ }
1144
+ }
1145
+ }
1146
+ },
1147
+ {
1148
+ "fields": {
1149
+ "name": {
1150
+ "en-US": "multiAssets"
1151
+ },
1152
+ "assets": {
1153
+ "en-US": [
1154
+ {
1155
+ "sys": {
1156
+ "type": "Link",
1157
+ "linkType": "Asset",
1158
+ "id": "codequest_id_test_custom"
1159
+ }
1160
+ },
1161
+ {
1162
+ "sys": {
1163
+ "type": "Link",
1164
+ "linkType": "Asset",
1165
+ "id": "codequest_id_test_custom"
1166
+ }
1167
+ },
1168
+ {
1169
+ "sys": {
1170
+ "type": "Link",
1171
+ "linkType": "Asset",
1172
+ "id": "codequest_id_test_custom"
1173
+ }
1174
+ }
1175
+ ]
1176
+ }
1177
+ },
1178
+ "sys": {
1179
+ "id": "4Klrxoy8Le28cSmIgGASoi",
1180
+ "type": "Entry",
1181
+ "createdAt": "2014-07-31T14:34:36.487Z",
1182
+ "createdBy": {
1183
+ "sys": {
1184
+ "type": "Link",
1185
+ "linkType": "User",
1186
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1187
+ }
1188
+ },
1189
+ "space": {
1190
+ "sys": {
1191
+ "type": "Link",
1192
+ "linkType": "Space",
1193
+ "id": "yr5m0jky5hsh"
1194
+ }
1195
+ },
1196
+ "contentType": {
1197
+ "sys": {
1198
+ "type": "Link",
1199
+ "linkType": "ContentType",
1200
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1201
+ }
1202
+ },
1203
+ "version": 1,
1204
+ "updatedAt": "2014-07-31T14:34:36.491Z",
1205
+ "updatedBy": {
1206
+ "sys": {
1207
+ "type": "Link",
1208
+ "linkType": "User",
1209
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
1210
+ }
1211
+ }
1212
+ }
1213
+ },
1214
+ {
1215
+ "fields": {
1216
+ "name": {
1217
+ "en-US": "Piotrek"
1218
+ }
1219
+ },
1220
+ "sys": {
1221
+ "id": "4GYrjrR6koCOUc8wku0U2e",
1222
+ "type": "Entry",
1223
+ "createdAt": "2014-08-01T07:21:01.559Z",
1224
+ "createdBy": {
1225
+ "sys": {
1226
+ "type": "Link",
1227
+ "linkType": "User",
1228
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
1229
+ }
1230
+ },
1231
+ "space": {
1232
+ "sys": {
1233
+ "type": "Link",
1234
+ "linkType": "Space",
1235
+ "id": "yr5m0jky5hsh"
1236
+ }
1237
+ },
1238
+ "contentType": {
1239
+ "sys": {
1240
+ "type": "Link",
1241
+ "linkType": "ContentType",
1242
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1243
+ }
1244
+ },
1245
+ "version": 1,
1246
+ "updatedAt": "2014-08-01T07:21:01.563Z",
1247
+ "updatedBy": {
1248
+ "sys": {
1249
+ "type": "Link",
1250
+ "linkType": "User",
1251
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
1252
+ }
1253
+ }
1254
+ }
1255
+ },
1256
+ {
1257
+ "fields": {
1258
+ "name": {
1259
+ "en-US": "Piotrek"
1260
+ }
1261
+ },
1262
+ "sys": {
1263
+ "id": "2jxLNLBQ3uwO4UkkSokAwE",
1264
+ "type": "Entry",
1265
+ "createdAt": "2014-08-01T07:22:27.517Z",
1266
+ "createdBy": {
1267
+ "sys": {
1268
+ "type": "Link",
1269
+ "linkType": "User",
1270
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
1271
+ }
1272
+ },
1273
+ "space": {
1274
+ "sys": {
1275
+ "type": "Link",
1276
+ "linkType": "Space",
1277
+ "id": "yr5m0jky5hsh"
1278
+ }
1279
+ },
1280
+ "contentType": {
1281
+ "sys": {
1282
+ "type": "Link",
1283
+ "linkType": "ContentType",
1284
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1285
+ }
1286
+ },
1287
+ "version": 1,
1288
+ "updatedAt": "2014-08-01T07:22:27.521Z",
1289
+ "updatedBy": {
1290
+ "sys": {
1291
+ "type": "Link",
1292
+ "linkType": "User",
1293
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
1294
+ }
1295
+ }
1296
+ }
1297
+ },
1298
+ {
1299
+ "fields": {
1300
+ "name": {
1301
+ "en-US": "Piotrek"
1302
+ }
1303
+ },
1304
+ "sys": {
1305
+ "id": "5WzsRfbe9OgKQaKeA4CQ0a",
1306
+ "type": "Entry",
1307
+ "createdAt": "2014-08-01T07:23:13.802Z",
1308
+ "createdBy": {
1309
+ "sys": {
1310
+ "type": "Link",
1311
+ "linkType": "User",
1312
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
1313
+ }
1314
+ },
1315
+ "space": {
1316
+ "sys": {
1317
+ "type": "Link",
1318
+ "linkType": "Space",
1319
+ "id": "yr5m0jky5hsh"
1320
+ }
1321
+ },
1322
+ "contentType": {
1323
+ "sys": {
1324
+ "type": "Link",
1325
+ "linkType": "ContentType",
1326
+ "id": "5DSpuKrl04eMAGQoQckeIq"
1327
+ }
1328
+ },
1329
+ "version": 1,
1330
+ "updatedAt": "2014-08-01T07:23:13.807Z",
1331
+ "updatedBy": {
1332
+ "sys": {
1333
+ "type": "Link",
1334
+ "linkType": "User",
1335
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
1336
+ }
1337
+ }
1338
+ }
1339
+ }
1340
+ ]
1341
+ }
1342
+ http_version:
1343
+ recorded_at: Fri, 01 Aug 2014 07:23:15 GMT
1344
+ recorded_with: VCR 2.9.2