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,94 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Boolean","description":"Content type with Boolean field","fields":[{"id":"my_Boolean_field","name":"My
|
9
|
+
Boolean Field","type":"Boolean"}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- RubyContenfulManagementGem/0.0.1
|
13
|
+
Authorization:
|
14
|
+
- Bearer <ACCESS_TOKEN>
|
15
|
+
Content-Type:
|
16
|
+
- application/vnd.contentful.management.v1+json
|
17
|
+
Host:
|
18
|
+
- api.contentful.com
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- nginx
|
26
|
+
Date:
|
27
|
+
- Thu, 31 Jul 2014 10:01:37 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/vnd.contentful.management.v1+json
|
30
|
+
Content-Length:
|
31
|
+
- '790'
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
X-Powered-By:
|
35
|
+
- Express
|
36
|
+
Cf-Space-Id:
|
37
|
+
- yr5m0jky5hsh
|
38
|
+
Etag:
|
39
|
+
- '"512466a97933759f470de3ea941c7ead"'
|
40
|
+
Access-Control-Allow-Origin:
|
41
|
+
- "*"
|
42
|
+
Access-Control-Allow-Headers:
|
43
|
+
- 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
|
44
|
+
Access-Control-Allow-Methods:
|
45
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
46
|
+
"^access-Control-Expose-Headers":
|
47
|
+
- Etag
|
48
|
+
Access-Control-Max-Age:
|
49
|
+
- '1728000'
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: |
|
53
|
+
{
|
54
|
+
"name": "Boolean",
|
55
|
+
"description": "Content type with Boolean field",
|
56
|
+
"fields": [
|
57
|
+
{
|
58
|
+
"id": "my_Boolean_field",
|
59
|
+
"name": "My Boolean Field",
|
60
|
+
"type": "Boolean"
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"sys": {
|
64
|
+
"id": "3gAFU3zWAwMSIeM4McECmy",
|
65
|
+
"type": "ContentType",
|
66
|
+
"version": 1,
|
67
|
+
"createdAt": "2014-07-31T10:01:37.895Z",
|
68
|
+
"createdBy": {
|
69
|
+
"sys": {
|
70
|
+
"type": "Link",
|
71
|
+
"linkType": "User",
|
72
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"space": {
|
76
|
+
"sys": {
|
77
|
+
"type": "Link",
|
78
|
+
"linkType": "Space",
|
79
|
+
"id": "yr5m0jky5hsh"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"updatedAt": "2014-07-31T10:01:37.895Z",
|
83
|
+
"updatedBy": {
|
84
|
+
"sys": {
|
85
|
+
"type": "Link",
|
86
|
+
"linkType": "User",
|
87
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
http_version:
|
93
|
+
recorded_at: Thu, 31 Jul 2014 10:01:38 GMT
|
94
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,94 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Date","description":"Content type with Date field","fields":[{"id":"my_Date_field","name":"My
|
9
|
+
Date Field","type":"Date"}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- RubyContenfulManagementGem/0.0.1
|
13
|
+
Authorization:
|
14
|
+
- Bearer <ACCESS_TOKEN>
|
15
|
+
Content-Type:
|
16
|
+
- application/vnd.contentful.management.v1+json
|
17
|
+
Host:
|
18
|
+
- api.contentful.com
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- nginx
|
26
|
+
Date:
|
27
|
+
- Thu, 31 Jul 2014 10:01:39 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/vnd.contentful.management.v1+json
|
30
|
+
Content-Length:
|
31
|
+
- '775'
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
X-Powered-By:
|
35
|
+
- Express
|
36
|
+
Cf-Space-Id:
|
37
|
+
- yr5m0jky5hsh
|
38
|
+
Etag:
|
39
|
+
- '"d5fea40eb7f0c5bb3f266a942b2ea62e"'
|
40
|
+
Access-Control-Allow-Origin:
|
41
|
+
- "*"
|
42
|
+
Access-Control-Allow-Headers:
|
43
|
+
- 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
|
44
|
+
Access-Control-Allow-Methods:
|
45
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
46
|
+
"^access-Control-Expose-Headers":
|
47
|
+
- Etag
|
48
|
+
Access-Control-Max-Age:
|
49
|
+
- '1728000'
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: |
|
53
|
+
{
|
54
|
+
"name": "Date",
|
55
|
+
"description": "Content type with Date field",
|
56
|
+
"fields": [
|
57
|
+
{
|
58
|
+
"id": "my_Date_field",
|
59
|
+
"name": "My Date Field",
|
60
|
+
"type": "Date"
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"sys": {
|
64
|
+
"id": "4WsHs7UsEg2WaKGkamS0QA",
|
65
|
+
"type": "ContentType",
|
66
|
+
"version": 1,
|
67
|
+
"createdAt": "2014-07-31T10:01:39.431Z",
|
68
|
+
"createdBy": {
|
69
|
+
"sys": {
|
70
|
+
"type": "Link",
|
71
|
+
"linkType": "User",
|
72
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"space": {
|
76
|
+
"sys": {
|
77
|
+
"type": "Link",
|
78
|
+
"linkType": "Space",
|
79
|
+
"id": "yr5m0jky5hsh"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"updatedAt": "2014-07-31T10:01:39.431Z",
|
83
|
+
"updatedBy": {
|
84
|
+
"sys": {
|
85
|
+
"type": "Link",
|
86
|
+
"linkType": "User",
|
87
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
http_version:
|
93
|
+
recorded_at: Thu, 31 Jul 2014 10:01:39 GMT
|
94
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,94 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Integer","description":"Content type with Integer field","fields":[{"id":"my_Integer_field","name":"My
|
9
|
+
Integer Field","type":"Integer"}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- RubyContenfulManagementGem/0.0.1
|
13
|
+
Authorization:
|
14
|
+
- Bearer <ACCESS_TOKEN>
|
15
|
+
Content-Type:
|
16
|
+
- application/vnd.contentful.management.v1+json
|
17
|
+
Host:
|
18
|
+
- api.contentful.com
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- nginx
|
26
|
+
Date:
|
27
|
+
- Thu, 31 Jul 2014 10:01:32 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/vnd.contentful.management.v1+json
|
30
|
+
Content-Length:
|
31
|
+
- '790'
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
X-Powered-By:
|
35
|
+
- Express
|
36
|
+
Cf-Space-Id:
|
37
|
+
- yr5m0jky5hsh
|
38
|
+
Etag:
|
39
|
+
- '"4117d2c19fbc6bd136c3a3b8ccb76c9e"'
|
40
|
+
Access-Control-Allow-Origin:
|
41
|
+
- "*"
|
42
|
+
Access-Control-Allow-Headers:
|
43
|
+
- 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
|
44
|
+
Access-Control-Allow-Methods:
|
45
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
46
|
+
"^access-Control-Expose-Headers":
|
47
|
+
- Etag
|
48
|
+
Access-Control-Max-Age:
|
49
|
+
- '1728000'
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: |
|
53
|
+
{
|
54
|
+
"name": "Integer",
|
55
|
+
"description": "Content type with Integer field",
|
56
|
+
"fields": [
|
57
|
+
{
|
58
|
+
"id": "my_Integer_field",
|
59
|
+
"name": "My Integer Field",
|
60
|
+
"type": "Integer"
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"sys": {
|
64
|
+
"id": "5ArjxW21ZSGYmuSOWmA4Ic",
|
65
|
+
"type": "ContentType",
|
66
|
+
"version": 1,
|
67
|
+
"createdAt": "2014-07-31T10:01:32.033Z",
|
68
|
+
"createdBy": {
|
69
|
+
"sys": {
|
70
|
+
"type": "Link",
|
71
|
+
"linkType": "User",
|
72
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"space": {
|
76
|
+
"sys": {
|
77
|
+
"type": "Link",
|
78
|
+
"linkType": "Space",
|
79
|
+
"id": "yr5m0jky5hsh"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"updatedAt": "2014-07-31T10:01:32.033Z",
|
83
|
+
"updatedBy": {
|
84
|
+
"sys": {
|
85
|
+
"type": "Link",
|
86
|
+
"linkType": "User",
|
87
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
http_version:
|
93
|
+
recorded_at: Thu, 31 Jul 2014 10:01:32 GMT
|
94
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Link","description":"Content type with Link field","fields":[{"id":"my_Link_field","name":"My
|
9
|
+
Link Field","type":"Link","linkType":"Entry"}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- RubyContenfulManagementGem/0.0.1
|
13
|
+
Authorization:
|
14
|
+
- Bearer <ACCESS_TOKEN>
|
15
|
+
Content-Type:
|
16
|
+
- application/vnd.contentful.management.v1+json
|
17
|
+
Host:
|
18
|
+
- api.contentful.com
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- nginx
|
26
|
+
Date:
|
27
|
+
- Thu, 31 Jul 2014 10:01:35 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/vnd.contentful.management.v1+json
|
30
|
+
Content-Length:
|
31
|
+
- '802'
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
X-Powered-By:
|
35
|
+
- Express
|
36
|
+
Cf-Space-Id:
|
37
|
+
- yr5m0jky5hsh
|
38
|
+
Etag:
|
39
|
+
- '"f16dc962fbf9327a61b4c3c120e0064c"'
|
40
|
+
Access-Control-Allow-Origin:
|
41
|
+
- "*"
|
42
|
+
Access-Control-Allow-Headers:
|
43
|
+
- 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
|
44
|
+
Access-Control-Allow-Methods:
|
45
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
46
|
+
"^access-Control-Expose-Headers":
|
47
|
+
- Etag
|
48
|
+
Access-Control-Max-Age:
|
49
|
+
- '1728000'
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: |
|
53
|
+
{
|
54
|
+
"name": "Link",
|
55
|
+
"description": "Content type with Link field",
|
56
|
+
"fields": [
|
57
|
+
{
|
58
|
+
"id": "my_Link_field",
|
59
|
+
"name": "My Link Field",
|
60
|
+
"type": "Link",
|
61
|
+
"linkType": "Entry"
|
62
|
+
}
|
63
|
+
],
|
64
|
+
"sys": {
|
65
|
+
"id": "1G0HRbi7x2QW28QkGUYqKA",
|
66
|
+
"type": "ContentType",
|
67
|
+
"version": 1,
|
68
|
+
"createdAt": "2014-07-31T10:01:35.356Z",
|
69
|
+
"createdBy": {
|
70
|
+
"sys": {
|
71
|
+
"type": "Link",
|
72
|
+
"linkType": "User",
|
73
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
74
|
+
}
|
75
|
+
},
|
76
|
+
"space": {
|
77
|
+
"sys": {
|
78
|
+
"type": "Link",
|
79
|
+
"linkType": "Space",
|
80
|
+
"id": "yr5m0jky5hsh"
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"updatedAt": "2014-07-31T10:01:35.356Z",
|
84
|
+
"updatedBy": {
|
85
|
+
"sys": {
|
86
|
+
"type": "Link",
|
87
|
+
"linkType": "User",
|
88
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 31 Jul 2014 10:01:35 GMT
|
95
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,94 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Location","description":"Content type with Location field","fields":[{"id":"my_Location_field","name":"My
|
9
|
+
Location Field","type":"Location"}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- RubyContenfulManagementGem/0.0.1
|
13
|
+
Authorization:
|
14
|
+
- Bearer <ACCESS_TOKEN>
|
15
|
+
Content-Type:
|
16
|
+
- application/vnd.contentful.management.v1+json
|
17
|
+
Host:
|
18
|
+
- api.contentful.com
|
19
|
+
response:
|
20
|
+
status:
|
21
|
+
code: 201
|
22
|
+
message: Created
|
23
|
+
headers:
|
24
|
+
Server:
|
25
|
+
- nginx
|
26
|
+
Date:
|
27
|
+
- Thu, 31 Jul 2014 10:01:38 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/vnd.contentful.management.v1+json
|
30
|
+
Content-Length:
|
31
|
+
- '795'
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
X-Powered-By:
|
35
|
+
- Express
|
36
|
+
Cf-Space-Id:
|
37
|
+
- yr5m0jky5hsh
|
38
|
+
Etag:
|
39
|
+
- '"91aefa1d89a738583ac61be1c97ec080"'
|
40
|
+
Access-Control-Allow-Origin:
|
41
|
+
- "*"
|
42
|
+
Access-Control-Allow-Headers:
|
43
|
+
- 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
|
44
|
+
Access-Control-Allow-Methods:
|
45
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
46
|
+
"^access-Control-Expose-Headers":
|
47
|
+
- Etag
|
48
|
+
Access-Control-Max-Age:
|
49
|
+
- '1728000'
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: |
|
53
|
+
{
|
54
|
+
"name": "Location",
|
55
|
+
"description": "Content type with Location field",
|
56
|
+
"fields": [
|
57
|
+
{
|
58
|
+
"id": "my_Location_field",
|
59
|
+
"name": "My Location Field",
|
60
|
+
"type": "Location"
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"sys": {
|
64
|
+
"id": "1G2aHroErSuIGiy8aCKAkG",
|
65
|
+
"type": "ContentType",
|
66
|
+
"version": 1,
|
67
|
+
"createdAt": "2014-07-31T10:01:38.662Z",
|
68
|
+
"createdBy": {
|
69
|
+
"sys": {
|
70
|
+
"type": "Link",
|
71
|
+
"linkType": "User",
|
72
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"space": {
|
76
|
+
"sys": {
|
77
|
+
"type": "Link",
|
78
|
+
"linkType": "Space",
|
79
|
+
"id": "yr5m0jky5hsh"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"updatedAt": "2014-07-31T10:01:38.662Z",
|
83
|
+
"updatedBy": {
|
84
|
+
"sys": {
|
85
|
+
"type": "Link",
|
86
|
+
"linkType": "User",
|
87
|
+
"id": "0fn5fOWn4WsKFyYla1gI5h"
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
http_version:
|
93
|
+
recorded_at: Thu, 31 Jul 2014 10:01:38 GMT
|
94
|
+
recorded_with: VCR 2.9.2
|