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,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://example.com/?foo=bar
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Host:
|
11
|
+
- example.com
|
12
|
+
User-Agent:
|
13
|
+
- RubyHTTPGem/0.6.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 400
|
17
|
+
message: Bad Request
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- text/html
|
21
|
+
Content-Length:
|
22
|
+
- '349'
|
23
|
+
Connection:
|
24
|
+
- close
|
25
|
+
Date:
|
26
|
+
- Thu, 31 Jul 2014 10:40:24 GMT
|
27
|
+
Server:
|
28
|
+
- ECSF (ewr/1593)
|
29
|
+
body:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<!DOCTYPE html PUBLIC
|
32
|
+
\"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html
|
33
|
+
xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n\t<head>\n\t\t<title>400
|
34
|
+
- Bad Request</title>\n\t</head>\n\t<body>\n\t\t<h1>400 - Bad Request</h1>\n\t</body>\n</html>\n"
|
35
|
+
http_version:
|
36
|
+
recorded_at: Thu, 31 Jul 2014 10:40:24 GMT
|
37
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,321 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.contentful.com/spaces/n6spjc167pc2/locales
|
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
|
+
- Mon, 14 Jul 2014 07:44:57 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/vnd.contentful.management.v1+json
|
31
|
+
Content-Length:
|
32
|
+
- '6058'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
X-Contentful-Request-Id:
|
38
|
+
- 85f-1209864305
|
39
|
+
Etag:
|
40
|
+
- '"fb70d3baf5e2a213262514747fc48b4e"'
|
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":"Array"
|
61
|
+
},
|
62
|
+
"items":[
|
63
|
+
{
|
64
|
+
"sys":{
|
65
|
+
"type":"Locale",
|
66
|
+
"id":"5lxE2NYGbYiaerH8dx3WNE",
|
67
|
+
"version":0,
|
68
|
+
"space":{
|
69
|
+
"sys":{
|
70
|
+
"type":"Link",
|
71
|
+
"linkType":"Space",
|
72
|
+
"id":"n6spjc167pc2"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"createdBy":{
|
76
|
+
"sys":{
|
77
|
+
"type":"Link",
|
78
|
+
"linkType":"User",
|
79
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"createdAt":"2014-07-09T11:04:14Z",
|
83
|
+
"updatedBy":{
|
84
|
+
"sys":{
|
85
|
+
"type":"Link",
|
86
|
+
"linkType":"User",
|
87
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"updatedAt":"2014-07-09T11:04:14Z"
|
91
|
+
},
|
92
|
+
"name":"U.S. English",
|
93
|
+
"code":"en-US",
|
94
|
+
"default":true,
|
95
|
+
"contentManagementApi":true,
|
96
|
+
"publish":true,
|
97
|
+
"contentDeliveryApi":true
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"sys":{
|
101
|
+
"type":"Locale",
|
102
|
+
"id":"0X5xcjckv6RMrd9Trae81p",
|
103
|
+
"version":6,
|
104
|
+
"space":{
|
105
|
+
"sys":{
|
106
|
+
"type":"Link",
|
107
|
+
"linkType":"Space",
|
108
|
+
"id":"n6spjc167pc2"
|
109
|
+
}
|
110
|
+
},
|
111
|
+
"createdBy":{
|
112
|
+
"sys":{
|
113
|
+
"type":"Link",
|
114
|
+
"linkType":"User",
|
115
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
116
|
+
}
|
117
|
+
},
|
118
|
+
"createdAt":"2014-07-11T10:43:30Z",
|
119
|
+
"updatedBy":{
|
120
|
+
"sys":{
|
121
|
+
"type":"Link",
|
122
|
+
"linkType":"User",
|
123
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
124
|
+
}
|
125
|
+
},
|
126
|
+
"updatedAt":"2014-07-11T13:29:23Z"
|
127
|
+
},
|
128
|
+
"name":"testNewLocaleName",
|
129
|
+
"code":"pl",
|
130
|
+
"default":false,
|
131
|
+
"contentManagementApi":true,
|
132
|
+
"publish":true,
|
133
|
+
"contentDeliveryApi":true
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"sys":{
|
137
|
+
"type":"Locale",
|
138
|
+
"id":"4dW7BCZSEipTBMfPE7zPdY",
|
139
|
+
"version":0,
|
140
|
+
"space":{
|
141
|
+
"sys":{
|
142
|
+
"type":"Link",
|
143
|
+
"linkType":"Space",
|
144
|
+
"id":"n6spjc167pc2"
|
145
|
+
}
|
146
|
+
},
|
147
|
+
"createdBy":{
|
148
|
+
"sys":{
|
149
|
+
"type":"Link",
|
150
|
+
"linkType":"User",
|
151
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
152
|
+
}
|
153
|
+
},
|
154
|
+
"createdAt":"2014-07-11T13:52:37Z",
|
155
|
+
"updatedBy":{
|
156
|
+
"sys":{
|
157
|
+
"type":"Link",
|
158
|
+
"linkType":"User",
|
159
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
160
|
+
}
|
161
|
+
},
|
162
|
+
"updatedAt":"2014-07-11T13:52:37Z"
|
163
|
+
},
|
164
|
+
"name":"testlocalbycodequest",
|
165
|
+
"code":"br",
|
166
|
+
"default":false,
|
167
|
+
"contentManagementApi":true,
|
168
|
+
"publish":true,
|
169
|
+
"contentDeliveryApi":true
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"sys":{
|
173
|
+
"type":"Locale",
|
174
|
+
"id":"2r4I1IsjALE1DS9ckWXFCC",
|
175
|
+
"version":0,
|
176
|
+
"space":{
|
177
|
+
"sys":{
|
178
|
+
"type":"Link",
|
179
|
+
"linkType":"Space",
|
180
|
+
"id":"n6spjc167pc2"
|
181
|
+
}
|
182
|
+
},
|
183
|
+
"createdBy":{
|
184
|
+
"sys":{
|
185
|
+
"type":"Link",
|
186
|
+
"linkType":"User",
|
187
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
188
|
+
}
|
189
|
+
},
|
190
|
+
"createdAt":"2014-07-14T07:20:53Z",
|
191
|
+
"updatedBy":{
|
192
|
+
"sys":{
|
193
|
+
"type":"Link",
|
194
|
+
"linkType":"User",
|
195
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
196
|
+
}
|
197
|
+
},
|
198
|
+
"updatedAt":"2014-07-14T07:20:53Z"
|
199
|
+
},
|
200
|
+
"name":"testlocalbycodequestru",
|
201
|
+
"code":"ru",
|
202
|
+
"default":false,
|
203
|
+
"contentManagementApi":true,
|
204
|
+
"publish":true,
|
205
|
+
"contentDeliveryApi":true
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"sys":{
|
209
|
+
"type":"Locale",
|
210
|
+
"id":"3BVVXjOHC0PmkQkbv9dsKG",
|
211
|
+
"version":0,
|
212
|
+
"space":{
|
213
|
+
"sys":{
|
214
|
+
"type":"Link",
|
215
|
+
"linkType":"Space",
|
216
|
+
"id":"n6spjc167pc2"
|
217
|
+
}
|
218
|
+
},
|
219
|
+
"createdBy":{
|
220
|
+
"sys":{
|
221
|
+
"type":"Link",
|
222
|
+
"linkType":"User",
|
223
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
224
|
+
}
|
225
|
+
},
|
226
|
+
"createdAt":"2014-07-14T07:21:57Z",
|
227
|
+
"updatedBy":{
|
228
|
+
"sys":{
|
229
|
+
"type":"Link",
|
230
|
+
"linkType":"User",
|
231
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
232
|
+
}
|
233
|
+
},
|
234
|
+
"updatedAt":"2014-07-14T07:21:57Z"
|
235
|
+
},
|
236
|
+
"name":"testlocalbycodequestInvalid",
|
237
|
+
"code":"en-USx",
|
238
|
+
"default":false,
|
239
|
+
"contentManagementApi":true,
|
240
|
+
"publish":true,
|
241
|
+
"contentDeliveryApi":true
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"sys":{
|
245
|
+
"type":"Locale",
|
246
|
+
"id":"3dbOxaSsDLY0yI90Nj1k7Y",
|
247
|
+
"version":0,
|
248
|
+
"space":{
|
249
|
+
"sys":{
|
250
|
+
"type":"Link",
|
251
|
+
"linkType":"Space",
|
252
|
+
"id":"n6spjc167pc2"
|
253
|
+
}
|
254
|
+
},
|
255
|
+
"createdBy":{
|
256
|
+
"sys":{
|
257
|
+
"type":"Link",
|
258
|
+
"linkType":"User",
|
259
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
260
|
+
}
|
261
|
+
},
|
262
|
+
"createdAt":"2014-07-14T07:28:45Z",
|
263
|
+
"updatedBy":{
|
264
|
+
"sys":{
|
265
|
+
"type":"Link",
|
266
|
+
"linkType":"User",
|
267
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
268
|
+
}
|
269
|
+
},
|
270
|
+
"updatedAt":"2014-07-14T07:28:45Z"
|
271
|
+
},
|
272
|
+
"name":"testLocaleBelgium",
|
273
|
+
"code":"nl-BE",
|
274
|
+
"default":false,
|
275
|
+
"contentManagementApi":true,
|
276
|
+
"publish":true,
|
277
|
+
"contentDeliveryApi":true
|
278
|
+
},
|
279
|
+
{
|
280
|
+
"sys":{
|
281
|
+
"type":"Locale",
|
282
|
+
"id":"4IMeJdAb5B6VZSMmPsOkpo",
|
283
|
+
"version":0,
|
284
|
+
"space":{
|
285
|
+
"sys":{
|
286
|
+
"type":"Link",
|
287
|
+
"linkType":"Space",
|
288
|
+
"id":"n6spjc167pc2"
|
289
|
+
}
|
290
|
+
},
|
291
|
+
"createdBy":{
|
292
|
+
"sys":{
|
293
|
+
"type":"Link",
|
294
|
+
"linkType":"User",
|
295
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
296
|
+
}
|
297
|
+
},
|
298
|
+
"createdAt":"2014-07-14T07:30:08Z",
|
299
|
+
"updatedBy":{
|
300
|
+
"sys":{
|
301
|
+
"type":"Link",
|
302
|
+
"linkType":"User",
|
303
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
304
|
+
}
|
305
|
+
},
|
306
|
+
"updatedAt":"2014-07-14T07:30:08Z"
|
307
|
+
},
|
308
|
+
"name":"testLocaleBelgiumNl",
|
309
|
+
"code":"nl",
|
310
|
+
"default":false,
|
311
|
+
"contentManagementApi":true,
|
312
|
+
"publish":true,
|
313
|
+
"contentDeliveryApi":true
|
314
|
+
}
|
315
|
+
],
|
316
|
+
"total":7,
|
317
|
+
"limit":25,
|
318
|
+
"skip":0}
|
319
|
+
http_version:
|
320
|
+
recorded_at: Mon, 14 Jul 2014 07:44:57 GMT
|
321
|
+
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/n6spjc167pc2/locales
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"testLocalCreate","code":"bg"}'
|
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
|
+
Host:
|
17
|
+
- api.contentful.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 201
|
21
|
+
message: Created
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Mon, 14 Jul 2014 07:50:40 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.contentful.management.v1+json
|
29
|
+
Content-Length:
|
30
|
+
- '701'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 201 Created
|
35
|
+
X-Contentful-Request-Id:
|
36
|
+
- 85f-1209864457
|
37
|
+
Location:
|
38
|
+
- https://api.contentful.com/spaces/n6spjc167pc2/locales/3Gg9sXSSADt1aXzdDt4MD4
|
39
|
+
Etag:
|
40
|
+
- '"4449fa1febea2acf910f6b29e6ea1e4e"'
|
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":"Locale",
|
61
|
+
"id":"3Gg9sXSSADt1aXzdDt4MD4",
|
62
|
+
"version":0,
|
63
|
+
"space":{
|
64
|
+
"sys":{
|
65
|
+
"type":"Link",
|
66
|
+
"linkType":"Space",
|
67
|
+
"id":"n6spjc167pc2"
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"createdBy":{
|
71
|
+
"sys":{
|
72
|
+
"type":"Link",
|
73
|
+
"linkType":"User",
|
74
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"createdAt":"2014-07-14T07:50:39Z",
|
78
|
+
"updatedBy":{
|
79
|
+
"sys":{
|
80
|
+
"type":"Link",
|
81
|
+
"linkType":"User",
|
82
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"updatedAt":"2014-07-14T07:50:39Z"
|
86
|
+
},
|
87
|
+
"name":"testLocalCreate",
|
88
|
+
"code":"bg",
|
89
|
+
"default":false,
|
90
|
+
"contentManagementApi":true,
|
91
|
+
"publish":true,
|
92
|
+
"contentDeliveryApi":true}
|
93
|
+
http_version:
|
94
|
+
recorded_at: Mon, 14 Jul 2014 07:50:40 GMT
|
95
|
+
recorded_with: VCR 2.9.2
|