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,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/not_exist
|
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: 404
|
23
|
+
message: Not Found
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
Date:
|
28
|
+
- Thu, 31 Jul 2014 08:40:47 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Powered-By:
|
36
|
+
- Express
|
37
|
+
Access-Control-Allow-Origin:
|
38
|
+
- "*"
|
39
|
+
Access-Control-Allow-Headers:
|
40
|
+
- 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
|
41
|
+
Access-Control-Allow-Methods:
|
42
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
43
|
+
"^access-Control-Expose-Headers":
|
44
|
+
- Etag
|
45
|
+
Access-Control-Max-Age:
|
46
|
+
- '1728000'
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: |
|
50
|
+
{
|
51
|
+
"sys": {
|
52
|
+
"type": "Error",
|
53
|
+
"id": "NotFound"
|
54
|
+
},
|
55
|
+
"message": "The resource could not be found.",
|
56
|
+
"details": {
|
57
|
+
"type": "ContentType",
|
58
|
+
"space": "yr5m0jky5hsh",
|
59
|
+
"id": "not_exist"
|
60
|
+
}
|
61
|
+
}
|
62
|
+
http_version:
|
63
|
+
recorded_at: Thu, 31 Jul 2014 08:40:47 GMT
|
64
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,876 @@
|
|
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 10:19:48 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Content-Length:
|
32
|
+
- '451'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
X-Contentful-Request-Id:
|
38
|
+
- 85f-1334450534
|
39
|
+
Etag:
|
40
|
+
- '"d4c68b318e3d8e9caef04be009d6c4b7"'
|
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":10,
|
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:26:59Z"
|
79
|
+
},
|
80
|
+
"name":"BlogSpace"}
|
81
|
+
http_version:
|
82
|
+
recorded_at: Thu, 31 Jul 2014 10:19:48 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 10:19:49 GMT
|
109
|
+
Content-Type:
|
110
|
+
- application/vnd.contentful.management.v1+json
|
111
|
+
Content-Length:
|
112
|
+
- '7070'
|
113
|
+
Connection:
|
114
|
+
- keep-alive
|
115
|
+
X-Powered-By:
|
116
|
+
- Express
|
117
|
+
Cf-Space-Id:
|
118
|
+
- yr5m0jky5hsh
|
119
|
+
Etag:
|
120
|
+
- '"ca667d025b36549da696bb7910ebd36e"'
|
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": 4,
|
139
|
+
"skip": 0,
|
140
|
+
"limit": 100,
|
141
|
+
"items": [
|
142
|
+
{
|
143
|
+
"fields": [
|
144
|
+
{
|
145
|
+
"name": "post_title",
|
146
|
+
"id": "post_title",
|
147
|
+
"type": "Text",
|
148
|
+
"uiid": "3y811ua4gsg",
|
149
|
+
"localized": true
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"name": "post_body",
|
153
|
+
"id": "post_body",
|
154
|
+
"type": "Text",
|
155
|
+
"uiid": "2wcy8gvpn28",
|
156
|
+
"localized": true
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"name": "post_code",
|
160
|
+
"id": "post_code",
|
161
|
+
"type": "Symbol",
|
162
|
+
"uiid": "42ip6svqlts",
|
163
|
+
"localized": true
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"name": "post_created",
|
167
|
+
"id": "post_created",
|
168
|
+
"type": "Date",
|
169
|
+
"uiid": "3qb1v37yebk"
|
170
|
+
}
|
171
|
+
],
|
172
|
+
"name": "Post",
|
173
|
+
"sys": {
|
174
|
+
"id": "4EnwylPOikyMGUIy8uQgQY",
|
175
|
+
"type": "ContentType",
|
176
|
+
"createdAt": "2014-07-31T08:46:36.678Z",
|
177
|
+
"createdBy": {
|
178
|
+
"sys": {
|
179
|
+
"type": "Link",
|
180
|
+
"linkType": "User",
|
181
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
182
|
+
}
|
183
|
+
},
|
184
|
+
"space": {
|
185
|
+
"sys": {
|
186
|
+
"type": "Link",
|
187
|
+
"linkType": "Space",
|
188
|
+
"id": "yr5m0jky5hsh"
|
189
|
+
}
|
190
|
+
},
|
191
|
+
"firstPublishedAt": "2014-07-31T08:51:14.655Z",
|
192
|
+
"publishedCounter": 5,
|
193
|
+
"version": 214,
|
194
|
+
"updatedAt": "2014-07-31T09:01:09.129Z",
|
195
|
+
"updatedBy": {
|
196
|
+
"sys": {
|
197
|
+
"type": "Link",
|
198
|
+
"linkType": "User",
|
199
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
200
|
+
}
|
201
|
+
}
|
202
|
+
},
|
203
|
+
"description": "Content with Post fields",
|
204
|
+
"displayField": "postTitl"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"name": "NewName",
|
208
|
+
"description": "Author content",
|
209
|
+
"fields": [
|
210
|
+
{
|
211
|
+
"id": "name",
|
212
|
+
"name": "name",
|
213
|
+
"type": "Text",
|
214
|
+
"localized": true
|
215
|
+
},
|
216
|
+
{
|
217
|
+
"id": "age",
|
218
|
+
"name": "age",
|
219
|
+
"type": "Integer",
|
220
|
+
"localized": true
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"id": "city",
|
224
|
+
"name": "city",
|
225
|
+
"type": "Location"
|
226
|
+
},
|
227
|
+
{
|
228
|
+
"id": "assets",
|
229
|
+
"name": "assets",
|
230
|
+
"type": "Array",
|
231
|
+
"items": {
|
232
|
+
"type": "Link",
|
233
|
+
"linkType": "Asset"
|
234
|
+
},
|
235
|
+
"localized": true
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"id": "entries",
|
239
|
+
"name": "entries",
|
240
|
+
"type": "Array",
|
241
|
+
"items": {
|
242
|
+
"type": "Link",
|
243
|
+
"linkType": "Entry"
|
244
|
+
}
|
245
|
+
},
|
246
|
+
{
|
247
|
+
"id": "entry",
|
248
|
+
"name": "entry",
|
249
|
+
"type": "Link",
|
250
|
+
"linkType": "Entry"
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"id": "asset",
|
254
|
+
"name": "asset",
|
255
|
+
"type": "Link",
|
256
|
+
"linkType": "Asset"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"id": "bool",
|
260
|
+
"name": "bool",
|
261
|
+
"type": "Boolean",
|
262
|
+
"localized": true
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"id": "symbols",
|
266
|
+
"name": "symbols",
|
267
|
+
"type": "Array",
|
268
|
+
"items": {
|
269
|
+
"type": "Symbol"
|
270
|
+
}
|
271
|
+
},
|
272
|
+
{
|
273
|
+
"id": "birthday",
|
274
|
+
"name": "birthday",
|
275
|
+
"type": "Date"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"id": "blog_title",
|
279
|
+
"name": "Blog Title",
|
280
|
+
"type": "Text"
|
281
|
+
}
|
282
|
+
],
|
283
|
+
"sys": {
|
284
|
+
"id": "5DSpuKrl04eMAGQoQckeIq",
|
285
|
+
"type": "ContentType",
|
286
|
+
"createdAt": "2014-07-30T12:35:01.110Z",
|
287
|
+
"createdBy": {
|
288
|
+
"sys": {
|
289
|
+
"type": "Link",
|
290
|
+
"linkType": "User",
|
291
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
292
|
+
}
|
293
|
+
},
|
294
|
+
"space": {
|
295
|
+
"sys": {
|
296
|
+
"type": "Link",
|
297
|
+
"linkType": "Space",
|
298
|
+
"id": "yr5m0jky5hsh"
|
299
|
+
}
|
300
|
+
},
|
301
|
+
"firstPublishedAt": "2014-07-30T12:37:42.035Z",
|
302
|
+
"publishedCounter": 8,
|
303
|
+
"publishedAt": "2014-07-31T09:41:19.641Z",
|
304
|
+
"publishedBy": {
|
305
|
+
"sys": {
|
306
|
+
"type": "Link",
|
307
|
+
"linkType": "User",
|
308
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"publishedVersion": 193,
|
312
|
+
"version": 196,
|
313
|
+
"updatedAt": "2014-07-31T10:14:57.354Z",
|
314
|
+
"updatedBy": {
|
315
|
+
"sys": {
|
316
|
+
"type": "Link",
|
317
|
+
"linkType": "User",
|
318
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
},
|
323
|
+
{
|
324
|
+
"name": "Blog testing",
|
325
|
+
"description": "testing",
|
326
|
+
"fields": [
|
327
|
+
{
|
328
|
+
"id": "blogContent",
|
329
|
+
"name": "blog_content",
|
330
|
+
"type": "Text"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"id": "blog_title",
|
334
|
+
"name": "Blog Title",
|
335
|
+
"type": "Text"
|
336
|
+
}
|
337
|
+
],
|
338
|
+
"sys": {
|
339
|
+
"id": "2tDzYAg5MM6sIkwsOmM0Kc",
|
340
|
+
"type": "ContentType",
|
341
|
+
"createdAt": "2014-07-31T10:14:30.634Z",
|
342
|
+
"createdBy": {
|
343
|
+
"sys": {
|
344
|
+
"type": "Link",
|
345
|
+
"linkType": "User",
|
346
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
347
|
+
}
|
348
|
+
},
|
349
|
+
"space": {
|
350
|
+
"sys": {
|
351
|
+
"type": "Link",
|
352
|
+
"linkType": "Space",
|
353
|
+
"id": "yr5m0jky5hsh"
|
354
|
+
}
|
355
|
+
},
|
356
|
+
"firstPublishedAt": "2014-07-31T10:14:49.264Z",
|
357
|
+
"publishedCounter": 1,
|
358
|
+
"publishedAt": "2014-07-31T10:14:49.264Z",
|
359
|
+
"publishedBy": {
|
360
|
+
"sys": {
|
361
|
+
"type": "Link",
|
362
|
+
"linkType": "User",
|
363
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
364
|
+
}
|
365
|
+
},
|
366
|
+
"publishedVersion": 34,
|
367
|
+
"version": 36,
|
368
|
+
"updatedAt": "2014-07-31T10:15:50.560Z",
|
369
|
+
"updatedBy": {
|
370
|
+
"sys": {
|
371
|
+
"type": "Link",
|
372
|
+
"linkType": "User",
|
373
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
374
|
+
}
|
375
|
+
}
|
376
|
+
}
|
377
|
+
},
|
378
|
+
{
|
379
|
+
"name": "Blog Content",
|
380
|
+
"description": "Blogs content type",
|
381
|
+
"fields": [
|
382
|
+
{
|
383
|
+
"id": "blog_author",
|
384
|
+
"name": "blog_author",
|
385
|
+
"type": "Text",
|
386
|
+
"localized": true,
|
387
|
+
"uiid": "40u3yg9v7cw"
|
388
|
+
}
|
389
|
+
],
|
390
|
+
"sys": {
|
391
|
+
"id": "qw3F2rn3FeoOiceqAiCSC",
|
392
|
+
"type": "ContentType",
|
393
|
+
"createdAt": "2014-07-31T09:12:04.064Z",
|
394
|
+
"createdBy": {
|
395
|
+
"sys": {
|
396
|
+
"type": "Link",
|
397
|
+
"linkType": "User",
|
398
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
399
|
+
}
|
400
|
+
},
|
401
|
+
"space": {
|
402
|
+
"sys": {
|
403
|
+
"type": "Link",
|
404
|
+
"linkType": "Space",
|
405
|
+
"id": "yr5m0jky5hsh"
|
406
|
+
}
|
407
|
+
},
|
408
|
+
"firstPublishedAt": "2014-07-31T09:42:50.228Z",
|
409
|
+
"publishedCounter": 6,
|
410
|
+
"publishedAt": "2014-07-31T10:06:34.907Z",
|
411
|
+
"publishedBy": {
|
412
|
+
"sys": {
|
413
|
+
"type": "Link",
|
414
|
+
"linkType": "User",
|
415
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
416
|
+
}
|
417
|
+
},
|
418
|
+
"publishedVersion": 181,
|
419
|
+
"version": 184,
|
420
|
+
"updatedAt": "2014-07-31T10:15:12.026Z",
|
421
|
+
"updatedBy": {
|
422
|
+
"sys": {
|
423
|
+
"type": "Link",
|
424
|
+
"linkType": "User",
|
425
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
426
|
+
}
|
427
|
+
}
|
428
|
+
}
|
429
|
+
}
|
430
|
+
]
|
431
|
+
}
|
432
|
+
http_version:
|
433
|
+
recorded_at: Thu, 31 Jul 2014 10:19:49 GMT
|
434
|
+
- request:
|
435
|
+
method: get
|
436
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
|
437
|
+
body:
|
438
|
+
encoding: US-ASCII
|
439
|
+
string: ''
|
440
|
+
headers:
|
441
|
+
User-Agent:
|
442
|
+
- RubyContenfulManagementGem/0.0.1
|
443
|
+
Authorization:
|
444
|
+
- Bearer <ACCESS_TOKEN>
|
445
|
+
Content-Type:
|
446
|
+
- application/vnd.contentful.management.v1+json
|
447
|
+
Content-Length:
|
448
|
+
- '0'
|
449
|
+
Host:
|
450
|
+
- api.contentful.com
|
451
|
+
response:
|
452
|
+
status:
|
453
|
+
code: 200
|
454
|
+
message: OK
|
455
|
+
headers:
|
456
|
+
Server:
|
457
|
+
- nginx
|
458
|
+
Date:
|
459
|
+
- Thu, 31 Jul 2014 10:19:50 GMT
|
460
|
+
Content-Type:
|
461
|
+
- application/vnd.contentful.management.v1+json
|
462
|
+
Content-Length:
|
463
|
+
- '7070'
|
464
|
+
Connection:
|
465
|
+
- keep-alive
|
466
|
+
X-Powered-By:
|
467
|
+
- Express
|
468
|
+
Cf-Space-Id:
|
469
|
+
- yr5m0jky5hsh
|
470
|
+
Etag:
|
471
|
+
- '"ca667d025b36549da696bb7910ebd36e"'
|
472
|
+
Access-Control-Allow-Origin:
|
473
|
+
- "*"
|
474
|
+
Access-Control-Allow-Headers:
|
475
|
+
- 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
|
476
|
+
Access-Control-Allow-Methods:
|
477
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
478
|
+
"^access-Control-Expose-Headers":
|
479
|
+
- Etag
|
480
|
+
Access-Control-Max-Age:
|
481
|
+
- '1728000'
|
482
|
+
body:
|
483
|
+
encoding: UTF-8
|
484
|
+
string: |
|
485
|
+
{
|
486
|
+
"sys": {
|
487
|
+
"type": "Array"
|
488
|
+
},
|
489
|
+
"total": 4,
|
490
|
+
"skip": 0,
|
491
|
+
"limit": 100,
|
492
|
+
"items": [
|
493
|
+
{
|
494
|
+
"fields": [
|
495
|
+
{
|
496
|
+
"name": "post_title",
|
497
|
+
"id": "post_title",
|
498
|
+
"type": "Text",
|
499
|
+
"uiid": "3y811ua4gsg",
|
500
|
+
"localized": true
|
501
|
+
},
|
502
|
+
{
|
503
|
+
"name": "post_body",
|
504
|
+
"id": "post_body",
|
505
|
+
"type": "Text",
|
506
|
+
"uiid": "2wcy8gvpn28",
|
507
|
+
"localized": true
|
508
|
+
},
|
509
|
+
{
|
510
|
+
"name": "post_code",
|
511
|
+
"id": "post_code",
|
512
|
+
"type": "Symbol",
|
513
|
+
"uiid": "42ip6svqlts",
|
514
|
+
"localized": true
|
515
|
+
},
|
516
|
+
{
|
517
|
+
"name": "post_created",
|
518
|
+
"id": "post_created",
|
519
|
+
"type": "Date",
|
520
|
+
"uiid": "3qb1v37yebk"
|
521
|
+
}
|
522
|
+
],
|
523
|
+
"name": "Post",
|
524
|
+
"sys": {
|
525
|
+
"id": "4EnwylPOikyMGUIy8uQgQY",
|
526
|
+
"type": "ContentType",
|
527
|
+
"createdAt": "2014-07-31T08:46:36.678Z",
|
528
|
+
"createdBy": {
|
529
|
+
"sys": {
|
530
|
+
"type": "Link",
|
531
|
+
"linkType": "User",
|
532
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
533
|
+
}
|
534
|
+
},
|
535
|
+
"space": {
|
536
|
+
"sys": {
|
537
|
+
"type": "Link",
|
538
|
+
"linkType": "Space",
|
539
|
+
"id": "yr5m0jky5hsh"
|
540
|
+
}
|
541
|
+
},
|
542
|
+
"firstPublishedAt": "2014-07-31T08:51:14.655Z",
|
543
|
+
"publishedCounter": 5,
|
544
|
+
"version": 214,
|
545
|
+
"updatedAt": "2014-07-31T09:01:09.129Z",
|
546
|
+
"updatedBy": {
|
547
|
+
"sys": {
|
548
|
+
"type": "Link",
|
549
|
+
"linkType": "User",
|
550
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
551
|
+
}
|
552
|
+
}
|
553
|
+
},
|
554
|
+
"description": "Content with Post fields",
|
555
|
+
"displayField": "postTitl"
|
556
|
+
},
|
557
|
+
{
|
558
|
+
"name": "NewName",
|
559
|
+
"description": "Author content",
|
560
|
+
"fields": [
|
561
|
+
{
|
562
|
+
"id": "name",
|
563
|
+
"name": "name",
|
564
|
+
"type": "Text",
|
565
|
+
"localized": true
|
566
|
+
},
|
567
|
+
{
|
568
|
+
"id": "age",
|
569
|
+
"name": "age",
|
570
|
+
"type": "Integer",
|
571
|
+
"localized": true
|
572
|
+
},
|
573
|
+
{
|
574
|
+
"id": "city",
|
575
|
+
"name": "city",
|
576
|
+
"type": "Location"
|
577
|
+
},
|
578
|
+
{
|
579
|
+
"id": "assets",
|
580
|
+
"name": "assets",
|
581
|
+
"type": "Array",
|
582
|
+
"items": {
|
583
|
+
"type": "Link",
|
584
|
+
"linkType": "Asset"
|
585
|
+
},
|
586
|
+
"localized": true
|
587
|
+
},
|
588
|
+
{
|
589
|
+
"id": "entries",
|
590
|
+
"name": "entries",
|
591
|
+
"type": "Array",
|
592
|
+
"items": {
|
593
|
+
"type": "Link",
|
594
|
+
"linkType": "Entry"
|
595
|
+
}
|
596
|
+
},
|
597
|
+
{
|
598
|
+
"id": "entry",
|
599
|
+
"name": "entry",
|
600
|
+
"type": "Link",
|
601
|
+
"linkType": "Entry"
|
602
|
+
},
|
603
|
+
{
|
604
|
+
"id": "asset",
|
605
|
+
"name": "asset",
|
606
|
+
"type": "Link",
|
607
|
+
"linkType": "Asset"
|
608
|
+
},
|
609
|
+
{
|
610
|
+
"id": "bool",
|
611
|
+
"name": "bool",
|
612
|
+
"type": "Boolean",
|
613
|
+
"localized": true
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"id": "symbols",
|
617
|
+
"name": "symbols",
|
618
|
+
"type": "Array",
|
619
|
+
"items": {
|
620
|
+
"type": "Symbol"
|
621
|
+
}
|
622
|
+
},
|
623
|
+
{
|
624
|
+
"id": "birthday",
|
625
|
+
"name": "birthday",
|
626
|
+
"type": "Date"
|
627
|
+
},
|
628
|
+
{
|
629
|
+
"id": "blog_title",
|
630
|
+
"name": "Blog Title",
|
631
|
+
"type": "Text"
|
632
|
+
}
|
633
|
+
],
|
634
|
+
"sys": {
|
635
|
+
"id": "5DSpuKrl04eMAGQoQckeIq",
|
636
|
+
"type": "ContentType",
|
637
|
+
"createdAt": "2014-07-30T12:35:01.110Z",
|
638
|
+
"createdBy": {
|
639
|
+
"sys": {
|
640
|
+
"type": "Link",
|
641
|
+
"linkType": "User",
|
642
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
643
|
+
}
|
644
|
+
},
|
645
|
+
"space": {
|
646
|
+
"sys": {
|
647
|
+
"type": "Link",
|
648
|
+
"linkType": "Space",
|
649
|
+
"id": "yr5m0jky5hsh"
|
650
|
+
}
|
651
|
+
},
|
652
|
+
"firstPublishedAt": "2014-07-30T12:37:42.035Z",
|
653
|
+
"publishedCounter": 8,
|
654
|
+
"publishedAt": "2014-07-31T09:41:19.641Z",
|
655
|
+
"publishedBy": {
|
656
|
+
"sys": {
|
657
|
+
"type": "Link",
|
658
|
+
"linkType": "User",
|
659
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
660
|
+
}
|
661
|
+
},
|
662
|
+
"publishedVersion": 193,
|
663
|
+
"version": 196,
|
664
|
+
"updatedAt": "2014-07-31T10:14:57.354Z",
|
665
|
+
"updatedBy": {
|
666
|
+
"sys": {
|
667
|
+
"type": "Link",
|
668
|
+
"linkType": "User",
|
669
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
670
|
+
}
|
671
|
+
}
|
672
|
+
}
|
673
|
+
},
|
674
|
+
{
|
675
|
+
"name": "Blog testing",
|
676
|
+
"description": "testing",
|
677
|
+
"fields": [
|
678
|
+
{
|
679
|
+
"id": "blogContent",
|
680
|
+
"name": "blog_content",
|
681
|
+
"type": "Text"
|
682
|
+
},
|
683
|
+
{
|
684
|
+
"id": "blog_title",
|
685
|
+
"name": "Blog Title",
|
686
|
+
"type": "Text"
|
687
|
+
}
|
688
|
+
],
|
689
|
+
"sys": {
|
690
|
+
"id": "2tDzYAg5MM6sIkwsOmM0Kc",
|
691
|
+
"type": "ContentType",
|
692
|
+
"createdAt": "2014-07-31T10:14:30.634Z",
|
693
|
+
"createdBy": {
|
694
|
+
"sys": {
|
695
|
+
"type": "Link",
|
696
|
+
"linkType": "User",
|
697
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
698
|
+
}
|
699
|
+
},
|
700
|
+
"space": {
|
701
|
+
"sys": {
|
702
|
+
"type": "Link",
|
703
|
+
"linkType": "Space",
|
704
|
+
"id": "yr5m0jky5hsh"
|
705
|
+
}
|
706
|
+
},
|
707
|
+
"firstPublishedAt": "2014-07-31T10:14:49.264Z",
|
708
|
+
"publishedCounter": 1,
|
709
|
+
"publishedAt": "2014-07-31T10:14:49.264Z",
|
710
|
+
"publishedBy": {
|
711
|
+
"sys": {
|
712
|
+
"type": "Link",
|
713
|
+
"linkType": "User",
|
714
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
715
|
+
}
|
716
|
+
},
|
717
|
+
"publishedVersion": 34,
|
718
|
+
"version": 36,
|
719
|
+
"updatedAt": "2014-07-31T10:15:50.560Z",
|
720
|
+
"updatedBy": {
|
721
|
+
"sys": {
|
722
|
+
"type": "Link",
|
723
|
+
"linkType": "User",
|
724
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
725
|
+
}
|
726
|
+
}
|
727
|
+
}
|
728
|
+
},
|
729
|
+
{
|
730
|
+
"name": "Blog Content",
|
731
|
+
"description": "Blogs content type",
|
732
|
+
"fields": [
|
733
|
+
{
|
734
|
+
"id": "blog_author",
|
735
|
+
"name": "blog_author",
|
736
|
+
"type": "Text",
|
737
|
+
"localized": true,
|
738
|
+
"uiid": "40u3yg9v7cw"
|
739
|
+
}
|
740
|
+
],
|
741
|
+
"sys": {
|
742
|
+
"id": "qw3F2rn3FeoOiceqAiCSC",
|
743
|
+
"type": "ContentType",
|
744
|
+
"createdAt": "2014-07-31T09:12:04.064Z",
|
745
|
+
"createdBy": {
|
746
|
+
"sys": {
|
747
|
+
"type": "Link",
|
748
|
+
"linkType": "User",
|
749
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
750
|
+
}
|
751
|
+
},
|
752
|
+
"space": {
|
753
|
+
"sys": {
|
754
|
+
"type": "Link",
|
755
|
+
"linkType": "Space",
|
756
|
+
"id": "yr5m0jky5hsh"
|
757
|
+
}
|
758
|
+
},
|
759
|
+
"firstPublishedAt": "2014-07-31T09:42:50.228Z",
|
760
|
+
"publishedCounter": 6,
|
761
|
+
"publishedAt": "2014-07-31T10:06:34.907Z",
|
762
|
+
"publishedBy": {
|
763
|
+
"sys": {
|
764
|
+
"type": "Link",
|
765
|
+
"linkType": "User",
|
766
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
767
|
+
}
|
768
|
+
},
|
769
|
+
"publishedVersion": 181,
|
770
|
+
"version": 184,
|
771
|
+
"updatedAt": "2014-07-31T10:15:12.026Z",
|
772
|
+
"updatedBy": {
|
773
|
+
"sys": {
|
774
|
+
"type": "Link",
|
775
|
+
"linkType": "User",
|
776
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
777
|
+
}
|
778
|
+
}
|
779
|
+
}
|
780
|
+
}
|
781
|
+
]
|
782
|
+
}
|
783
|
+
http_version:
|
784
|
+
recorded_at: Thu, 31 Jul 2014 10:19:50 GMT
|
785
|
+
- request:
|
786
|
+
method: post
|
787
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
|
788
|
+
body:
|
789
|
+
encoding: UTF-8
|
790
|
+
string: '{"name":"Post title","description":"","fields":[{"id":"my_text_field","name":"My
|
791
|
+
Text Field","type":"Text"}]}'
|
792
|
+
headers:
|
793
|
+
User-Agent:
|
794
|
+
- RubyContenfulManagementGem/0.0.1
|
795
|
+
Authorization:
|
796
|
+
- Bearer <ACCESS_TOKEN>
|
797
|
+
Content-Type:
|
798
|
+
- application/vnd.contentful.management.v1+json
|
799
|
+
Host:
|
800
|
+
- api.contentful.com
|
801
|
+
response:
|
802
|
+
status:
|
803
|
+
code: 201
|
804
|
+
message: Created
|
805
|
+
headers:
|
806
|
+
Server:
|
807
|
+
- nginx
|
808
|
+
Date:
|
809
|
+
- Thu, 31 Jul 2014 10:19:51 GMT
|
810
|
+
Content-Type:
|
811
|
+
- application/vnd.contentful.management.v1+json
|
812
|
+
Content-Length:
|
813
|
+
- '753'
|
814
|
+
Connection:
|
815
|
+
- keep-alive
|
816
|
+
X-Powered-By:
|
817
|
+
- Express
|
818
|
+
Cf-Space-Id:
|
819
|
+
- yr5m0jky5hsh
|
820
|
+
Etag:
|
821
|
+
- '"bb85be8c40dc01d353619887aeac0bbd"'
|
822
|
+
Access-Control-Allow-Origin:
|
823
|
+
- "*"
|
824
|
+
Access-Control-Allow-Headers:
|
825
|
+
- 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
|
826
|
+
Access-Control-Allow-Methods:
|
827
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
828
|
+
"^access-Control-Expose-Headers":
|
829
|
+
- Etag
|
830
|
+
Access-Control-Max-Age:
|
831
|
+
- '1728000'
|
832
|
+
body:
|
833
|
+
encoding: UTF-8
|
834
|
+
string: |
|
835
|
+
{
|
836
|
+
"name": "Post title",
|
837
|
+
"description": "",
|
838
|
+
"fields": [
|
839
|
+
{
|
840
|
+
"id": "my_text_field",
|
841
|
+
"name": "My Text Field",
|
842
|
+
"type": "Text"
|
843
|
+
}
|
844
|
+
],
|
845
|
+
"sys": {
|
846
|
+
"id": "4lUg3uv8Lm220eIEWW6QE0",
|
847
|
+
"type": "ContentType",
|
848
|
+
"version": 1,
|
849
|
+
"createdAt": "2014-07-31T10:19:51.138Z",
|
850
|
+
"createdBy": {
|
851
|
+
"sys": {
|
852
|
+
"type": "Link",
|
853
|
+
"linkType": "User",
|
854
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
855
|
+
}
|
856
|
+
},
|
857
|
+
"space": {
|
858
|
+
"sys": {
|
859
|
+
"type": "Link",
|
860
|
+
"linkType": "Space",
|
861
|
+
"id": "yr5m0jky5hsh"
|
862
|
+
}
|
863
|
+
},
|
864
|
+
"updatedAt": "2014-07-31T10:19:51.138Z",
|
865
|
+
"updatedBy": {
|
866
|
+
"sys": {
|
867
|
+
"type": "Link",
|
868
|
+
"linkType": "User",
|
869
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
870
|
+
}
|
871
|
+
}
|
872
|
+
}
|
873
|
+
}
|
874
|
+
http_version:
|
875
|
+
recorded_at: Thu, 31 Jul 2014 10:19:51 GMT
|
876
|
+
recorded_with: VCR 2.9.2
|