contentful-importer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/Rakefile
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'escort'
|
4
|
+
require_relative '../lib/cli'
|
5
|
+
|
6
|
+
fail ArgumentError, 'Set the path to the configuration file and define an action. More information can be found in the README.' if ARGF.argv.empty?
|
7
|
+
fail ArgumentError, "Missing '--config-file' argument. Usage: 'contentful-importer --config-file PATH_TO_CONFIGURATION_FILE --action'." unless ARGV.include?('--config-file')
|
8
|
+
|
9
|
+
Escort::App.create do |app|
|
10
|
+
app.summary 'Executable file of Generic-importer Gem'
|
11
|
+
|
12
|
+
app.options do |opts|
|
13
|
+
opts.opt :file, '--config-file', short: '-f', long: '--config-file', type: :string
|
14
|
+
|
15
|
+
app.command '--create-contentful-model-from-json' do |command|
|
16
|
+
command.summary 'Create content types json files, based on contentful_structure.json file.'
|
17
|
+
command.action do |options, arguments|
|
18
|
+
Command::CLI.new(options, arguments).execute
|
19
|
+
end
|
20
|
+
end
|
21
|
+
app.command '--convert-content-model-to-json' do |command|
|
22
|
+
command.summary 'Transform contentful model to contentful structure ready to import. View README'
|
23
|
+
command.action do |options, arguments|
|
24
|
+
Command::CLI.new(options, arguments).execute
|
25
|
+
end
|
26
|
+
end
|
27
|
+
app.command '--import-content-types' do |command|
|
28
|
+
command.summary 'Find an existing Space or create new one. Import content types to Contentful platform'
|
29
|
+
command.requires_arguments false
|
30
|
+
command.options do |opts|
|
31
|
+
opts.opt :space_id, 'space_id', short: '-s', long: '--space_id', type: :string
|
32
|
+
opts.opt :space_name, 'space_name', short: :none, long: '--space_name', type: :string
|
33
|
+
end
|
34
|
+
command.action do |options, arguments|
|
35
|
+
Command::CLI.new(options, arguments).execute
|
36
|
+
end
|
37
|
+
end
|
38
|
+
app.command '--import' do |command|
|
39
|
+
command.summary 'Import entries to Contentful platform'
|
40
|
+
command.options do |opts|
|
41
|
+
opts.opt :threads, 'threads', short: '-t', long: '--threads', type: :integer, default: 1
|
42
|
+
opts.validate(:threads, 'argument must be set to 1 or 2 exclusive. ') { |option| option > 0 && option <= 2 }
|
43
|
+
end
|
44
|
+
command.action do |options, arguments|
|
45
|
+
Command::CLI.new(options, arguments).execute
|
46
|
+
end
|
47
|
+
end
|
48
|
+
app.command '--test-credentials' do |command|
|
49
|
+
command.summary 'Check your Contentful-management credentials'
|
50
|
+
command.action do |options, arguments|
|
51
|
+
Command::CLI.new(options, arguments).execute
|
52
|
+
end
|
53
|
+
end
|
54
|
+
app.command '--import-assets' do |command|
|
55
|
+
command.summary 'Import only assets'
|
56
|
+
command.action do |options, arguments|
|
57
|
+
Command::CLI.new(options, arguments).execute
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
app.command '--publish-entries' do |command|
|
62
|
+
command.summary 'Publish all entries'
|
63
|
+
command.action do |options, arguments|
|
64
|
+
Command::CLI.new(options, arguments).execute
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
app.command '--publish-assets' do |command|
|
69
|
+
command.summary 'Publish all assets'
|
70
|
+
command.options do |opts|
|
71
|
+
opts.opt :threads, 'threads', short: '-t', long: '--threads', type: :integer, default: 1
|
72
|
+
opts.validate(:threads, 'argument must be set to 1 or 2 exclusive. ') { |option| option > 0 && option <= 2 }
|
73
|
+
end
|
74
|
+
command.action do |options, arguments|
|
75
|
+
Command::CLI.new(options, arguments).execute
|
76
|
+
end
|
77
|
+
end
|
78
|
+
app.command '--validate-schema' do |command|
|
79
|
+
command.summary 'Validate entries JSON schema'
|
80
|
+
command.action do |options, arguments|
|
81
|
+
Command::CLI.new(options, arguments).execute
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require File.expand_path('../lib/version', __FILE__)
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'contentful-importer'
|
9
|
+
spec.version = Version::VERSION
|
10
|
+
spec.authors = ['Contentful GmbH (Andreas Tiefenthaler)']
|
11
|
+
spec.email = ['rubygems@contentful.com']
|
12
|
+
spec.description = 'Generic importer for contentful.com'
|
13
|
+
spec.summary = 'Allows to import structured data to contentful.com'
|
14
|
+
spec.homepage = 'https://github.com/contentful/contentful-importer.rb'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables << 'contentful-importer'
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_dependency 'http', '~> 0.6'
|
23
|
+
spec.add_dependency 'multi_json', '~> 1'
|
24
|
+
spec.add_dependency 'contentful-management', '~> 0.5.0'
|
25
|
+
spec.add_dependency 'activesupport','~> 4.1'
|
26
|
+
spec.add_dependency 'escort','~> 0.4.0'
|
27
|
+
spec.add_dependency 'api_cache', ' ~> 0.3.0'
|
28
|
+
spec.add_dependency 'i18n', '~> 0.6'
|
29
|
+
spec.add_dependency 'json-schema', '~> 2.5.0'
|
30
|
+
|
31
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
32
|
+
spec.add_development_dependency 'rake'
|
33
|
+
|
34
|
+
spec.add_development_dependency 'rspec', '~> 3'
|
35
|
+
spec.add_development_dependency 'rspec-its', '~> 1.1.0'
|
36
|
+
spec.add_development_dependency 'vcr', '~> 2.9.3'
|
37
|
+
spec.add_development_dependency 'webmock', '>= 1.20'
|
38
|
+
end
|
@@ -0,0 +1,288 @@
|
|
1
|
+
{
|
2
|
+
"sys": {
|
3
|
+
"type": "Array"
|
4
|
+
},
|
5
|
+
"total": 4,
|
6
|
+
"skip": 0,
|
7
|
+
"limit": 100,
|
8
|
+
"items": [
|
9
|
+
{
|
10
|
+
"fields": [
|
11
|
+
{
|
12
|
+
"name": "posts",
|
13
|
+
"id": "posts",
|
14
|
+
"type": "Array",
|
15
|
+
"items": {
|
16
|
+
"type": "Link",
|
17
|
+
"linkType": "Entry"
|
18
|
+
}
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "title",
|
22
|
+
"id": "title",
|
23
|
+
"type": "Text",
|
24
|
+
"localized": true
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "categories",
|
28
|
+
"id": "categories",
|
29
|
+
"type": "Array",
|
30
|
+
"items": {
|
31
|
+
"type": "Link",
|
32
|
+
"linkType": "Entry"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "tags",
|
37
|
+
"id": "tags",
|
38
|
+
"type": "Array",
|
39
|
+
"items": {
|
40
|
+
"type": "Link",
|
41
|
+
"linkType": "Entry"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"name": "Blog",
|
46
|
+
"sys": {
|
47
|
+
"id": "3gldgGyAyci8ak0cykKeou",
|
48
|
+
"type": "ContentType",
|
49
|
+
"createdAt": "2014-11-26T13:49:24.203Z",
|
50
|
+
"createdBy": {
|
51
|
+
"sys": {
|
52
|
+
"type": "Link",
|
53
|
+
"linkType": "User",
|
54
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"space": {
|
58
|
+
"sys": {
|
59
|
+
"type": "Link",
|
60
|
+
"linkType": "Space",
|
61
|
+
"id": "1j2osuxmfs25"
|
62
|
+
}
|
63
|
+
},
|
64
|
+
"firstPublishedAt": "2014-11-26T13:49:45.142Z",
|
65
|
+
"publishedCounter": 4,
|
66
|
+
"publishedAt": "2014-12-01T09:59:19.695Z",
|
67
|
+
"publishedBy": {
|
68
|
+
"sys": {
|
69
|
+
"type": "Link",
|
70
|
+
"linkType": "User",
|
71
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"publishedVersion": 46,
|
75
|
+
"version": 47,
|
76
|
+
"updatedAt": "2014-12-01T09:59:19.743Z",
|
77
|
+
"updatedBy": {
|
78
|
+
"sys": {
|
79
|
+
"type": "Link",
|
80
|
+
"linkType": "User",
|
81
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"displayField": "title"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"fields": [
|
89
|
+
{
|
90
|
+
"name": "nicename",
|
91
|
+
"id": "nicename",
|
92
|
+
"type": "Text"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"name": "name",
|
96
|
+
"id": "name",
|
97
|
+
"type": "Text"
|
98
|
+
}
|
99
|
+
],
|
100
|
+
"name": "Tag",
|
101
|
+
"sys": {
|
102
|
+
"id": "wO1krKenNQcWMSqaeysWo",
|
103
|
+
"type": "ContentType",
|
104
|
+
"createdAt": "2014-12-01T09:25:56.175Z",
|
105
|
+
"createdBy": {
|
106
|
+
"sys": {
|
107
|
+
"type": "Link",
|
108
|
+
"linkType": "User",
|
109
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
110
|
+
}
|
111
|
+
},
|
112
|
+
"space": {
|
113
|
+
"sys": {
|
114
|
+
"type": "Link",
|
115
|
+
"linkType": "Space",
|
116
|
+
"id": "1j2osuxmfs25"
|
117
|
+
}
|
118
|
+
},
|
119
|
+
"firstPublishedAt": "2014-12-01T09:26:45.362Z",
|
120
|
+
"publishedCounter": 2,
|
121
|
+
"publishedAt": "2014-12-01T09:27:45.169Z",
|
122
|
+
"publishedBy": {
|
123
|
+
"sys": {
|
124
|
+
"type": "Link",
|
125
|
+
"linkType": "User",
|
126
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
127
|
+
}
|
128
|
+
},
|
129
|
+
"publishedVersion": 44,
|
130
|
+
"version": 45,
|
131
|
+
"updatedAt": "2014-12-01T09:27:45.216Z",
|
132
|
+
"updatedBy": {
|
133
|
+
"sys": {
|
134
|
+
"type": "Link",
|
135
|
+
"linkType": "User",
|
136
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
},
|
140
|
+
"description": null,
|
141
|
+
"displayField": "nicename"
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"fields": [
|
145
|
+
{
|
146
|
+
"name": "nicename",
|
147
|
+
"id": "nicename",
|
148
|
+
"type": "Text"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"name": "name",
|
152
|
+
"id": "name",
|
153
|
+
"type": "Text"
|
154
|
+
}
|
155
|
+
],
|
156
|
+
"name": "Category",
|
157
|
+
"sys": {
|
158
|
+
"id": "5PIooPqWmAcYyQ04c2KUcQ",
|
159
|
+
"type": "ContentType",
|
160
|
+
"createdAt": "2014-12-01T09:26:50.679Z",
|
161
|
+
"createdBy": {
|
162
|
+
"sys": {
|
163
|
+
"type": "Link",
|
164
|
+
"linkType": "User",
|
165
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"space": {
|
169
|
+
"sys": {
|
170
|
+
"type": "Link",
|
171
|
+
"linkType": "Space",
|
172
|
+
"id": "1j2osuxmfs25"
|
173
|
+
}
|
174
|
+
},
|
175
|
+
"firstPublishedAt": "2014-12-01T09:27:16.440Z",
|
176
|
+
"publishedCounter": 3,
|
177
|
+
"publishedAt": "2014-12-01T10:44:56.239Z",
|
178
|
+
"publishedBy": {
|
179
|
+
"sys": {
|
180
|
+
"type": "Link",
|
181
|
+
"linkType": "User",
|
182
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
183
|
+
}
|
184
|
+
},
|
185
|
+
"publishedVersion": 31,
|
186
|
+
"version": 32,
|
187
|
+
"updatedAt": "2014-12-01T10:44:56.283Z",
|
188
|
+
"updatedBy": {
|
189
|
+
"sys": {
|
190
|
+
"type": "Link",
|
191
|
+
"linkType": "User",
|
192
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
193
|
+
}
|
194
|
+
}
|
195
|
+
},
|
196
|
+
"displayField": "name"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"fields": [
|
200
|
+
{
|
201
|
+
"name": "title",
|
202
|
+
"id": "title",
|
203
|
+
"type": "Text"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"name": "content",
|
207
|
+
"id": "content",
|
208
|
+
"type": "Text"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"name": "tags",
|
212
|
+
"id": "tags",
|
213
|
+
"type": "Array",
|
214
|
+
"items": {
|
215
|
+
"type": "Link",
|
216
|
+
"linkType": "Entry"
|
217
|
+
}
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"name": "categories",
|
221
|
+
"id": "categories",
|
222
|
+
"type": "Array",
|
223
|
+
"items": {
|
224
|
+
"type": "Link",
|
225
|
+
"linkType": "Entry"
|
226
|
+
}
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"name": "wordpress_url",
|
230
|
+
"id": "wordpress_url",
|
231
|
+
"type": "Text"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"name": "attachment",
|
235
|
+
"id": "attachment",
|
236
|
+
"type": "Link",
|
237
|
+
"linkType": "Asset"
|
238
|
+
},
|
239
|
+
{
|
240
|
+
"name": "created_at",
|
241
|
+
"id": "created_at",
|
242
|
+
"type": "Date"
|
243
|
+
}
|
244
|
+
],
|
245
|
+
"name": "Post",
|
246
|
+
"sys": {
|
247
|
+
"id": "KHqITFZXeCIokyOEc4k0k",
|
248
|
+
"type": "ContentType",
|
249
|
+
"createdAt": "2014-11-26T13:15:08.574Z",
|
250
|
+
"createdBy": {
|
251
|
+
"sys": {
|
252
|
+
"type": "Link",
|
253
|
+
"linkType": "User",
|
254
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
255
|
+
}
|
256
|
+
},
|
257
|
+
"space": {
|
258
|
+
"sys": {
|
259
|
+
"type": "Link",
|
260
|
+
"linkType": "Space",
|
261
|
+
"id": "1j2osuxmfs25"
|
262
|
+
}
|
263
|
+
},
|
264
|
+
"firstPublishedAt": "2014-11-26T13:16:17.537Z",
|
265
|
+
"publishedCounter": 6,
|
266
|
+
"publishedAt": "2015-01-07T10:25:09.043Z",
|
267
|
+
"publishedBy": {
|
268
|
+
"sys": {
|
269
|
+
"type": "Link",
|
270
|
+
"linkType": "User",
|
271
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
272
|
+
}
|
273
|
+
},
|
274
|
+
"publishedVersion": 92,
|
275
|
+
"version": 93,
|
276
|
+
"updatedAt": "2015-01-07T10:25:09.102Z",
|
277
|
+
"updatedBy": {
|
278
|
+
"sys": {
|
279
|
+
"type": "Link",
|
280
|
+
"linkType": "User",
|
281
|
+
"id": "1E7acJL8I5XUXAMHQt9Grs"
|
282
|
+
}
|
283
|
+
}
|
284
|
+
},
|
285
|
+
"displayField": "title"
|
286
|
+
}
|
287
|
+
]
|
288
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
{
|
2
|
+
"Blog": {
|
3
|
+
"id": "3gldgGyAyci8ak0cykKeou",
|
4
|
+
"name": "Blog",
|
5
|
+
"description": null,
|
6
|
+
"displayField": "title",
|
7
|
+
"fields": {
|
8
|
+
"Posts": {
|
9
|
+
"id": "posts",
|
10
|
+
"type": "Array",
|
11
|
+
"link_type": "Entry",
|
12
|
+
"link": "Link"
|
13
|
+
},
|
14
|
+
"title": "Text",
|
15
|
+
"Categories": {
|
16
|
+
"id": "categories",
|
17
|
+
"type": "Array",
|
18
|
+
"link_type": "Entry",
|
19
|
+
"link": "Link"
|
20
|
+
},
|
21
|
+
"Tags": {
|
22
|
+
"id": "tags",
|
23
|
+
"type": "Array",
|
24
|
+
"link_type": "Entry",
|
25
|
+
"link": "Link"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"Tag": {
|
30
|
+
"id": "wO1krKenNQcWMSqaeysWo",
|
31
|
+
"name": "Tag",
|
32
|
+
"description": null,
|
33
|
+
"displayField": "nicename",
|
34
|
+
"fields": {
|
35
|
+
"nicename": "Text",
|
36
|
+
"name": "Text"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"Category": {
|
40
|
+
"id": "5PIooPqWmAcYyQ04c2KUcQ",
|
41
|
+
"name": "Category",
|
42
|
+
"description": null,
|
43
|
+
"displayField": "name",
|
44
|
+
"fields": {
|
45
|
+
"nicename": "Text",
|
46
|
+
"name": "Text"
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"Post": {
|
50
|
+
"id": "KHqITFZXeCIokyOEc4k0k",
|
51
|
+
"name": "Post",
|
52
|
+
"description": null,
|
53
|
+
"displayField": "title",
|
54
|
+
"fields": {
|
55
|
+
"title": "Text",
|
56
|
+
"content": "Text",
|
57
|
+
"Tags": {
|
58
|
+
"id": "tags",
|
59
|
+
"type": "Array",
|
60
|
+
"link_type": "Entry",
|
61
|
+
"link": "Link"
|
62
|
+
},
|
63
|
+
"Categories": {
|
64
|
+
"id": "categories",
|
65
|
+
"type": "Array",
|
66
|
+
"link_type": "Entry",
|
67
|
+
"link": "Link"
|
68
|
+
},
|
69
|
+
"wordpress_url": "Text",
|
70
|
+
"Attachment": {
|
71
|
+
"id": "attachment",
|
72
|
+
"type": "Asset",
|
73
|
+
"link": "Link"
|
74
|
+
},
|
75
|
+
"created_at": "Date"
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|