contentful-management 0.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +24 -0
- data/.reek +3 -0
- data/.rspec +3 -0
- data/.rubocop.yml +16 -0
- data/.travis.yml +9 -0
- data/CHANGELOG.md +2 -0
- data/Gemfile +13 -0
- data/LICENSE.txt +22 -0
- data/README.md +408 -0
- data/Rakefile +37 -0
- data/bin/cma-console +8 -0
- data/contentful-management.gemspec +33 -0
- data/examples/blog.rb +82 -0
- data/examples/content_types.rb +45 -0
- data/examples/create_space.rb +35 -0
- data/lib/contentful/management.rb +12 -0
- data/lib/contentful/management/array.rb +35 -0
- data/lib/contentful/management/asset.rb +163 -0
- data/lib/contentful/management/client.rb +160 -0
- data/lib/contentful/management/content_type.rb +180 -0
- data/lib/contentful/management/dynamic_entry.rb +71 -0
- data/lib/contentful/management/entry.rb +213 -0
- data/lib/contentful/management/error.rb +62 -0
- data/lib/contentful/management/field.rb +34 -0
- data/lib/contentful/management/file.rb +15 -0
- data/lib/contentful/management/http_client.rb +22 -0
- data/lib/contentful/management/link.rb +23 -0
- data/lib/contentful/management/locale.rb +48 -0
- data/lib/contentful/management/location.rb +15 -0
- data/lib/contentful/management/request.rb +82 -0
- data/lib/contentful/management/resource.rb +166 -0
- data/lib/contentful/management/resource/array_like.rb +37 -0
- data/lib/contentful/management/resource/fields.rb +69 -0
- data/lib/contentful/management/resource/refresher.rb +21 -0
- data/lib/contentful/management/resource/system_properties.rb +56 -0
- data/lib/contentful/management/resource_builder.rb +269 -0
- data/lib/contentful/management/response.rb +72 -0
- data/lib/contentful/management/space.rb +159 -0
- data/lib/contentful/management/support.rb +24 -0
- data/lib/contentful/management/version.rb +6 -0
- data/spec/fixtures/vcr_cassettes/array_page_1.yml +1337 -0
- data/spec/fixtures/vcr_cassettes/asset/all.yml +611 -0
- data/spec/fixtures/vcr_cassettes/asset/archive.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/archive_published.yml +177 -0
- data/spec/fixtures/vcr_cassettes/asset/archived_false.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/archived_true.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/create.yml +150 -0
- data/spec/fixtures/vcr_cassettes/asset/create_with_already_used_id.yml +56 -0
- data/spec/fixtures/vcr_cassettes/asset/create_with_custom_id.yml +150 -0
- data/spec/fixtures/vcr_cassettes/asset/destroy.yml +159 -0
- data/spec/fixtures/vcr_cassettes/asset/destroy_published.yml +175 -0
- data/spec/fixtures/vcr_cassettes/asset/find.yml +108 -0
- data/spec/fixtures/vcr_cassettes/asset/find_not_found.yml +64 -0
- data/spec/fixtures/vcr_cassettes/asset/image_url.yml +133 -0
- data/spec/fixtures/vcr_cassettes/asset/locale.yml +110 -0
- data/spec/fixtures/vcr_cassettes/asset/publish.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/publish_already_published.yml +176 -0
- data/spec/fixtures/vcr_cassettes/asset/published_false.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/published_true.yml +226 -0
- data/spec/fixtures/vcr_cassettes/asset/save_update.yml +242 -0
- data/spec/fixtures/vcr_cassettes/asset/set_locale.yml +110 -0
- data/spec/fixtures/vcr_cassettes/asset/unarchive.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchive.yml +168 -0
- data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchived.yml +168 -0
- data/spec/fixtures/vcr_cassettes/asset/unpublish.yml +228 -0
- data/spec/fixtures/vcr_cassettes/asset/unpublish_already_unpublished.yml +168 -0
- data/spec/fixtures/vcr_cassettes/asset/update_file.yml +207 -0
- data/spec/fixtures/vcr_cassettes/asset/update_to_specified_locale.yml +224 -0
- data/spec/fixtures/vcr_cassettes/asset/update_with_default_locale_without_file.yml +214 -0
- data/spec/fixtures/vcr_cassettes/content_type/activate.yml +246 -0
- data/spec/fixtures/vcr_cassettes/content_type/activate_with_invalid_version.yml +186 -0
- data/spec/fixtures/vcr_cassettes/content_type/activated_false.yml +246 -0
- data/spec/fixtures/vcr_cassettes/content_type/activated_true.yml +257 -0
- data/spec/fixtures/vcr_cassettes/content_type/all.yml +190 -0
- data/spec/fixtures/vcr_cassettes/content_type/create.yml +87 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_content_type_with_id.yml +87 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Array_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Boolean_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Date_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Integer_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Link_field.yml +95 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Location_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Number_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Object_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Symbol_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Text_field.yml +94 -0
- data/spec/fixtures/vcr_cassettes/content_type/deactivate.yml +246 -0
- data/spec/fixtures/vcr_cassettes/content_type/deactivate_already_deactivated.yml +176 -0
- data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_entries.yml +236 -0
- data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_version_change.yml +248 -0
- data/spec/fixtures/vcr_cassettes/content_type/destroy.yml +148 -0
- data/spec/fixtures/vcr_cassettes/content_type/destroy_activated.yml +164 -0
- data/spec/fixtures/vcr_cassettes/content_type/entry/create.yml +1344 -0
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_camel_case_id_to_multiple_locales.yml +235 -0
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries.yml +398 -0
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries_for_multiple_locales.yml +3157 -0
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_multiple_locales.yml +230 -0
- data/spec/fixtures/vcr_cassettes/content_type/fields/add.yml +345 -0
- data/spec/fixtures/vcr_cassettes/content_type/fields/create.yml +353 -0
- data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_with_params.yml +228 -0
- data/spec/fixtures/vcr_cassettes/content_type/fields/create_with_params.yml +221 -0
- data/spec/fixtures/vcr_cassettes/content_type/fields/destroy.yml +349 -0
- data/spec/fixtures/vcr_cassettes/content_type/fields/update_field.yml +358 -0
- data/spec/fixtures/vcr_cassettes/content_type/find.yml +180 -0
- data/spec/fixtures/vcr_cassettes/content_type/find_not_found.yml +64 -0
- data/spec/fixtures/vcr_cassettes/content_type/save_new.yml +876 -0
- data/spec/fixtures/vcr_cassettes/content_type/save_updated.yml +345 -0
- data/spec/fixtures/vcr_cassettes/content_type/save_with_added_field.yml +217 -0
- data/spec/fixtures/vcr_cassettes/content_type/update.yml +175 -0
- data/spec/fixtures/vcr_cassettes/content_type/update_change_field_name.yml +222 -0
- data/spec/fixtures/vcr_cassettes/content_type/update_remove_field.yml +231 -0
- data/spec/fixtures/vcr_cassettes/content_type/update_with_fields.yml +222 -0
- data/spec/fixtures/vcr_cassettes/content_type/update_with_one_new_field.yml +251 -0
- data/spec/fixtures/vcr_cassettes/entry/all.yml +139 -0
- data/spec/fixtures/vcr_cassettes/entry/archive.yml +222 -0
- data/spec/fixtures/vcr_cassettes/entry/archive_published.yml +187 -0
- data/spec/fixtures/vcr_cassettes/entry/archived_false.yml +178 -0
- data/spec/fixtures/vcr_cassettes/entry/archived_true.yml +248 -0
- data/spec/fixtures/vcr_cassettes/entry/create.yml +245 -0
- data/spec/fixtures/vcr_cassettes/entry/create_test.yml +150 -0
- data/spec/fixtures/vcr_cassettes/entry/create_with_asset.yml +403 -0
- data/spec/fixtures/vcr_cassettes/entry/create_with_assets.yml +419 -0
- data/spec/fixtures/vcr_cassettes/entry/create_with_entries.yml +418 -0
- data/spec/fixtures/vcr_cassettes/entry/create_with_entry.yml +493 -0
- data/spec/fixtures/vcr_cassettes/entry/create_with_location.yml +259 -0
- data/spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml +271 -0
- data/spec/fixtures/vcr_cassettes/entry/destory_published.yml +172 -0
- data/spec/fixtures/vcr_cassettes/entry/destroy.yml +156 -0
- data/spec/fixtures/vcr_cassettes/entry/find.yml +129 -0
- data/spec/fixtures/vcr_cassettes/entry/find_not_found.yml +64 -0
- data/spec/fixtures/vcr_cassettes/entry/publish.yml +248 -0
- data/spec/fixtures/vcr_cassettes/entry/publish_already_published.yml +186 -0
- data/spec/fixtures/vcr_cassettes/entry/published_false.yml +248 -0
- data/spec/fixtures/vcr_cassettes/entry/published_true.yml +257 -0
- data/spec/fixtures/vcr_cassettes/entry/save_update.yml +211 -0
- data/spec/fixtures/vcr_cassettes/entry/unarchive.yml +248 -0
- data/spec/fixtures/vcr_cassettes/entry/unarchive_already_unarchived.yml +178 -0
- data/spec/fixtures/vcr_cassettes/entry/unpublish.yml +248 -0
- data/spec/fixtures/vcr_cassettes/entry/unpublish_already_unpublished.yml +178 -0
- data/spec/fixtures/vcr_cassettes/entry/update.yml +626 -0
- data/spec/fixtures/vcr_cassettes/entry/update_unlocalized_field.yml +308 -0
- data/spec/fixtures/vcr_cassettes/entry/update_with_custom_locale.yml +332 -0
- data/spec/fixtures/vcr_cassettes/get_request.yml +37 -0
- data/spec/fixtures/vcr_cassettes/locale/all_for_space.yml +321 -0
- data/spec/fixtures/vcr_cassettes/locale/create_for_space.yml +95 -0
- data/spec/fixtures/vcr_cassettes/locale/find.yml +95 -0
- data/spec/fixtures/vcr_cassettes/locale/find_for_space_not_found.yml +67 -0
- data/spec/fixtures/vcr_cassettes/space/all.yml +1201 -0
- data/spec/fixtures/vcr_cassettes/space/asset/all.yml +475 -0
- data/spec/fixtures/vcr_cassettes/space/asset/assets.yml +826 -0
- data/spec/fixtures/vcr_cassettes/space/asset/create.yml +508 -0
- data/spec/fixtures/vcr_cassettes/space/asset/create_with_multiple_locales.yml +1062 -0
- data/spec/fixtures/vcr_cassettes/space/asset/find.yml +634 -0
- data/spec/fixtures/vcr_cassettes/space/content_type/all.yml +470 -0
- data/spec/fixtures/vcr_cassettes/space/content_type/content_types.yml +341 -0
- data/spec/fixtures/vcr_cassettes/space/content_type/create.yml +425 -0
- data/spec/fixtures/vcr_cassettes/space/content_type/find.yml +493 -0
- data/spec/fixtures/vcr_cassettes/space/create.yml +85 -0
- data/spec/fixtures/vcr_cassettes/space/create_when_limit_has_been_reached.yml +67 -0
- data/spec/fixtures/vcr_cassettes/space/create_with_unknown_organization.yml +65 -0
- data/spec/fixtures/vcr_cassettes/space/create_without_organization.yml +83 -0
- data/spec/fixtures/vcr_cassettes/space/destory.yml +196 -0
- data/spec/fixtures/vcr_cassettes/space/entry/all.yml +634 -0
- data/spec/fixtures/vcr_cassettes/space/entry/entries.yml +498 -0
- data/spec/fixtures/vcr_cassettes/space/entry/find.yml +624 -0
- data/spec/fixtures/vcr_cassettes/space/find.yml +270 -0
- data/spec/fixtures/vcr_cassettes/space/find_not_found.yml +67 -0
- data/spec/fixtures/vcr_cassettes/space/locale/all.yml +690 -0
- data/spec/fixtures/vcr_cassettes/space/locale/create.yml +572 -0
- data/spec/fixtures/vcr_cassettes/space/locale/create_with_the_same_code.yml +585 -0
- data/spec/fixtures/vcr_cassettes/space/locale/find.yml +572 -0
- data/spec/fixtures/vcr_cassettes/space/locale/find_not_found.yml +580 -0
- data/spec/fixtures/vcr_cassettes/space/locale/locales.yml +480 -0
- data/spec/fixtures/vcr_cassettes/space/locale/update.yml +700 -0
- data/spec/fixtures/vcr_cassettes/space/save_new_space.yml +67 -0
- data/spec/fixtures/vcr_cassettes/space/save_update_space.yml +352 -0
- data/spec/fixtures/vcr_cassettes/space/update.yml +350 -0
- data/spec/fixtures/vcr_cassettes/space/update_with_the_same_data.yml +350 -0
- data/spec/lib/contentful/management/array_spec.rb +59 -0
- data/spec/lib/contentful/management/asset_spec.rb +321 -0
- data/spec/lib/contentful/management/client_spec.rb +80 -0
- data/spec/lib/contentful/management/content_type_spec.rb +455 -0
- data/spec/lib/contentful/management/entry_spec.rb +308 -0
- data/spec/lib/contentful/management/locale_spec.rb +53 -0
- data/spec/lib/contentful/management/space_spec.rb +317 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/support/vcr.rb +17 -0
- metadata +554 -0
@@ -0,0 +1,228 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/5FDqplZoruAUGmiSa02asE
|
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 07:34:06 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Content-Length:
|
32
|
+
- '1179'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Powered-By:
|
36
|
+
- Express
|
37
|
+
Cf-Space-Id:
|
38
|
+
- yr5m0jky5hsh
|
39
|
+
Etag:
|
40
|
+
- '"a265f17218070186d567d08a56cc92d8"'
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
43
|
+
Access-Control-Allow-Headers:
|
44
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
|
45
|
+
Access-Control-Allow-Methods:
|
46
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
47
|
+
"^access-Control-Expose-Headers":
|
48
|
+
- Etag
|
49
|
+
Access-Control-Max-Age:
|
50
|
+
- '1728000'
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: |
|
54
|
+
{
|
55
|
+
"fields": {
|
56
|
+
"title": {
|
57
|
+
"en-US": "titlebyCreateAPI"
|
58
|
+
},
|
59
|
+
"description": {
|
60
|
+
"en-US": "descByAPI"
|
61
|
+
},
|
62
|
+
"file": {
|
63
|
+
"en-US": {
|
64
|
+
"contentType": "image/jpeg",
|
65
|
+
"fileName": "pic1.jpg",
|
66
|
+
"details": {
|
67
|
+
"image": {
|
68
|
+
"width": 1280,
|
69
|
+
"height": 1920
|
70
|
+
},
|
71
|
+
"size": 2584366
|
72
|
+
},
|
73
|
+
"url": "//images.contentful.com/yr5m0jky5hsh/5FDqplZoruAUGmiSa02asE/f5cab89aa8f9d8ca2e520d63bc356ef9/pic1.jpg"
|
74
|
+
}
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"sys": {
|
78
|
+
"id": "5FDqplZoruAUGmiSa02asE",
|
79
|
+
"type": "Asset",
|
80
|
+
"createdAt": "2014-07-31T06:31:03.919Z",
|
81
|
+
"createdBy": {
|
82
|
+
"sys": {
|
83
|
+
"type": "Link",
|
84
|
+
"linkType": "User",
|
85
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"space": {
|
89
|
+
"sys": {
|
90
|
+
"type": "Link",
|
91
|
+
"linkType": "Space",
|
92
|
+
"id": "yr5m0jky5hsh"
|
93
|
+
}
|
94
|
+
},
|
95
|
+
"firstPublishedAt": "2014-07-31T07:29:12.424Z",
|
96
|
+
"publishedCounter": 3,
|
97
|
+
"version": 10,
|
98
|
+
"updatedAt": "2014-07-31T07:34:02.861Z",
|
99
|
+
"updatedBy": {
|
100
|
+
"sys": {
|
101
|
+
"type": "Link",
|
102
|
+
"linkType": "User",
|
103
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
http_version:
|
109
|
+
recorded_at: Thu, 31 Jul 2014 07:34:06 GMT
|
110
|
+
- request:
|
111
|
+
method: put
|
112
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/5FDqplZoruAUGmiSa02asE/archived
|
113
|
+
body:
|
114
|
+
encoding: US-ASCII
|
115
|
+
string: ''
|
116
|
+
headers:
|
117
|
+
User-Agent:
|
118
|
+
- RubyContenfulManagementGem/0.0.1
|
119
|
+
Authorization:
|
120
|
+
- Bearer <ACCESS_TOKEN>
|
121
|
+
Content-Type:
|
122
|
+
- application/vnd.contentful.management.v1+json
|
123
|
+
X-Contentful-Version:
|
124
|
+
- '10'
|
125
|
+
Content-Length:
|
126
|
+
- '0'
|
127
|
+
Host:
|
128
|
+
- api.contentful.com
|
129
|
+
response:
|
130
|
+
status:
|
131
|
+
code: 200
|
132
|
+
message: OK
|
133
|
+
headers:
|
134
|
+
Server:
|
135
|
+
- nginx
|
136
|
+
Date:
|
137
|
+
- Thu, 31 Jul 2014 07:34:07 GMT
|
138
|
+
Content-Type:
|
139
|
+
- application/vnd.contentful.management.v1+json
|
140
|
+
Content-Length:
|
141
|
+
- '1393'
|
142
|
+
Connection:
|
143
|
+
- keep-alive
|
144
|
+
X-Powered-By:
|
145
|
+
- Express
|
146
|
+
Cf-Space-Id:
|
147
|
+
- yr5m0jky5hsh
|
148
|
+
Etag:
|
149
|
+
- '"fb844a10b312d6bf0dc0c64001698f15"'
|
150
|
+
Access-Control-Allow-Origin:
|
151
|
+
- "*"
|
152
|
+
Access-Control-Allow-Headers:
|
153
|
+
- 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
|
154
|
+
Access-Control-Allow-Methods:
|
155
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
156
|
+
"^access-Control-Expose-Headers":
|
157
|
+
- Etag
|
158
|
+
Access-Control-Max-Age:
|
159
|
+
- '1728000'
|
160
|
+
body:
|
161
|
+
encoding: UTF-8
|
162
|
+
string: |
|
163
|
+
{
|
164
|
+
"fields": {
|
165
|
+
"title": {
|
166
|
+
"en-US": "titlebyCreateAPI"
|
167
|
+
},
|
168
|
+
"description": {
|
169
|
+
"en-US": "descByAPI"
|
170
|
+
},
|
171
|
+
"file": {
|
172
|
+
"en-US": {
|
173
|
+
"contentType": "image/jpeg",
|
174
|
+
"fileName": "pic1.jpg",
|
175
|
+
"details": {
|
176
|
+
"image": {
|
177
|
+
"width": 1280,
|
178
|
+
"height": 1920
|
179
|
+
},
|
180
|
+
"size": 2584366
|
181
|
+
},
|
182
|
+
"url": "//images.contentful.com/yr5m0jky5hsh/5FDqplZoruAUGmiSa02asE/f5cab89aa8f9d8ca2e520d63bc356ef9/pic1.jpg"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
},
|
186
|
+
"sys": {
|
187
|
+
"id": "5FDqplZoruAUGmiSa02asE",
|
188
|
+
"type": "Asset",
|
189
|
+
"createdAt": "2014-07-31T06:31:03.919Z",
|
190
|
+
"createdBy": {
|
191
|
+
"sys": {
|
192
|
+
"type": "Link",
|
193
|
+
"linkType": "User",
|
194
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
195
|
+
}
|
196
|
+
},
|
197
|
+
"space": {
|
198
|
+
"sys": {
|
199
|
+
"type": "Link",
|
200
|
+
"linkType": "Space",
|
201
|
+
"id": "yr5m0jky5hsh"
|
202
|
+
}
|
203
|
+
},
|
204
|
+
"firstPublishedAt": "2014-07-31T07:29:12.424Z",
|
205
|
+
"publishedCounter": 3,
|
206
|
+
"version": 11,
|
207
|
+
"updatedAt": "2014-07-31T07:34:07.408Z",
|
208
|
+
"updatedBy": {
|
209
|
+
"sys": {
|
210
|
+
"type": "Link",
|
211
|
+
"linkType": "User",
|
212
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
213
|
+
}
|
214
|
+
},
|
215
|
+
"archivedAt": "2014-07-31T07:34:07.408Z",
|
216
|
+
"archivedBy": {
|
217
|
+
"sys": {
|
218
|
+
"type": "Link",
|
219
|
+
"linkType": "User",
|
220
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
221
|
+
}
|
222
|
+
},
|
223
|
+
"archivedVersion": 10
|
224
|
+
}
|
225
|
+
}
|
226
|
+
http_version:
|
227
|
+
recorded_at: Thu, 31 Jul 2014 07:34:07 GMT
|
228
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,177 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/5FDqplZoruAUGmiSa02asE
|
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 07:33:41 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Content-Length:
|
32
|
+
- '1394'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Powered-By:
|
36
|
+
- Express
|
37
|
+
Cf-Space-Id:
|
38
|
+
- yr5m0jky5hsh
|
39
|
+
Etag:
|
40
|
+
- '"b3f745f8edfde25074228026fef5a640"'
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
43
|
+
Access-Control-Allow-Headers:
|
44
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
|
45
|
+
Access-Control-Allow-Methods:
|
46
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
47
|
+
"^access-Control-Expose-Headers":
|
48
|
+
- Etag
|
49
|
+
Access-Control-Max-Age:
|
50
|
+
- '1728000'
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: |
|
54
|
+
{
|
55
|
+
"fields": {
|
56
|
+
"title": {
|
57
|
+
"en-US": "titlebyCreateAPI"
|
58
|
+
},
|
59
|
+
"description": {
|
60
|
+
"en-US": "descByAPI"
|
61
|
+
},
|
62
|
+
"file": {
|
63
|
+
"en-US": {
|
64
|
+
"contentType": "image/jpeg",
|
65
|
+
"fileName": "pic1.jpg",
|
66
|
+
"details": {
|
67
|
+
"image": {
|
68
|
+
"width": 1280,
|
69
|
+
"height": 1920
|
70
|
+
},
|
71
|
+
"size": 2584366
|
72
|
+
},
|
73
|
+
"url": "//images.contentful.com/yr5m0jky5hsh/5FDqplZoruAUGmiSa02asE/f5cab89aa8f9d8ca2e520d63bc356ef9/pic1.jpg"
|
74
|
+
}
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"sys": {
|
78
|
+
"id": "5FDqplZoruAUGmiSa02asE",
|
79
|
+
"type": "Asset",
|
80
|
+
"createdAt": "2014-07-31T06:31:03.919Z",
|
81
|
+
"createdBy": {
|
82
|
+
"sys": {
|
83
|
+
"type": "Link",
|
84
|
+
"linkType": "User",
|
85
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"space": {
|
89
|
+
"sys": {
|
90
|
+
"type": "Link",
|
91
|
+
"linkType": "Space",
|
92
|
+
"id": "yr5m0jky5hsh"
|
93
|
+
}
|
94
|
+
},
|
95
|
+
"firstPublishedAt": "2014-07-31T07:29:12.424Z",
|
96
|
+
"publishedCounter": 3,
|
97
|
+
"publishedAt": "2014-07-31T07:33:36.042Z",
|
98
|
+
"publishedBy": {
|
99
|
+
"sys": {
|
100
|
+
"type": "Link",
|
101
|
+
"linkType": "User",
|
102
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"publishedVersion": 8,
|
106
|
+
"version": 9,
|
107
|
+
"updatedAt": "2014-07-31T07:33:36.048Z",
|
108
|
+
"updatedBy": {
|
109
|
+
"sys": {
|
110
|
+
"type": "Link",
|
111
|
+
"linkType": "User",
|
112
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
http_version:
|
118
|
+
recorded_at: Thu, 31 Jul 2014 07:33:41 GMT
|
119
|
+
- request:
|
120
|
+
method: put
|
121
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/5FDqplZoruAUGmiSa02asE/archived
|
122
|
+
body:
|
123
|
+
encoding: US-ASCII
|
124
|
+
string: ''
|
125
|
+
headers:
|
126
|
+
User-Agent:
|
127
|
+
- RubyContenfulManagementGem/0.0.1
|
128
|
+
Authorization:
|
129
|
+
- Bearer <ACCESS_TOKEN>
|
130
|
+
Content-Type:
|
131
|
+
- application/vnd.contentful.management.v1+json
|
132
|
+
X-Contentful-Version:
|
133
|
+
- '9'
|
134
|
+
Content-Length:
|
135
|
+
- '0'
|
136
|
+
Host:
|
137
|
+
- api.contentful.com
|
138
|
+
response:
|
139
|
+
status:
|
140
|
+
code: 400
|
141
|
+
message: Bad Request
|
142
|
+
headers:
|
143
|
+
Server:
|
144
|
+
- nginx
|
145
|
+
Date:
|
146
|
+
- Thu, 31 Jul 2014 07:33:42 GMT
|
147
|
+
Content-Type:
|
148
|
+
- application/vnd.contentful.management.v1+json
|
149
|
+
Transfer-Encoding:
|
150
|
+
- chunked
|
151
|
+
Connection:
|
152
|
+
- keep-alive
|
153
|
+
X-Powered-By:
|
154
|
+
- Express
|
155
|
+
Access-Control-Allow-Origin:
|
156
|
+
- "*"
|
157
|
+
Access-Control-Allow-Headers:
|
158
|
+
- 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
|
159
|
+
Access-Control-Allow-Methods:
|
160
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
161
|
+
"^access-Control-Expose-Headers":
|
162
|
+
- Etag
|
163
|
+
Access-Control-Max-Age:
|
164
|
+
- '1728000'
|
165
|
+
body:
|
166
|
+
encoding: UTF-8
|
167
|
+
string: |
|
168
|
+
{
|
169
|
+
"sys": {
|
170
|
+
"type": "Error",
|
171
|
+
"id": "BadRequest"
|
172
|
+
},
|
173
|
+
"message": "Cannot archive published"
|
174
|
+
}
|
175
|
+
http_version:
|
176
|
+
recorded_at: Thu, 31 Jul 2014 07:33:42 GMT
|
177
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,228 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/5FDqplZoruAUGmiSa02asE
|
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 07:35:34 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Content-Length:
|
32
|
+
- '1393'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Powered-By:
|
36
|
+
- Express
|
37
|
+
Cf-Space-Id:
|
38
|
+
- yr5m0jky5hsh
|
39
|
+
Etag:
|
40
|
+
- '"3c93a6d8a60bf7a28ef1bcfdb7ef2bd1"'
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
43
|
+
Access-Control-Allow-Headers:
|
44
|
+
- Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization
|
45
|
+
Access-Control-Allow-Methods:
|
46
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
47
|
+
"^access-Control-Expose-Headers":
|
48
|
+
- Etag
|
49
|
+
Access-Control-Max-Age:
|
50
|
+
- '1728000'
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: |
|
54
|
+
{
|
55
|
+
"fields": {
|
56
|
+
"title": {
|
57
|
+
"en-US": "titlebyCreateAPI"
|
58
|
+
},
|
59
|
+
"description": {
|
60
|
+
"en-US": "descByAPI"
|
61
|
+
},
|
62
|
+
"file": {
|
63
|
+
"en-US": {
|
64
|
+
"contentType": "image/jpeg",
|
65
|
+
"fileName": "pic1.jpg",
|
66
|
+
"details": {
|
67
|
+
"image": {
|
68
|
+
"width": 1280,
|
69
|
+
"height": 1920
|
70
|
+
},
|
71
|
+
"size": 2584366
|
72
|
+
},
|
73
|
+
"url": "//images.contentful.com/yr5m0jky5hsh/5FDqplZoruAUGmiSa02asE/f5cab89aa8f9d8ca2e520d63bc356ef9/pic1.jpg"
|
74
|
+
}
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"sys": {
|
78
|
+
"id": "5FDqplZoruAUGmiSa02asE",
|
79
|
+
"type": "Asset",
|
80
|
+
"createdAt": "2014-07-31T06:31:03.919Z",
|
81
|
+
"createdBy": {
|
82
|
+
"sys": {
|
83
|
+
"type": "Link",
|
84
|
+
"linkType": "User",
|
85
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"space": {
|
89
|
+
"sys": {
|
90
|
+
"type": "Link",
|
91
|
+
"linkType": "Space",
|
92
|
+
"id": "yr5m0jky5hsh"
|
93
|
+
}
|
94
|
+
},
|
95
|
+
"firstPublishedAt": "2014-07-31T07:29:12.424Z",
|
96
|
+
"publishedCounter": 3,
|
97
|
+
"archivedAt": "2014-07-31T07:35:18.373Z",
|
98
|
+
"archivedBy": {
|
99
|
+
"sys": {
|
100
|
+
"type": "Link",
|
101
|
+
"linkType": "User",
|
102
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"archivedVersion": 12,
|
106
|
+
"version": 13,
|
107
|
+
"updatedAt": "2014-07-31T07:35:18.376Z",
|
108
|
+
"updatedBy": {
|
109
|
+
"sys": {
|
110
|
+
"type": "Link",
|
111
|
+
"linkType": "User",
|
112
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
http_version:
|
118
|
+
recorded_at: Thu, 31 Jul 2014 07:35:35 GMT
|
119
|
+
- request:
|
120
|
+
method: delete
|
121
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/5FDqplZoruAUGmiSa02asE/archived
|
122
|
+
body:
|
123
|
+
encoding: US-ASCII
|
124
|
+
string: ''
|
125
|
+
headers:
|
126
|
+
User-Agent:
|
127
|
+
- RubyContenfulManagementGem/0.0.1
|
128
|
+
Authorization:
|
129
|
+
- Bearer <ACCESS_TOKEN>
|
130
|
+
Content-Type:
|
131
|
+
- application/vnd.contentful.management.v1+json
|
132
|
+
X-Contentful-Version:
|
133
|
+
- '13'
|
134
|
+
Content-Length:
|
135
|
+
- '0'
|
136
|
+
Host:
|
137
|
+
- api.contentful.com
|
138
|
+
response:
|
139
|
+
status:
|
140
|
+
code: 200
|
141
|
+
message: OK
|
142
|
+
headers:
|
143
|
+
Server:
|
144
|
+
- nginx
|
145
|
+
Date:
|
146
|
+
- Thu, 31 Jul 2014 07:35:35 GMT
|
147
|
+
Content-Type:
|
148
|
+
- application/vnd.contentful.management.v1+json
|
149
|
+
Content-Length:
|
150
|
+
- '1179'
|
151
|
+
Connection:
|
152
|
+
- keep-alive
|
153
|
+
X-Powered-By:
|
154
|
+
- Express
|
155
|
+
Cf-Space-Id:
|
156
|
+
- yr5m0jky5hsh
|
157
|
+
Etag:
|
158
|
+
- '"cb72b8800e8474f7dbfa5c8a4be5ad61"'
|
159
|
+
Access-Control-Allow-Origin:
|
160
|
+
- "*"
|
161
|
+
Access-Control-Allow-Headers:
|
162
|
+
- 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
|
163
|
+
Access-Control-Allow-Methods:
|
164
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
165
|
+
"^access-Control-Expose-Headers":
|
166
|
+
- Etag
|
167
|
+
Access-Control-Max-Age:
|
168
|
+
- '1728000'
|
169
|
+
body:
|
170
|
+
encoding: UTF-8
|
171
|
+
string: |
|
172
|
+
{
|
173
|
+
"fields": {
|
174
|
+
"title": {
|
175
|
+
"en-US": "titlebyCreateAPI"
|
176
|
+
},
|
177
|
+
"description": {
|
178
|
+
"en-US": "descByAPI"
|
179
|
+
},
|
180
|
+
"file": {
|
181
|
+
"en-US": {
|
182
|
+
"contentType": "image/jpeg",
|
183
|
+
"fileName": "pic1.jpg",
|
184
|
+
"details": {
|
185
|
+
"image": {
|
186
|
+
"width": 1280,
|
187
|
+
"height": 1920
|
188
|
+
},
|
189
|
+
"size": 2584366
|
190
|
+
},
|
191
|
+
"url": "//images.contentful.com/yr5m0jky5hsh/5FDqplZoruAUGmiSa02asE/f5cab89aa8f9d8ca2e520d63bc356ef9/pic1.jpg"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
},
|
195
|
+
"sys": {
|
196
|
+
"id": "5FDqplZoruAUGmiSa02asE",
|
197
|
+
"type": "Asset",
|
198
|
+
"createdAt": "2014-07-31T06:31:03.919Z",
|
199
|
+
"createdBy": {
|
200
|
+
"sys": {
|
201
|
+
"type": "Link",
|
202
|
+
"linkType": "User",
|
203
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
204
|
+
}
|
205
|
+
},
|
206
|
+
"space": {
|
207
|
+
"sys": {
|
208
|
+
"type": "Link",
|
209
|
+
"linkType": "Space",
|
210
|
+
"id": "yr5m0jky5hsh"
|
211
|
+
}
|
212
|
+
},
|
213
|
+
"firstPublishedAt": "2014-07-31T07:29:12.424Z",
|
214
|
+
"publishedCounter": 3,
|
215
|
+
"version": 14,
|
216
|
+
"updatedAt": "2014-07-31T07:35:35.529Z",
|
217
|
+
"updatedBy": {
|
218
|
+
"sys": {
|
219
|
+
"type": "Link",
|
220
|
+
"linkType": "User",
|
221
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
222
|
+
}
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
http_version:
|
227
|
+
recorded_at: Thu, 31 Jul 2014 07:35:35 GMT
|
228
|
+
recorded_with: VCR 2.9.2
|