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,175 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/qw3F2rn3FeoOiceqAiCSC
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 09:39:38 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '667'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"bfb442e6fb36c953cb0e2f14a30df741"'
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": "Blog",
56
+ "description": "Blog content type",
57
+ "fields": [],
58
+ "sys": {
59
+ "id": "qw3F2rn3FeoOiceqAiCSC",
60
+ "type": "ContentType",
61
+ "createdAt": "2014-07-31T09:12:04.064Z",
62
+ "createdBy": {
63
+ "sys": {
64
+ "type": "Link",
65
+ "linkType": "User",
66
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
67
+ }
68
+ },
69
+ "space": {
70
+ "sys": {
71
+ "type": "Link",
72
+ "linkType": "Space",
73
+ "id": "yr5m0jky5hsh"
74
+ }
75
+ },
76
+ "version": 1,
77
+ "updatedAt": "2014-07-31T09:12:04.069Z",
78
+ "updatedBy": {
79
+ "sys": {
80
+ "type": "Link",
81
+ "linkType": "User",
82
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ http_version:
88
+ recorded_at: Thu, 31 Jul 2014 09:39:38 GMT
89
+ - request:
90
+ method: put
91
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/qw3F2rn3FeoOiceqAiCSC
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"name":"Blog Content","description":"Blogs content type","fields":[]}'
95
+ headers:
96
+ User-Agent:
97
+ - RubyContenfulManagementGem/0.0.1
98
+ Authorization:
99
+ - Bearer <ACCESS_TOKEN>
100
+ Content-Type:
101
+ - application/vnd.contentful.management.v1+json
102
+ X-Contentful-Version:
103
+ - '1'
104
+ Host:
105
+ - api.contentful.com
106
+ response:
107
+ status:
108
+ code: 200
109
+ message: OK
110
+ headers:
111
+ Server:
112
+ - nginx
113
+ Date:
114
+ - Thu, 31 Jul 2014 09:39:38 GMT
115
+ Content-Type:
116
+ - application/vnd.contentful.management.v1+json
117
+ Content-Length:
118
+ - '676'
119
+ Connection:
120
+ - keep-alive
121
+ X-Powered-By:
122
+ - Express
123
+ Cf-Space-Id:
124
+ - yr5m0jky5hsh
125
+ Etag:
126
+ - '"c797f6eb458dbe29da8b804af638be4e"'
127
+ Access-Control-Allow-Origin:
128
+ - "*"
129
+ Access-Control-Allow-Headers:
130
+ - 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
131
+ Access-Control-Allow-Methods:
132
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
133
+ "^access-Control-Expose-Headers":
134
+ - Etag
135
+ Access-Control-Max-Age:
136
+ - '1728000'
137
+ body:
138
+ encoding: UTF-8
139
+ string: |
140
+ {
141
+ "name": "Blog Content",
142
+ "description": "Blogs content type",
143
+ "fields": [],
144
+ "sys": {
145
+ "id": "qw3F2rn3FeoOiceqAiCSC",
146
+ "type": "ContentType",
147
+ "createdAt": "2014-07-31T09:12:04.064Z",
148
+ "createdBy": {
149
+ "sys": {
150
+ "type": "Link",
151
+ "linkType": "User",
152
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
153
+ }
154
+ },
155
+ "space": {
156
+ "sys": {
157
+ "type": "Link",
158
+ "linkType": "Space",
159
+ "id": "yr5m0jky5hsh"
160
+ }
161
+ },
162
+ "version": 2,
163
+ "updatedAt": "2014-07-31T09:39:38.873Z",
164
+ "updatedBy": {
165
+ "sys": {
166
+ "type": "Link",
167
+ "linkType": "User",
168
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
169
+ }
170
+ }
171
+ }
172
+ }
173
+ http_version:
174
+ recorded_at: Thu, 31 Jul 2014 09:39:39 GMT
175
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,222 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/qw3F2rn3FeoOiceqAiCSC
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 09:57:20 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1203'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"7be17da88f3a6876410fedd3594dcced"'
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": "Blog Content",
56
+ "description": "Blogs content type",
57
+ "fields": [
58
+ {
59
+ "id": "blog_author",
60
+ "name": "blog_authorxxxx",
61
+ "type": "Text",
62
+ "localized": true
63
+ },
64
+ {
65
+ "id": "xxx",
66
+ "name": "xxx",
67
+ "type": "Text"
68
+ }
69
+ ],
70
+ "sys": {
71
+ "id": "qw3F2rn3FeoOiceqAiCSC",
72
+ "type": "ContentType",
73
+ "createdAt": "2014-07-31T09:12:04.064Z",
74
+ "createdBy": {
75
+ "sys": {
76
+ "type": "Link",
77
+ "linkType": "User",
78
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
79
+ }
80
+ },
81
+ "space": {
82
+ "sys": {
83
+ "type": "Link",
84
+ "linkType": "Space",
85
+ "id": "yr5m0jky5hsh"
86
+ }
87
+ },
88
+ "firstPublishedAt": "2014-07-31T09:42:50.228Z",
89
+ "publishedCounter": 4,
90
+ "publishedAt": "2014-07-31T09:55:03.094Z",
91
+ "publishedBy": {
92
+ "sys": {
93
+ "type": "Link",
94
+ "linkType": "User",
95
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
96
+ }
97
+ },
98
+ "publishedVersion": 141,
99
+ "version": 149,
100
+ "updatedAt": "2014-07-31T09:56:45.721Z",
101
+ "updatedBy": {
102
+ "sys": {
103
+ "type": "Link",
104
+ "linkType": "User",
105
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
106
+ }
107
+ }
108
+ },
109
+ "displayField": "blog_author"
110
+ }
111
+ http_version:
112
+ recorded_at: Thu, 31 Jul 2014 09:57:21 GMT
113
+ - request:
114
+ method: put
115
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/qw3F2rn3FeoOiceqAiCSC
116
+ body:
117
+ encoding: UTF-8
118
+ string: '{"name":"Blog Content","description":"Blogs content type","fields":[{"id":"blog_author","name":"blog_author","type":"Text","localized":true},{"id":"xxx","name":"xxx","type":"Text"}]}'
119
+ headers:
120
+ User-Agent:
121
+ - RubyContenfulManagementGem/0.0.1
122
+ Authorization:
123
+ - Bearer <ACCESS_TOKEN>
124
+ Content-Type:
125
+ - application/vnd.contentful.management.v1+json
126
+ X-Contentful-Version:
127
+ - '149'
128
+ Host:
129
+ - api.contentful.com
130
+ response:
131
+ status:
132
+ code: 200
133
+ message: OK
134
+ headers:
135
+ Server:
136
+ - nginx
137
+ Date:
138
+ - Thu, 31 Jul 2014 09:57:21 GMT
139
+ Content-Type:
140
+ - application/vnd.contentful.management.v1+json
141
+ Content-Length:
142
+ - '1166'
143
+ Connection:
144
+ - keep-alive
145
+ X-Powered-By:
146
+ - Express
147
+ Cf-Space-Id:
148
+ - yr5m0jky5hsh
149
+ Etag:
150
+ - '"c4fb3318d81ddbdeb7d849d92e2c7d22"'
151
+ Access-Control-Allow-Origin:
152
+ - "*"
153
+ Access-Control-Allow-Headers:
154
+ - 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
155
+ Access-Control-Allow-Methods:
156
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
157
+ "^access-Control-Expose-Headers":
158
+ - Etag
159
+ Access-Control-Max-Age:
160
+ - '1728000'
161
+ body:
162
+ encoding: UTF-8
163
+ string: |
164
+ {
165
+ "name": "Blog Content",
166
+ "description": "Blogs content type",
167
+ "fields": [
168
+ {
169
+ "id": "blog_author",
170
+ "name": "blog_author",
171
+ "type": "Text",
172
+ "localized": true
173
+ },
174
+ {
175
+ "id": "xxx",
176
+ "name": "xxx",
177
+ "type": "Text"
178
+ }
179
+ ],
180
+ "sys": {
181
+ "id": "qw3F2rn3FeoOiceqAiCSC",
182
+ "type": "ContentType",
183
+ "createdAt": "2014-07-31T09:12:04.064Z",
184
+ "createdBy": {
185
+ "sys": {
186
+ "type": "Link",
187
+ "linkType": "User",
188
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
189
+ }
190
+ },
191
+ "space": {
192
+ "sys": {
193
+ "type": "Link",
194
+ "linkType": "Space",
195
+ "id": "yr5m0jky5hsh"
196
+ }
197
+ },
198
+ "firstPublishedAt": "2014-07-31T09:42:50.228Z",
199
+ "publishedCounter": 4,
200
+ "publishedAt": "2014-07-31T09:55:03.094Z",
201
+ "publishedBy": {
202
+ "sys": {
203
+ "type": "Link",
204
+ "linkType": "User",
205
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
206
+ }
207
+ },
208
+ "publishedVersion": 141,
209
+ "version": 150,
210
+ "updatedAt": "2014-07-31T09:57:21.742Z",
211
+ "updatedBy": {
212
+ "sys": {
213
+ "type": "Link",
214
+ "linkType": "User",
215
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
216
+ }
217
+ }
218
+ }
219
+ }
220
+ http_version:
221
+ recorded_at: Thu, 31 Jul 2014 09:57:21 GMT
222
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,231 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/qw3F2rn3FeoOiceqAiCSC
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 10:11:00 GMT
29
+ Content-Type:
30
+ - application/vnd.contentful.management.v1+json
31
+ Content-Length:
32
+ - '1478'
33
+ Connection:
34
+ - keep-alive
35
+ X-Powered-By:
36
+ - Express
37
+ Cf-Space-Id:
38
+ - yr5m0jky5hsh
39
+ Etag:
40
+ - '"00952fc41fdae53f8c864113e5dc280d"'
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": "Blog Content",
56
+ "description": "Blogs content type",
57
+ "fields": [
58
+ {
59
+ "id": "blog_author",
60
+ "name": "blog_author",
61
+ "type": "Text",
62
+ "localized": true,
63
+ "uiid": "3sc8tv8vbi8"
64
+ },
65
+ {
66
+ "id": "xxx",
67
+ "name": "xxxx",
68
+ "type": "Text",
69
+ "uiid": "4itq808464g"
70
+ },
71
+ {
72
+ "id": "sdfdsf",
73
+ "name": "sdfdsf",
74
+ "type": "Integer",
75
+ "uiid": "4tk0uc4jk00"
76
+ },
77
+ {
78
+ "id": "ssss",
79
+ "name": "ssss",
80
+ "type": "Boolean",
81
+ "uiid": "4ip6k1laebk"
82
+ }
83
+ ],
84
+ "sys": {
85
+ "id": "qw3F2rn3FeoOiceqAiCSC",
86
+ "type": "ContentType",
87
+ "createdAt": "2014-07-31T09:12:04.064Z",
88
+ "createdBy": {
89
+ "sys": {
90
+ "type": "Link",
91
+ "linkType": "User",
92
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
93
+ }
94
+ },
95
+ "space": {
96
+ "sys": {
97
+ "type": "Link",
98
+ "linkType": "Space",
99
+ "id": "yr5m0jky5hsh"
100
+ }
101
+ },
102
+ "firstPublishedAt": "2014-07-31T09:42:50.228Z",
103
+ "publishedCounter": 6,
104
+ "publishedAt": "2014-07-31T10:06:34.907Z",
105
+ "publishedBy": {
106
+ "sys": {
107
+ "type": "Link",
108
+ "linkType": "User",
109
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
110
+ }
111
+ },
112
+ "publishedVersion": 181,
113
+ "version": 182,
114
+ "updatedAt": "2014-07-31T10:06:34.911Z",
115
+ "updatedBy": {
116
+ "sys": {
117
+ "type": "Link",
118
+ "linkType": "User",
119
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
120
+ }
121
+ }
122
+ },
123
+ "displayField": "blog_author"
124
+ }
125
+ http_version:
126
+ recorded_at: Thu, 31 Jul 2014 10:11:00 GMT
127
+ - request:
128
+ method: put
129
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/qw3F2rn3FeoOiceqAiCSC
130
+ body:
131
+ encoding: UTF-8
132
+ string: '{"name":"Blog Content","description":"Blogs content type","fields":[{"id":"blog_author","name":"blog_author","type":"Text","localized":true}]}'
133
+ headers:
134
+ User-Agent:
135
+ - RubyContenfulManagementGem/0.0.1
136
+ Authorization:
137
+ - Bearer <ACCESS_TOKEN>
138
+ Content-Type:
139
+ - application/vnd.contentful.management.v1+json
140
+ X-Contentful-Version:
141
+ - '182'
142
+ Host:
143
+ - api.contentful.com
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Server:
150
+ - nginx
151
+ Date:
152
+ - Thu, 31 Jul 2014 10:11:01 GMT
153
+ Content-Type:
154
+ - application/vnd.contentful.management.v1+json
155
+ Content-Length:
156
+ - '1092'
157
+ Connection:
158
+ - keep-alive
159
+ X-Powered-By:
160
+ - Express
161
+ Cf-Space-Id:
162
+ - yr5m0jky5hsh
163
+ Etag:
164
+ - '"fdb4af1a1db66d091a982566adfdb8cb"'
165
+ Access-Control-Allow-Origin:
166
+ - "*"
167
+ Access-Control-Allow-Headers:
168
+ - 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
169
+ Access-Control-Allow-Methods:
170
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
171
+ "^access-Control-Expose-Headers":
172
+ - Etag
173
+ Access-Control-Max-Age:
174
+ - '1728000'
175
+ body:
176
+ encoding: UTF-8
177
+ string: |
178
+ {
179
+ "name": "Blog Content",
180
+ "description": "Blogs content type",
181
+ "fields": [
182
+ {
183
+ "id": "blog_author",
184
+ "name": "blog_author",
185
+ "type": "Text",
186
+ "localized": true
187
+ }
188
+ ],
189
+ "sys": {
190
+ "id": "qw3F2rn3FeoOiceqAiCSC",
191
+ "type": "ContentType",
192
+ "createdAt": "2014-07-31T09:12:04.064Z",
193
+ "createdBy": {
194
+ "sys": {
195
+ "type": "Link",
196
+ "linkType": "User",
197
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
198
+ }
199
+ },
200
+ "space": {
201
+ "sys": {
202
+ "type": "Link",
203
+ "linkType": "Space",
204
+ "id": "yr5m0jky5hsh"
205
+ }
206
+ },
207
+ "firstPublishedAt": "2014-07-31T09:42:50.228Z",
208
+ "publishedCounter": 6,
209
+ "publishedAt": "2014-07-31T10:06:34.907Z",
210
+ "publishedBy": {
211
+ "sys": {
212
+ "type": "Link",
213
+ "linkType": "User",
214
+ "id": "1E7acJL8I5XUXAMHQt9Grs"
215
+ }
216
+ },
217
+ "publishedVersion": 181,
218
+ "version": 183,
219
+ "updatedAt": "2014-07-31T10:11:01.700Z",
220
+ "updatedBy": {
221
+ "sys": {
222
+ "type": "Link",
223
+ "linkType": "User",
224
+ "id": "0fn5fOWn4WsKFyYla1gI5h"
225
+ }
226
+ }
227
+ }
228
+ }
229
+ http_version:
230
+ recorded_at: Thu, 31 Jul 2014 10:11:02 GMT
231
+ recorded_with: VCR 2.9.2