contentful-importer 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +38 -0
- data/.rspec +3 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +87 -0
- data/LICENSE +22 -0
- data/README.md +327 -0
- data/Rakefile +7 -0
- data/bin/contentful-importer +85 -0
- data/contentful_importer.gemspec +38 -0
- data/example_settings/contentful_model.json +288 -0
- data/example_settings/contentful_structure.json +78 -0
- data/example_settings/files_meaning.txt +15 -0
- data/example_settings/settings.yml +16 -0
- data/lib/cli.rb +13 -0
- data/lib/configuration.rb +36 -0
- data/lib/converters/content_types_structure_creator.rb +60 -0
- data/lib/converters/contentful_model_to_json.rb +109 -0
- data/lib/importer/data_organizer.rb +117 -0
- data/lib/importer/mime_content_type.rb +564 -0
- data/lib/importer/parallel_importer.rb +429 -0
- data/lib/json_schema_validator.rb +64 -0
- data/lib/migrator.rb +39 -0
- data/lib/version.rb +3 -0
- data/spec/fixtures/import_files/assets/image/image_1.json +9 -0
- data/spec/fixtures/import_files/assets/image/image_2.json +9 -0
- data/spec/fixtures/import_files/assets/image/image_3.json +9 -0
- data/spec/fixtures/import_files/assets/image/image_4.json +9 -0
- data/spec/fixtures/import_files/collections/job_skills.json +13 -0
- data/spec/fixtures/import_files/collections/jobs.json +37 -0
- data/spec/fixtures/import_files/collections/profile.json +19 -0
- data/spec/fixtures/import_files/collections/user.json +36 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_1.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_10.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_2.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_3.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_4.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_5.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_6.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_7.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_8.json +7 -0
- data/spec/fixtures/import_files/entries/job_skills/job_skills_9.json +7 -0
- data/spec/fixtures/import_files/entries/jobs/jobs_1.json +56 -0
- data/spec/fixtures/import_files/entries/jobs/jobs_2.json +55 -0
- data/spec/fixtures/import_files/entries/jobs/jobs_4.json +49 -0
- data/spec/fixtures/import_files/entries/profile/profile_1.json +12 -0
- data/spec/fixtures/import_files/entries/profile/profile_2.json +12 -0
- data/spec/fixtures/import_files/entries/user/user_1.json +24 -0
- data/spec/fixtures/import_files/entries/user/user_2.json +20 -0
- data/spec/fixtures/import_files/logs/log_published_assets.csv +4 -0
- data/spec/fixtures/import_files/logs/log_published_entries.csv +23 -0
- data/spec/fixtures/import_files/logs/success_assets.csv +4 -0
- data/spec/fixtures/import_files/logs/success_published_assets.csv +0 -0
- data/spec/fixtures/import_files/logs/success_published_entries.csv +22 -0
- data/spec/fixtures/import_files/logs/success_thread_0.csv +12 -0
- data/spec/fixtures/import_files/logs/success_thread_1.csv +11 -0
- data/spec/fixtures/import_files/threads/0/1TVvxCqoRq0qUYAOQuOqys_2.json +20 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_1.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_10.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_2.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_3.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_4.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_5.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_6.json +7 -0
- data/spec/fixtures/import_files/threads/0/2soCP557HGKoOOK0SqmMOm_7.json +7 -0
- data/spec/fixtures/import_files/threads/0/6H6pGAV1PUsuoAW26Iu48W_1.json +9 -0
- data/spec/fixtures/import_files/threads/0/6H6pGAV1PUsuoAW26Iu48W_2.json +9 -0
- data/spec/fixtures/import_files/threads/0/6H6pGAV1PUsuoAW26Iu48W_3.json +9 -0
- data/spec/fixtures/import_files/threads/0/6H6pGAV1PUsuoAW26Iu48W_4.json +9 -0
- data/spec/fixtures/import_files/threads/0/6H6pGAV1PUsuoAW26Iu48W_5.json +9 -0
- data/spec/fixtures/import_files/threads/1/1TVvxCqoRq0qUYAOQuOqys_1.json +24 -0
- data/spec/fixtures/import_files/threads/1/1TVvxCqoRq0qUYAOQuOqys_2.json +20 -0
- data/spec/fixtures/import_files/threads/1/2soCP557HGKoOOK0SqmMOm_6.json +7 -0
- data/spec/fixtures/import_files/threads/1/2soCP557HGKoOOK0SqmMOm_7.json +7 -0
- data/spec/fixtures/import_files/threads/1/2soCP557HGKoOOK0SqmMOm_8.json +7 -0
- data/spec/fixtures/import_files/threads/1/2soCP557HGKoOOK0SqmMOm_9.json +7 -0
- data/spec/fixtures/import_files/threads/1/4L1bg4WQ5aWQMiE82ouag_1.json +56 -0
- data/spec/fixtures/import_files/threads/1/4L1bg4WQ5aWQMiE82ouag_2.json +55 -0
- data/spec/fixtures/import_files/threads/1/4L1bg4WQ5aWQMiE82ouag_4.json +49 -0
- data/spec/fixtures/import_files/threads/1/4WFZh4MwC4Mc0EQWAeOY8A_1.json +12 -0
- data/spec/fixtures/import_files/threads/1/4WFZh4MwC4Mc0EQWAeOY8A_2.json +12 -0
- data/spec/fixtures/import_files/threads/assets/0/image_1.json +9 -0
- data/spec/fixtures/import_files/threads/assets/0/image_2.json +9 -0
- data/spec/fixtures/import_files/threads/assets/0/image_3.json +9 -0
- data/spec/fixtures/import_files/threads/assets/0/image_4.json +9 -0
- data/spec/fixtures/settings/contentful_model.json +252 -0
- data/spec/fixtures/settings/contentful_structure.json +73 -0
- data/spec/fixtures/settings/contentful_structure_test.json +66 -0
- data/spec/fixtures/settings/settings.yml +12 -0
- data/spec/fixtures/vcr_cassettes/create_asset.yml +621 -0
- data/spec/fixtures/vcr_cassettes/create_entry.yml +122 -0
- data/spec/fixtures/vcr_cassettes/create_space.yml +87 -0
- data/spec/fixtures/vcr_cassettes/import_assets.yml +2822 -0
- data/spec/fixtures/vcr_cassettes/import_content_types.yml +1915 -0
- data/spec/fixtures/vcr_cassettes/import_entries.yml +5066 -0
- data/spec/fixtures/vcr_cassettes/import_entry.yml +363 -0
- data/spec/fixtures/vcr_cassettes/invalid_credentials.yml +69 -0
- data/spec/fixtures/vcr_cassettes/publish_an_entry.yml +214 -0
- data/spec/fixtures/vcr_cassettes/publish_asset.yml +895 -0
- data/spec/fixtures/vcr_cassettes/publish_entries.yml +5121 -0
- data/spec/fixtures/vcr_cassettes/valid_credentials.yml +7360 -0
- data/spec/lib/configuration_spec.rb +22 -0
- data/spec/lib/importer/parallel_importer_spec.rb +161 -0
- data/spec/lib/json_schema_validator_spec.rb +63 -0
- data/spec/lib/migrator_spec.rb +99 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/support/db_rows_json.rb +9 -0
- data/spec/support/shared_configuration.rb +22 -0
- data/spec/support/vcr.rb +16 -0
- metadata +436 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"User": {
|
|
3
|
+
"id": "1TVvxCqoRq0qUYAOQuOqys",
|
|
4
|
+
"name": "User",
|
|
5
|
+
"description": null,
|
|
6
|
+
"displayField": "first_name",
|
|
7
|
+
"fields": {
|
|
8
|
+
"first_name": "Text",
|
|
9
|
+
"last_name": "Text",
|
|
10
|
+
"birthday": "Date",
|
|
11
|
+
"Job adds": {
|
|
12
|
+
"id": "job_adds",
|
|
13
|
+
"type": "Array",
|
|
14
|
+
"link_type": "Entry",
|
|
15
|
+
"link": "Link"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"Jobs": {
|
|
20
|
+
"id": "4L1bg4WQ5aWQMiE82ouag",
|
|
21
|
+
"name": "Jobs",
|
|
22
|
+
"description": null,
|
|
23
|
+
"displayField": "title",
|
|
24
|
+
"fields": {
|
|
25
|
+
"title": "Text",
|
|
26
|
+
"description": "Text",
|
|
27
|
+
"Image": {
|
|
28
|
+
"id": "image",
|
|
29
|
+
"type": "Asset",
|
|
30
|
+
"link": "Link"
|
|
31
|
+
},
|
|
32
|
+
"Creator": {
|
|
33
|
+
"id": "creator",
|
|
34
|
+
"type": "Entry",
|
|
35
|
+
"link": "Link"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"Profile": {
|
|
40
|
+
"id": "4WFZh4MwC4Mc0EQWAeOY8A",
|
|
41
|
+
"name": "Profile",
|
|
42
|
+
"description": null,
|
|
43
|
+
"displayField": null,
|
|
44
|
+
"fields": {
|
|
45
|
+
"Nickname": {
|
|
46
|
+
"id": "nickname",
|
|
47
|
+
"type": "Entry",
|
|
48
|
+
"link": "Link"
|
|
49
|
+
},
|
|
50
|
+
"User": {
|
|
51
|
+
"id": "user",
|
|
52
|
+
"type": "Entry",
|
|
53
|
+
"link": "Link"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"Job Skills": {
|
|
58
|
+
"id": "2soCP557HGKoOOK0SqmMOm",
|
|
59
|
+
"name": "Job Skills",
|
|
60
|
+
"description": null,
|
|
61
|
+
"displayField": "name",
|
|
62
|
+
"fields": {
|
|
63
|
+
"name": "Text"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
data_dir: spec/fixtures/import_files
|
|
2
|
+
|
|
3
|
+
access_token: <ACCESS_TOKEN>
|
|
4
|
+
organization_id:
|
|
5
|
+
space_id: ip17s12q0ek4
|
|
6
|
+
default_locale:
|
|
7
|
+
|
|
8
|
+
mapping_dir: spec/fixtures/settings/mapping.json
|
|
9
|
+
contentful_structure_dir: spec/fixtures/settings/contentful_structure.json
|
|
10
|
+
|
|
11
|
+
content_model_json: spec/fixtures/settings/contentful_model.json
|
|
12
|
+
converted_model_dir: spec/fixtures/settings/contentful_structure_test.json
|
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://api.contentful.com/spaces/ip17s12q0ek4
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- RubyContentfulManagementGem/0.5.0
|
|
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
|
+
Accept-Ranges:
|
|
26
|
+
- bytes
|
|
27
|
+
Access-Control-Allow-Headers:
|
|
28
|
+
- 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,X-Contentful-Skip-Transformation
|
|
29
|
+
Access-Control-Allow-Methods:
|
|
30
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
|
31
|
+
Access-Control-Allow-Origin:
|
|
32
|
+
- "*"
|
|
33
|
+
Access-Control-Expose-Headers:
|
|
34
|
+
- Etag
|
|
35
|
+
Access-Control-Max-Age:
|
|
36
|
+
- '1728000'
|
|
37
|
+
Cache-Control:
|
|
38
|
+
- max-age=0
|
|
39
|
+
Content-Type:
|
|
40
|
+
- application/vnd.contentful.management.v1+json
|
|
41
|
+
Date:
|
|
42
|
+
- Mon, 05 Jan 2015 08:14:26 GMT
|
|
43
|
+
Etag:
|
|
44
|
+
- '"65cf3d93e9e6c0cb1669afc8e289f4b4"'
|
|
45
|
+
Server:
|
|
46
|
+
- nginx
|
|
47
|
+
Status:
|
|
48
|
+
- 200 OK
|
|
49
|
+
X-Contentful-Request-Id:
|
|
50
|
+
- f1c-662287618
|
|
51
|
+
Content-Length:
|
|
52
|
+
- '465'
|
|
53
|
+
Connection:
|
|
54
|
+
- keep-alive
|
|
55
|
+
body:
|
|
56
|
+
encoding: UTF-8
|
|
57
|
+
string: |+
|
|
58
|
+
{
|
|
59
|
+
"sys":{
|
|
60
|
+
"type":"Space",
|
|
61
|
+
"id":"ip17s12q0ek4",
|
|
62
|
+
"version":1,
|
|
63
|
+
"createdBy":{
|
|
64
|
+
"sys":{
|
|
65
|
+
"type":"Link",
|
|
66
|
+
"linkType":"User",
|
|
67
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"createdAt":"2014-12-16T12:41:15Z",
|
|
71
|
+
"updatedBy":{
|
|
72
|
+
"sys":{
|
|
73
|
+
"type":"Link",
|
|
74
|
+
"linkType":"User",
|
|
75
|
+
"id":"1E7acJL8I5XUXAMHQt9Grs"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"updatedAt":"2014-12-16T12:41:16Z"
|
|
79
|
+
},
|
|
80
|
+
"name":"Importer Example Space"
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
http_version:
|
|
84
|
+
recorded_at: Mon, 05 Jan 2015 08:14:26 GMT
|
|
85
|
+
- request:
|
|
86
|
+
method: get
|
|
87
|
+
uri: https://api.contentful.com/spaces/ip17s12q0ek4/content_types
|
|
88
|
+
body:
|
|
89
|
+
encoding: US-ASCII
|
|
90
|
+
string: ''
|
|
91
|
+
headers:
|
|
92
|
+
User-Agent:
|
|
93
|
+
- RubyContentfulManagementGem/0.5.0
|
|
94
|
+
Authorization:
|
|
95
|
+
- Bearer <ACCESS_TOKEN>
|
|
96
|
+
Content-Type:
|
|
97
|
+
- application/vnd.contentful.management.v1+json
|
|
98
|
+
Content-Length:
|
|
99
|
+
- '0'
|
|
100
|
+
Host:
|
|
101
|
+
- api.contentful.com
|
|
102
|
+
response:
|
|
103
|
+
status:
|
|
104
|
+
code: 200
|
|
105
|
+
message: OK
|
|
106
|
+
headers:
|
|
107
|
+
Access-Control-Allow-Headers:
|
|
108
|
+
- 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,X-Contentful-Skip-Transformation
|
|
109
|
+
Access-Control-Allow-Methods:
|
|
110
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
|
111
|
+
Access-Control-Allow-Origin:
|
|
112
|
+
- "*"
|
|
113
|
+
Access-Control-Expose-Headers:
|
|
114
|
+
- Etag
|
|
115
|
+
Access-Control-Max-Age:
|
|
116
|
+
- '1728000'
|
|
117
|
+
Cf-Space-Id:
|
|
118
|
+
- ip17s12q0ek4
|
|
119
|
+
Content-Type:
|
|
120
|
+
- application/vnd.contentful.management.v1+json
|
|
121
|
+
Date:
|
|
122
|
+
- Mon, 05 Jan 2015 08:14:26 GMT
|
|
123
|
+
Etag:
|
|
124
|
+
- '"d7fb761727969f9c52a402223e0bae78"'
|
|
125
|
+
Server:
|
|
126
|
+
- nginx
|
|
127
|
+
X-Powered-By:
|
|
128
|
+
- Express
|
|
129
|
+
Content-Length:
|
|
130
|
+
- '10394'
|
|
131
|
+
Connection:
|
|
132
|
+
- keep-alive
|
|
133
|
+
body:
|
|
134
|
+
encoding: UTF-8
|
|
135
|
+
string: |
|
|
136
|
+
{
|
|
137
|
+
"sys": {
|
|
138
|
+
"type": "Array"
|
|
139
|
+
},
|
|
140
|
+
"total": 5,
|
|
141
|
+
"skip": 0,
|
|
142
|
+
"limit": 100,
|
|
143
|
+
"items": [
|
|
144
|
+
{
|
|
145
|
+
"displayField": "first_name",
|
|
146
|
+
"name": "User",
|
|
147
|
+
"description": "",
|
|
148
|
+
"fields": [
|
|
149
|
+
{
|
|
150
|
+
"id": "first_name",
|
|
151
|
+
"name": "First_name",
|
|
152
|
+
"type": "Text",
|
|
153
|
+
"linkType": null,
|
|
154
|
+
"items": null,
|
|
155
|
+
"required": null,
|
|
156
|
+
"localized": null,
|
|
157
|
+
"validations": null
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "last_name",
|
|
161
|
+
"name": "Last_name",
|
|
162
|
+
"type": "Text",
|
|
163
|
+
"linkType": null,
|
|
164
|
+
"items": null,
|
|
165
|
+
"required": null,
|
|
166
|
+
"localized": null,
|
|
167
|
+
"validations": null
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"id": "birthday",
|
|
171
|
+
"name": "Birthday",
|
|
172
|
+
"type": "Date",
|
|
173
|
+
"linkType": null,
|
|
174
|
+
"items": null,
|
|
175
|
+
"required": null,
|
|
176
|
+
"localized": null,
|
|
177
|
+
"validations": null
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "job_adds",
|
|
181
|
+
"name": "Job_adds",
|
|
182
|
+
"type": "Array",
|
|
183
|
+
"linkType": null,
|
|
184
|
+
"items": {
|
|
185
|
+
"id": null,
|
|
186
|
+
"name": null,
|
|
187
|
+
"type": "Link",
|
|
188
|
+
"linkType": "Entry",
|
|
189
|
+
"items": null,
|
|
190
|
+
"required": null,
|
|
191
|
+
"localized": null,
|
|
192
|
+
"validations": null
|
|
193
|
+
},
|
|
194
|
+
"required": null,
|
|
195
|
+
"localized": null,
|
|
196
|
+
"validations": null
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "profile",
|
|
200
|
+
"name": "Profile",
|
|
201
|
+
"type": "Link",
|
|
202
|
+
"linkType": "Entry",
|
|
203
|
+
"items": null,
|
|
204
|
+
"required": null,
|
|
205
|
+
"localized": null,
|
|
206
|
+
"validations": null
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"sys": {
|
|
210
|
+
"id": "1TVvxCqoRq0qUYAOQuOqys",
|
|
211
|
+
"type": "ContentType",
|
|
212
|
+
"createdAt": "2014-12-19T14:14:50.986Z",
|
|
213
|
+
"createdBy": {
|
|
214
|
+
"sys": {
|
|
215
|
+
"type": "Link",
|
|
216
|
+
"linkType": "User",
|
|
217
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"space": {
|
|
221
|
+
"sys": {
|
|
222
|
+
"type": "Link",
|
|
223
|
+
"linkType": "Space",
|
|
224
|
+
"id": "ip17s12q0ek4"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"firstPublishedAt": "2014-12-19T14:14:52.885Z",
|
|
228
|
+
"publishedCounter": 1,
|
|
229
|
+
"publishedAt": "2014-12-19T14:14:52.885Z",
|
|
230
|
+
"publishedBy": {
|
|
231
|
+
"sys": {
|
|
232
|
+
"type": "Link",
|
|
233
|
+
"linkType": "User",
|
|
234
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"publishedVersion": 2,
|
|
238
|
+
"version": 3,
|
|
239
|
+
"updatedAt": "2014-12-19T14:14:52.907Z",
|
|
240
|
+
"updatedBy": {
|
|
241
|
+
"sys": {
|
|
242
|
+
"type": "Link",
|
|
243
|
+
"linkType": "User",
|
|
244
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"displayField": "subject",
|
|
251
|
+
"name": "Comment",
|
|
252
|
+
"description": "",
|
|
253
|
+
"fields": [
|
|
254
|
+
{
|
|
255
|
+
"id": "subject",
|
|
256
|
+
"name": "Subject",
|
|
257
|
+
"type": "Text",
|
|
258
|
+
"linkType": null,
|
|
259
|
+
"items": null,
|
|
260
|
+
"required": null,
|
|
261
|
+
"localized": null,
|
|
262
|
+
"validations": null
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "content",
|
|
266
|
+
"name": "Content",
|
|
267
|
+
"type": "Text",
|
|
268
|
+
"linkType": null,
|
|
269
|
+
"items": null,
|
|
270
|
+
"required": null,
|
|
271
|
+
"localized": null,
|
|
272
|
+
"validations": null
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"sys": {
|
|
276
|
+
"id": "6H6pGAV1PUsuoAW26Iu48W",
|
|
277
|
+
"type": "ContentType",
|
|
278
|
+
"createdAt": "2014-12-19T14:14:37.371Z",
|
|
279
|
+
"createdBy": {
|
|
280
|
+
"sys": {
|
|
281
|
+
"type": "Link",
|
|
282
|
+
"linkType": "User",
|
|
283
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"space": {
|
|
287
|
+
"sys": {
|
|
288
|
+
"type": "Link",
|
|
289
|
+
"linkType": "Space",
|
|
290
|
+
"id": "ip17s12q0ek4"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"firstPublishedAt": "2014-12-19T14:14:39.787Z",
|
|
294
|
+
"publishedCounter": 1,
|
|
295
|
+
"publishedAt": "2014-12-19T14:14:39.787Z",
|
|
296
|
+
"publishedBy": {
|
|
297
|
+
"sys": {
|
|
298
|
+
"type": "Link",
|
|
299
|
+
"linkType": "User",
|
|
300
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"publishedVersion": 2,
|
|
304
|
+
"version": 3,
|
|
305
|
+
"updatedAt": "2014-12-19T14:14:39.836Z",
|
|
306
|
+
"updatedBy": {
|
|
307
|
+
"sys": {
|
|
308
|
+
"type": "Link",
|
|
309
|
+
"linkType": "User",
|
|
310
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"displayField": "title",
|
|
317
|
+
"name": "Jobs",
|
|
318
|
+
"description": "",
|
|
319
|
+
"fields": [
|
|
320
|
+
{
|
|
321
|
+
"id": "title",
|
|
322
|
+
"name": "Title",
|
|
323
|
+
"type": "Text",
|
|
324
|
+
"linkType": null,
|
|
325
|
+
"items": null,
|
|
326
|
+
"required": null,
|
|
327
|
+
"localized": null,
|
|
328
|
+
"validations": null
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"id": "description",
|
|
332
|
+
"name": "Description",
|
|
333
|
+
"type": "Text",
|
|
334
|
+
"linkType": null,
|
|
335
|
+
"items": null,
|
|
336
|
+
"required": null,
|
|
337
|
+
"localized": null,
|
|
338
|
+
"validations": null
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "image",
|
|
342
|
+
"name": "Image",
|
|
343
|
+
"type": "Link",
|
|
344
|
+
"linkType": "Asset",
|
|
345
|
+
"items": null,
|
|
346
|
+
"required": null,
|
|
347
|
+
"localized": null,
|
|
348
|
+
"validations": null
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"id": "creator",
|
|
352
|
+
"name": "Creator",
|
|
353
|
+
"type": "Link",
|
|
354
|
+
"linkType": "Entry",
|
|
355
|
+
"items": null,
|
|
356
|
+
"required": null,
|
|
357
|
+
"localized": null,
|
|
358
|
+
"validations": null
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"id": "comments",
|
|
362
|
+
"name": "Comments",
|
|
363
|
+
"type": "Array",
|
|
364
|
+
"linkType": null,
|
|
365
|
+
"items": {
|
|
366
|
+
"id": null,
|
|
367
|
+
"name": null,
|
|
368
|
+
"type": "Link",
|
|
369
|
+
"linkType": "Entry",
|
|
370
|
+
"items": null,
|
|
371
|
+
"required": null,
|
|
372
|
+
"localized": null,
|
|
373
|
+
"validations": null
|
|
374
|
+
},
|
|
375
|
+
"required": null,
|
|
376
|
+
"localized": null,
|
|
377
|
+
"validations": null
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"id": "skills",
|
|
381
|
+
"name": "Skills",
|
|
382
|
+
"type": "Array",
|
|
383
|
+
"linkType": null,
|
|
384
|
+
"items": {
|
|
385
|
+
"id": null,
|
|
386
|
+
"name": null,
|
|
387
|
+
"type": "Link",
|
|
388
|
+
"linkType": "Entry",
|
|
389
|
+
"items": null,
|
|
390
|
+
"required": null,
|
|
391
|
+
"localized": null,
|
|
392
|
+
"validations": null
|
|
393
|
+
},
|
|
394
|
+
"required": null,
|
|
395
|
+
"localized": null,
|
|
396
|
+
"validations": null
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"sys": {
|
|
400
|
+
"id": "4L1bg4WQ5aWQMiE82ouag",
|
|
401
|
+
"type": "ContentType",
|
|
402
|
+
"createdAt": "2014-12-19T14:14:44.827Z",
|
|
403
|
+
"createdBy": {
|
|
404
|
+
"sys": {
|
|
405
|
+
"type": "Link",
|
|
406
|
+
"linkType": "User",
|
|
407
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"space": {
|
|
411
|
+
"sys": {
|
|
412
|
+
"type": "Link",
|
|
413
|
+
"linkType": "Space",
|
|
414
|
+
"id": "ip17s12q0ek4"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"firstPublishedAt": "2014-12-19T14:14:46.443Z",
|
|
418
|
+
"publishedCounter": 1,
|
|
419
|
+
"publishedAt": "2014-12-19T14:14:46.443Z",
|
|
420
|
+
"publishedBy": {
|
|
421
|
+
"sys": {
|
|
422
|
+
"type": "Link",
|
|
423
|
+
"linkType": "User",
|
|
424
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"publishedVersion": 2,
|
|
428
|
+
"version": 3,
|
|
429
|
+
"updatedAt": "2014-12-19T14:14:46.501Z",
|
|
430
|
+
"updatedBy": {
|
|
431
|
+
"sys": {
|
|
432
|
+
"type": "Link",
|
|
433
|
+
"linkType": "User",
|
|
434
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"name": "Profile",
|
|
441
|
+
"description": null,
|
|
442
|
+
"fields": [
|
|
443
|
+
{
|
|
444
|
+
"id": "nickname",
|
|
445
|
+
"name": "Nickname",
|
|
446
|
+
"type": "Text",
|
|
447
|
+
"linkType": null,
|
|
448
|
+
"required": null,
|
|
449
|
+
"items": null
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"id": "user",
|
|
453
|
+
"name": "User",
|
|
454
|
+
"type": "Link",
|
|
455
|
+
"linkType": "Entry",
|
|
456
|
+
"required": null,
|
|
457
|
+
"items": null
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"sys": {
|
|
461
|
+
"id": "4WFZh4MwC4Mc0EQWAeOY8A",
|
|
462
|
+
"type": "ContentType",
|
|
463
|
+
"createdAt": "2014-12-19T14:14:48.198Z",
|
|
464
|
+
"createdBy": {
|
|
465
|
+
"sys": {
|
|
466
|
+
"type": "Link",
|
|
467
|
+
"linkType": "User",
|
|
468
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"space": {
|
|
472
|
+
"sys": {
|
|
473
|
+
"type": "Link",
|
|
474
|
+
"linkType": "Space",
|
|
475
|
+
"id": "ip17s12q0ek4"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"firstPublishedAt": "2014-12-19T14:14:49.037Z",
|
|
479
|
+
"publishedCounter": 1,
|
|
480
|
+
"publishedAt": "2014-12-19T14:14:49.037Z",
|
|
481
|
+
"publishedBy": {
|
|
482
|
+
"sys": {
|
|
483
|
+
"type": "Link",
|
|
484
|
+
"linkType": "User",
|
|
485
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"publishedVersion": 1,
|
|
489
|
+
"version": 2,
|
|
490
|
+
"updatedAt": "2014-12-19T14:14:49.084Z",
|
|
491
|
+
"updatedBy": {
|
|
492
|
+
"sys": {
|
|
493
|
+
"type": "Link",
|
|
494
|
+
"linkType": "User",
|
|
495
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"displayField": "name",
|
|
502
|
+
"name": "Job Skills",
|
|
503
|
+
"description": "",
|
|
504
|
+
"fields": [
|
|
505
|
+
{
|
|
506
|
+
"id": "name",
|
|
507
|
+
"name": "Name",
|
|
508
|
+
"type": "Text",
|
|
509
|
+
"linkType": null,
|
|
510
|
+
"items": null,
|
|
511
|
+
"required": null,
|
|
512
|
+
"localized": null,
|
|
513
|
+
"validations": null
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"sys": {
|
|
517
|
+
"id": "2soCP557HGKoOOK0SqmMOm",
|
|
518
|
+
"type": "ContentType",
|
|
519
|
+
"createdAt": "2014-12-19T14:14:41.454Z",
|
|
520
|
+
"createdBy": {
|
|
521
|
+
"sys": {
|
|
522
|
+
"type": "Link",
|
|
523
|
+
"linkType": "User",
|
|
524
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"space": {
|
|
528
|
+
"sys": {
|
|
529
|
+
"type": "Link",
|
|
530
|
+
"linkType": "Space",
|
|
531
|
+
"id": "ip17s12q0ek4"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"firstPublishedAt": "2014-12-19T14:14:43.043Z",
|
|
535
|
+
"publishedCounter": 1,
|
|
536
|
+
"publishedAt": "2014-12-19T14:14:43.043Z",
|
|
537
|
+
"publishedBy": {
|
|
538
|
+
"sys": {
|
|
539
|
+
"type": "Link",
|
|
540
|
+
"linkType": "User",
|
|
541
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"publishedVersion": 2,
|
|
545
|
+
"version": 3,
|
|
546
|
+
"updatedAt": "2014-12-19T14:14:43.085Z",
|
|
547
|
+
"updatedBy": {
|
|
548
|
+
"sys": {
|
|
549
|
+
"type": "Link",
|
|
550
|
+
"linkType": "User",
|
|
551
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
]
|
|
557
|
+
}
|
|
558
|
+
http_version:
|
|
559
|
+
recorded_at: Mon, 05 Jan 2015 08:14:27 GMT
|
|
560
|
+
- request:
|
|
561
|
+
method: get
|
|
562
|
+
uri: https://api.contentful.com/spaces/ip17s12q0ek4/assets/asset_id
|
|
563
|
+
body:
|
|
564
|
+
encoding: US-ASCII
|
|
565
|
+
string: ''
|
|
566
|
+
headers:
|
|
567
|
+
User-Agent:
|
|
568
|
+
- RubyContentfulManagementGem/0.5.0
|
|
569
|
+
Authorization:
|
|
570
|
+
- Bearer <ACCESS_TOKEN>
|
|
571
|
+
Content-Type:
|
|
572
|
+
- application/vnd.contentful.management.v1+json
|
|
573
|
+
Content-Length:
|
|
574
|
+
- '0'
|
|
575
|
+
Host:
|
|
576
|
+
- api.contentful.com
|
|
577
|
+
response:
|
|
578
|
+
status:
|
|
579
|
+
code: 404
|
|
580
|
+
message: Not Found
|
|
581
|
+
headers:
|
|
582
|
+
Access-Control-Allow-Headers:
|
|
583
|
+
- 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,X-Contentful-Skip-Transformation
|
|
584
|
+
Access-Control-Allow-Methods:
|
|
585
|
+
- DELETE,GET,HEAD,POST,PUT,OPTIONS
|
|
586
|
+
Access-Control-Allow-Origin:
|
|
587
|
+
- "*"
|
|
588
|
+
Access-Control-Expose-Headers:
|
|
589
|
+
- Etag
|
|
590
|
+
Access-Control-Max-Age:
|
|
591
|
+
- '1728000'
|
|
592
|
+
Content-Type:
|
|
593
|
+
- application/vnd.contentful.management.v1+json
|
|
594
|
+
Date:
|
|
595
|
+
- Mon, 05 Jan 2015 08:14:27 GMT
|
|
596
|
+
Server:
|
|
597
|
+
- nginx
|
|
598
|
+
X-Powered-By:
|
|
599
|
+
- Express
|
|
600
|
+
Transfer-Encoding:
|
|
601
|
+
- chunked
|
|
602
|
+
Connection:
|
|
603
|
+
- keep-alive
|
|
604
|
+
body:
|
|
605
|
+
encoding: UTF-8
|
|
606
|
+
string: |
|
|
607
|
+
{
|
|
608
|
+
"sys": {
|
|
609
|
+
"type": "Error",
|
|
610
|
+
"id": "NotFound"
|
|
611
|
+
},
|
|
612
|
+
"message": "The resource could not be found.",
|
|
613
|
+
"details": {
|
|
614
|
+
"type": "Asset",
|
|
615
|
+
"space": "ip17s12q0ek4",
|
|
616
|
+
"id": "asset_id"
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
http_version:
|
|
620
|
+
recorded_at: Mon, 05 Jan 2015 08:14:27 GMT
|
|
621
|
+
recorded_with: VCR 2.9.3
|