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,700 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh
|
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:13:27 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Content-Length:
|
32
|
+
- '453'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
X-Contentful-Request-Id:
|
38
|
+
- 85f-1334431653
|
39
|
+
Etag:
|
40
|
+
- '"cbeabcb3476920c3f3a426f8cf41795d"'
|
41
|
+
Accept-Ranges:
|
42
|
+
- bytes
|
43
|
+
Cache-Control:
|
44
|
+
- max-age=0
|
45
|
+
Access-Control-Allow-Origin:
|
46
|
+
- "*"
|
47
|
+
Access-Control-Allow-Headers:
|
48
|
+
- 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
|
49
|
+
Access-Control-Allow-Methods:
|
50
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
51
|
+
"^access-Control-Expose-Headers":
|
52
|
+
- Etag
|
53
|
+
Access-Control-Max-Age:
|
54
|
+
- '1728000'
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: |
|
58
|
+
{
|
59
|
+
"sys":{
|
60
|
+
"type":"Space",
|
61
|
+
"id":"yr5m0jky5hsh",
|
62
|
+
"version":8,
|
63
|
+
"createdBy":{
|
64
|
+
"sys":{
|
65
|
+
"type":"Link",
|
66
|
+
"linkType":"User",
|
67
|
+
"id":"0fn5fOWn4WsKFyYla1gI5h"
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"createdAt":"2014-07-30T07:46:19Z",
|
71
|
+
"updatedBy":{
|
72
|
+
"sys":{
|
73
|
+
"type":"Link",
|
74
|
+
"linkType":"User",
|
75
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"updatedAt":"2014-07-31T07:04:29Z"
|
79
|
+
},
|
80
|
+
"name":"NewNameSpace"}
|
81
|
+
http_version:
|
82
|
+
recorded_at: Thu, 31 Jul 2014 07:13:27 GMT
|
83
|
+
- request:
|
84
|
+
method: get
|
85
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
|
86
|
+
body:
|
87
|
+
encoding: US-ASCII
|
88
|
+
string: ''
|
89
|
+
headers:
|
90
|
+
User-Agent:
|
91
|
+
- RubyContenfulManagementGem/0.0.1
|
92
|
+
Authorization:
|
93
|
+
- Bearer <ACCESS_TOKEN>
|
94
|
+
Content-Type:
|
95
|
+
- application/vnd.contentful.management.v1+json
|
96
|
+
Content-Length:
|
97
|
+
- '0'
|
98
|
+
Host:
|
99
|
+
- api.contentful.com
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 200
|
103
|
+
message: OK
|
104
|
+
headers:
|
105
|
+
Server:
|
106
|
+
- nginx
|
107
|
+
Date:
|
108
|
+
- Thu, 31 Jul 2014 07:13:27 GMT
|
109
|
+
Content-Type:
|
110
|
+
- application/vnd.contentful.management.v1+json
|
111
|
+
Content-Length:
|
112
|
+
- '3054'
|
113
|
+
Connection:
|
114
|
+
- keep-alive
|
115
|
+
X-Powered-By:
|
116
|
+
- Express
|
117
|
+
Cf-Space-Id:
|
118
|
+
- yr5m0jky5hsh
|
119
|
+
Etag:
|
120
|
+
- '"4c43b6e34924f7e65971295370191384"'
|
121
|
+
Access-Control-Allow-Origin:
|
122
|
+
- "*"
|
123
|
+
Access-Control-Allow-Headers:
|
124
|
+
- 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
|
125
|
+
Access-Control-Allow-Methods:
|
126
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
127
|
+
"^access-Control-Expose-Headers":
|
128
|
+
- Etag
|
129
|
+
Access-Control-Max-Age:
|
130
|
+
- '1728000'
|
131
|
+
body:
|
132
|
+
encoding: UTF-8
|
133
|
+
string: |
|
134
|
+
{
|
135
|
+
"sys": {
|
136
|
+
"type": "Array"
|
137
|
+
},
|
138
|
+
"total": 1,
|
139
|
+
"skip": 0,
|
140
|
+
"limit": 100,
|
141
|
+
"items": [
|
142
|
+
{
|
143
|
+
"fields": [
|
144
|
+
{
|
145
|
+
"name": "name",
|
146
|
+
"id": "name",
|
147
|
+
"type": "Text",
|
148
|
+
"uiid": "3fflnrplhc0",
|
149
|
+
"localized": true
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"name": "age",
|
153
|
+
"id": "age",
|
154
|
+
"uiid": "2t5blkc7u2o",
|
155
|
+
"type": "Integer",
|
156
|
+
"localized": true
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"name": "city",
|
160
|
+
"id": "city",
|
161
|
+
"type": "Location",
|
162
|
+
"uiid": "4fzl5jkm1a8",
|
163
|
+
"localized": false
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"name": "assets",
|
167
|
+
"id": "assets",
|
168
|
+
"uiid": "3aqrgdyesxs",
|
169
|
+
"type": "Array",
|
170
|
+
"items": {
|
171
|
+
"type": "Link",
|
172
|
+
"linkType": "Asset"
|
173
|
+
},
|
174
|
+
"localized": true
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"name": "entries",
|
178
|
+
"id": "entries",
|
179
|
+
"type": "Array",
|
180
|
+
"uiid": "3xi486kbchs",
|
181
|
+
"items": {
|
182
|
+
"type": "Link",
|
183
|
+
"linkType": "Entry"
|
184
|
+
}
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"name": "entry",
|
188
|
+
"id": "entry",
|
189
|
+
"type": "Link",
|
190
|
+
"uiid": "3uxjdd1n5ds",
|
191
|
+
"linkType": "Entry"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"name": "asset",
|
195
|
+
"id": "asset",
|
196
|
+
"type": "Link",
|
197
|
+
"uiid": "40ilp8h1xc0",
|
198
|
+
"linkType": "Asset"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"name": "bool",
|
202
|
+
"id": "bool",
|
203
|
+
"type": "Boolean",
|
204
|
+
"uiid": "2i1bgmn2dj4",
|
205
|
+
"localized": true
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"name": "symbols",
|
209
|
+
"id": "symbols",
|
210
|
+
"type": "Array",
|
211
|
+
"uiid": "38rbncxmzuo",
|
212
|
+
"items": {
|
213
|
+
"type": "Symbol"
|
214
|
+
}
|
215
|
+
},
|
216
|
+
{
|
217
|
+
"name": "birthday",
|
218
|
+
"id": "birthday",
|
219
|
+
"type": "Date",
|
220
|
+
"uiid": "41bdwbk06bk"
|
221
|
+
}
|
222
|
+
],
|
223
|
+
"name": "Author",
|
224
|
+
"sys": {
|
225
|
+
"id": "5DSpuKrl04eMAGQoQckeIq",
|
226
|
+
"type": "ContentType",
|
227
|
+
"createdAt": "2014-07-30T12:35:01.110Z",
|
228
|
+
"createdBy": {
|
229
|
+
"sys": {
|
230
|
+
"type": "Link",
|
231
|
+
"linkType": "User",
|
232
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
233
|
+
}
|
234
|
+
},
|
235
|
+
"space": {
|
236
|
+
"sys": {
|
237
|
+
"type": "Link",
|
238
|
+
"linkType": "Space",
|
239
|
+
"id": "yr5m0jky5hsh"
|
240
|
+
}
|
241
|
+
},
|
242
|
+
"firstPublishedAt": "2014-07-30T12:37:42.035Z",
|
243
|
+
"publishedCounter": 6,
|
244
|
+
"publishedAt": "2014-07-30T14:58:40.786Z",
|
245
|
+
"publishedBy": {
|
246
|
+
"sys": {
|
247
|
+
"type": "Link",
|
248
|
+
"linkType": "User",
|
249
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"publishedVersion": 177,
|
253
|
+
"version": 178,
|
254
|
+
"updatedAt": "2014-07-30T14:58:40.796Z",
|
255
|
+
"updatedBy": {
|
256
|
+
"sys": {
|
257
|
+
"type": "Link",
|
258
|
+
"linkType": "User",
|
259
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
260
|
+
}
|
261
|
+
}
|
262
|
+
},
|
263
|
+
"description": null,
|
264
|
+
"displayField": "name"
|
265
|
+
}
|
266
|
+
]
|
267
|
+
}
|
268
|
+
http_version:
|
269
|
+
recorded_at: Thu, 31 Jul 2014 07:13:27 GMT
|
270
|
+
- request:
|
271
|
+
method: get
|
272
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/locales
|
273
|
+
body:
|
274
|
+
encoding: US-ASCII
|
275
|
+
string: ''
|
276
|
+
headers:
|
277
|
+
User-Agent:
|
278
|
+
- RubyContenfulManagementGem/0.0.1
|
279
|
+
Authorization:
|
280
|
+
- Bearer <ACCESS_TOKEN>
|
281
|
+
Content-Type:
|
282
|
+
- application/vnd.contentful.management.v1+json
|
283
|
+
Content-Length:
|
284
|
+
- '0'
|
285
|
+
Host:
|
286
|
+
- api.contentful.com
|
287
|
+
response:
|
288
|
+
status:
|
289
|
+
code: 200
|
290
|
+
message: OK
|
291
|
+
headers:
|
292
|
+
Server:
|
293
|
+
- nginx
|
294
|
+
Date:
|
295
|
+
- Thu, 31 Jul 2014 07:13:28 GMT
|
296
|
+
Content-Type:
|
297
|
+
- application/vnd.contentful.management.v1+json
|
298
|
+
Content-Length:
|
299
|
+
- '4303'
|
300
|
+
Connection:
|
301
|
+
- keep-alive
|
302
|
+
Status:
|
303
|
+
- 200 OK
|
304
|
+
X-Contentful-Request-Id:
|
305
|
+
- 85f-1334431655
|
306
|
+
Etag:
|
307
|
+
- '"dd68efabd7b3896b66c9c97e45da0468"'
|
308
|
+
Accept-Ranges:
|
309
|
+
- bytes
|
310
|
+
Cache-Control:
|
311
|
+
- max-age=0
|
312
|
+
Access-Control-Allow-Origin:
|
313
|
+
- "*"
|
314
|
+
Access-Control-Allow-Headers:
|
315
|
+
- 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
|
316
|
+
Access-Control-Allow-Methods:
|
317
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
318
|
+
"^access-Control-Expose-Headers":
|
319
|
+
- Etag
|
320
|
+
Access-Control-Max-Age:
|
321
|
+
- '1728000'
|
322
|
+
body:
|
323
|
+
encoding: UTF-8
|
324
|
+
string: |
|
325
|
+
{
|
326
|
+
"sys":{
|
327
|
+
"type":"Array"
|
328
|
+
},
|
329
|
+
"items":[
|
330
|
+
{
|
331
|
+
"sys":{
|
332
|
+
"type":"Locale",
|
333
|
+
"id":"42irhRZ5uMrRc9SZ1PyDRk",
|
334
|
+
"version":0,
|
335
|
+
"space":{
|
336
|
+
"sys":{
|
337
|
+
"type":"Link",
|
338
|
+
"linkType":"Space",
|
339
|
+
"id":"yr5m0jky5hsh"
|
340
|
+
}
|
341
|
+
},
|
342
|
+
"createdBy":{
|
343
|
+
"sys":{
|
344
|
+
"type":"Link",
|
345
|
+
"linkType":"User",
|
346
|
+
"id":"0fn5fOWn4WsKFyYla1gI5h"
|
347
|
+
}
|
348
|
+
},
|
349
|
+
"createdAt":"2014-07-30T07:46:19Z",
|
350
|
+
"updatedBy":{
|
351
|
+
"sys":{
|
352
|
+
"type":"Link",
|
353
|
+
"linkType":"User",
|
354
|
+
"id":"0fn5fOWn4WsKFyYla1gI5h"
|
355
|
+
}
|
356
|
+
},
|
357
|
+
"updatedAt":"2014-07-30T07:46:19Z"
|
358
|
+
},
|
359
|
+
"name":"U.S. English",
|
360
|
+
"code":"en-US",
|
361
|
+
"default":true,
|
362
|
+
"contentManagementApi":true,
|
363
|
+
"publish":true,
|
364
|
+
"contentDeliveryApi":true
|
365
|
+
},
|
366
|
+
{
|
367
|
+
"sys":{
|
368
|
+
"type":"Locale",
|
369
|
+
"id":"3QwNQbA5IApftHq2TqWzbw",
|
370
|
+
"version":1,
|
371
|
+
"space":{
|
372
|
+
"sys":{
|
373
|
+
"type":"Link",
|
374
|
+
"linkType":"Space",
|
375
|
+
"id":"yr5m0jky5hsh"
|
376
|
+
}
|
377
|
+
},
|
378
|
+
"createdBy":{
|
379
|
+
"sys":{
|
380
|
+
"type":"Link",
|
381
|
+
"linkType":"User",
|
382
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
383
|
+
}
|
384
|
+
},
|
385
|
+
"createdAt":"2014-07-30T11:56:41Z",
|
386
|
+
"updatedBy":{
|
387
|
+
"sys":{
|
388
|
+
"type":"Link",
|
389
|
+
"linkType":"User",
|
390
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
391
|
+
}
|
392
|
+
},
|
393
|
+
"updatedAt":"2014-07-30T12:05:44Z"
|
394
|
+
},
|
395
|
+
"name":"Polish - PL",
|
396
|
+
"code":"pl-PL",
|
397
|
+
"default":false,
|
398
|
+
"contentManagementApi":true,
|
399
|
+
"publish":true,
|
400
|
+
"contentDeliveryApi":true
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"sys":{
|
404
|
+
"type":"Locale",
|
405
|
+
"id":"3V5DI3HspzHXRhUuNNW8x8",
|
406
|
+
"version":0,
|
407
|
+
"space":{
|
408
|
+
"sys":{
|
409
|
+
"type":"Link",
|
410
|
+
"linkType":"Space",
|
411
|
+
"id":"yr5m0jky5hsh"
|
412
|
+
}
|
413
|
+
},
|
414
|
+
"createdBy":{
|
415
|
+
"sys":{
|
416
|
+
"type":"Link",
|
417
|
+
"linkType":"User",
|
418
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
419
|
+
}
|
420
|
+
},
|
421
|
+
"createdAt":"2014-07-30T11:56:45Z",
|
422
|
+
"updatedBy":{
|
423
|
+
"sys":{
|
424
|
+
"type":"Link",
|
425
|
+
"linkType":"User",
|
426
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
427
|
+
}
|
428
|
+
},
|
429
|
+
"updatedAt":"2014-07-30T11:56:45Z"
|
430
|
+
},
|
431
|
+
"name":"Polish",
|
432
|
+
"code":"pl",
|
433
|
+
"default":false,
|
434
|
+
"contentManagementApi":true,
|
435
|
+
"publish":true,
|
436
|
+
"contentDeliveryApi":true
|
437
|
+
},
|
438
|
+
{
|
439
|
+
"sys":{
|
440
|
+
"type":"Locale",
|
441
|
+
"id":"7E40Gt0Du4KBPwfw7pPw2O",
|
442
|
+
"version":0,
|
443
|
+
"space":{
|
444
|
+
"sys":{
|
445
|
+
"type":"Link",
|
446
|
+
"linkType":"Space",
|
447
|
+
"id":"yr5m0jky5hsh"
|
448
|
+
}
|
449
|
+
},
|
450
|
+
"createdBy":{
|
451
|
+
"sys":{
|
452
|
+
"type":"Link",
|
453
|
+
"linkType":"User",
|
454
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
455
|
+
}
|
456
|
+
},
|
457
|
+
"createdAt":"2014-07-30T12:07:20Z",
|
458
|
+
"updatedBy":{
|
459
|
+
"sys":{
|
460
|
+
"type":"Link",
|
461
|
+
"linkType":"User",
|
462
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
463
|
+
}
|
464
|
+
},
|
465
|
+
"updatedAt":"2014-07-30T12:07:20Z"
|
466
|
+
},
|
467
|
+
"name":"Belgium",
|
468
|
+
"code":"bl-BL",
|
469
|
+
"default":false,
|
470
|
+
"contentManagementApi":true,
|
471
|
+
"publish":true,
|
472
|
+
"contentDeliveryApi":true
|
473
|
+
},
|
474
|
+
{
|
475
|
+
"sys":{
|
476
|
+
"type":"Locale",
|
477
|
+
"id":"6vn9hLab7q0D44XgRUwpoO",
|
478
|
+
"version":0,
|
479
|
+
"space":{
|
480
|
+
"sys":{
|
481
|
+
"type":"Link",
|
482
|
+
"linkType":"Space",
|
483
|
+
"id":"yr5m0jky5hsh"
|
484
|
+
}
|
485
|
+
},
|
486
|
+
"createdBy":{
|
487
|
+
"sys":{
|
488
|
+
"type":"Link",
|
489
|
+
"linkType":"User",
|
490
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
491
|
+
}
|
492
|
+
},
|
493
|
+
"createdAt":"2014-07-31T07:11:37Z",
|
494
|
+
"updatedBy":{
|
495
|
+
"sys":{
|
496
|
+
"type":"Link",
|
497
|
+
"linkType":"User",
|
498
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
499
|
+
}
|
500
|
+
},
|
501
|
+
"updatedAt":"2014-07-31T07:11:37Z"
|
502
|
+
},
|
503
|
+
"name":"ru-RU",
|
504
|
+
"code":"ru-RU",
|
505
|
+
"default":false,
|
506
|
+
"contentManagementApi":true,
|
507
|
+
"publish":true,
|
508
|
+
"contentDeliveryApi":true
|
509
|
+
}
|
510
|
+
],
|
511
|
+
"total":5,
|
512
|
+
"limit":25,
|
513
|
+
"skip":0}
|
514
|
+
http_version:
|
515
|
+
recorded_at: Thu, 31 Jul 2014 07:13:28 GMT
|
516
|
+
- request:
|
517
|
+
method: get
|
518
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/locales/6vn9hLab7q0D44XgRUwpoO
|
519
|
+
body:
|
520
|
+
encoding: US-ASCII
|
521
|
+
string: ''
|
522
|
+
headers:
|
523
|
+
User-Agent:
|
524
|
+
- RubyContenfulManagementGem/0.0.1
|
525
|
+
Authorization:
|
526
|
+
- Bearer <ACCESS_TOKEN>
|
527
|
+
Content-Type:
|
528
|
+
- application/vnd.contentful.management.v1+json
|
529
|
+
Content-Length:
|
530
|
+
- '0'
|
531
|
+
Host:
|
532
|
+
- api.contentful.com
|
533
|
+
response:
|
534
|
+
status:
|
535
|
+
code: 200
|
536
|
+
message: OK
|
537
|
+
headers:
|
538
|
+
Server:
|
539
|
+
- nginx
|
540
|
+
Date:
|
541
|
+
- Thu, 31 Jul 2014 07:13:28 GMT
|
542
|
+
Content-Type:
|
543
|
+
- application/vnd.contentful.management.v1+json
|
544
|
+
Content-Length:
|
545
|
+
- '694'
|
546
|
+
Connection:
|
547
|
+
- keep-alive
|
548
|
+
Status:
|
549
|
+
- 200 OK
|
550
|
+
X-Contentful-Request-Id:
|
551
|
+
- 85f-1334431656
|
552
|
+
Etag:
|
553
|
+
- '"434ab13967366d24f579a1b60db84d39"'
|
554
|
+
Accept-Ranges:
|
555
|
+
- bytes
|
556
|
+
Cache-Control:
|
557
|
+
- max-age=0
|
558
|
+
Access-Control-Allow-Origin:
|
559
|
+
- "*"
|
560
|
+
Access-Control-Allow-Headers:
|
561
|
+
- 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
|
562
|
+
Access-Control-Allow-Methods:
|
563
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
564
|
+
"^access-Control-Expose-Headers":
|
565
|
+
- Etag
|
566
|
+
Access-Control-Max-Age:
|
567
|
+
- '1728000'
|
568
|
+
body:
|
569
|
+
encoding: UTF-8
|
570
|
+
string: |
|
571
|
+
{
|
572
|
+
"sys":{
|
573
|
+
"type":"Locale",
|
574
|
+
"id":"6vn9hLab7q0D44XgRUwpoO",
|
575
|
+
"version":0,
|
576
|
+
"space":{
|
577
|
+
"sys":{
|
578
|
+
"type":"Link",
|
579
|
+
"linkType":"Space",
|
580
|
+
"id":"yr5m0jky5hsh"
|
581
|
+
}
|
582
|
+
},
|
583
|
+
"createdBy":{
|
584
|
+
"sys":{
|
585
|
+
"type":"Link",
|
586
|
+
"linkType":"User",
|
587
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
588
|
+
}
|
589
|
+
},
|
590
|
+
"createdAt":"2014-07-31T07:11:37Z",
|
591
|
+
"updatedBy":{
|
592
|
+
"sys":{
|
593
|
+
"type":"Link",
|
594
|
+
"linkType":"User",
|
595
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
596
|
+
}
|
597
|
+
},
|
598
|
+
"updatedAt":"2014-07-31T07:11:37Z"
|
599
|
+
},
|
600
|
+
"name":"ru-RU",
|
601
|
+
"code":"ru-RU",
|
602
|
+
"default":false,
|
603
|
+
"contentManagementApi":true,
|
604
|
+
"publish":true,
|
605
|
+
"contentDeliveryApi":true}
|
606
|
+
http_version:
|
607
|
+
recorded_at: Thu, 31 Jul 2014 07:13:29 GMT
|
608
|
+
- request:
|
609
|
+
method: put
|
610
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/locales/6vn9hLab7q0D44XgRUwpoO
|
611
|
+
body:
|
612
|
+
encoding: UTF-8
|
613
|
+
string: '{"name":"Russia"}'
|
614
|
+
headers:
|
615
|
+
User-Agent:
|
616
|
+
- RubyContenfulManagementGem/0.0.1
|
617
|
+
Authorization:
|
618
|
+
- Bearer <ACCESS_TOKEN>
|
619
|
+
Content-Type:
|
620
|
+
- application/vnd.contentful.management.v1+json
|
621
|
+
X-Contentful-Version:
|
622
|
+
- '0'
|
623
|
+
Host:
|
624
|
+
- api.contentful.com
|
625
|
+
response:
|
626
|
+
status:
|
627
|
+
code: 200
|
628
|
+
message: OK
|
629
|
+
headers:
|
630
|
+
Server:
|
631
|
+
- nginx
|
632
|
+
Date:
|
633
|
+
- Thu, 31 Jul 2014 07:13:30 GMT
|
634
|
+
Content-Type:
|
635
|
+
- application/vnd.contentful.management.v1+json
|
636
|
+
Content-Length:
|
637
|
+
- '695'
|
638
|
+
Connection:
|
639
|
+
- keep-alive
|
640
|
+
Status:
|
641
|
+
- 200 OK
|
642
|
+
X-Contentful-Request-Id:
|
643
|
+
- 85f-1334431658
|
644
|
+
Etag:
|
645
|
+
- '"f8e47ebfd22e2420109cbb74d41acc80"'
|
646
|
+
Accept-Ranges:
|
647
|
+
- bytes
|
648
|
+
Cache-Control:
|
649
|
+
- max-age=0
|
650
|
+
Access-Control-Allow-Origin:
|
651
|
+
- "*"
|
652
|
+
Access-Control-Allow-Headers:
|
653
|
+
- 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
|
654
|
+
Access-Control-Allow-Methods:
|
655
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
656
|
+
"^access-Control-Expose-Headers":
|
657
|
+
- Etag
|
658
|
+
Access-Control-Max-Age:
|
659
|
+
- '1728000'
|
660
|
+
body:
|
661
|
+
encoding: UTF-8
|
662
|
+
string: |
|
663
|
+
{
|
664
|
+
"sys":{
|
665
|
+
"type":"Locale",
|
666
|
+
"id":"6vn9hLab7q0D44XgRUwpoO",
|
667
|
+
"version":1,
|
668
|
+
"space":{
|
669
|
+
"sys":{
|
670
|
+
"type":"Link",
|
671
|
+
"linkType":"Space",
|
672
|
+
"id":"yr5m0jky5hsh"
|
673
|
+
}
|
674
|
+
},
|
675
|
+
"createdBy":{
|
676
|
+
"sys":{
|
677
|
+
"type":"Link",
|
678
|
+
"linkType":"User",
|
679
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
680
|
+
}
|
681
|
+
},
|
682
|
+
"createdAt":"2014-07-31T07:11:37Z",
|
683
|
+
"updatedBy":{
|
684
|
+
"sys":{
|
685
|
+
"type":"Link",
|
686
|
+
"linkType":"User",
|
687
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
688
|
+
}
|
689
|
+
},
|
690
|
+
"updatedAt":"2014-07-31T07:13:29Z"
|
691
|
+
},
|
692
|
+
"name":"Russia",
|
693
|
+
"code":"ru-RU",
|
694
|
+
"default":false,
|
695
|
+
"contentManagementApi":true,
|
696
|
+
"publish":true,
|
697
|
+
"contentDeliveryApi":true}
|
698
|
+
http_version:
|
699
|
+
recorded_at: Thu, 31 Jul 2014 07:13:30 GMT
|
700
|
+
recorded_with: VCR 2.9.2
|