jekyll-contentful-data-import 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +18 -0
- data/.yardopts +3 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +43 -0
- data/Gemfile +6 -0
- data/Guardfile +5 -0
- data/LICENSE.md +20 -0
- data/README.md +94 -0
- data/Rakefile +16 -0
- data/jekyll-contentful.gemspec +36 -0
- data/lib/jekyll-contentful-data-import.rb +5 -0
- data/lib/jekyll-contentful-data-import/data_exporter.rb +47 -0
- data/lib/jekyll-contentful-data-import/importer.rb +45 -0
- data/lib/jekyll-contentful-data-import/mappers.rb +1 -0
- data/lib/jekyll-contentful-data-import/mappers/base.rb +87 -0
- data/lib/jekyll-contentful-data-import/serializer.rb +25 -0
- data/lib/jekyll-contentful-data-import/version.rb +5 -0
- data/lib/jekyll/commands/contentful.rb +42 -0
- data/spec/fixtures/vcr_fixtures/entries.yml +914 -0
- data/spec/jekyll-contentful/data_exporter_spec.rb +44 -0
- data/spec/jekyll-contentful/importer_spec.rb +66 -0
- data/spec/jekyll-contentful/mappers/base_spec.rb +109 -0
- data/spec/jekyll-contentful/serializer_spec.rb +58 -0
- data/spec/jekyll/commands/contentful_spec.rb +26 -0
- data/spec/spec_helper.rb +48 -0
- metadata +238 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'jekyll-contentful-data-import/mappers'
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
module Contentful
|
6
|
+
class Serializer
|
7
|
+
attr_reader :entries, :config
|
8
|
+
|
9
|
+
def initialize(entries, config = {})
|
10
|
+
@entries = entries
|
11
|
+
@config = config
|
12
|
+
end
|
13
|
+
|
14
|
+
def serialize
|
15
|
+
entries.map do |entry|
|
16
|
+
::Jekyll::Contentful::Mappers::Base.mapper_for(entry, config).map
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_yaml
|
21
|
+
YAML.dump(serialize)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'jekyll-contentful-data-import/importer'
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Commands
|
5
|
+
class Contentful < Command
|
6
|
+
def self.init_with_program(prog)
|
7
|
+
prog.command(:contentful) do |c|
|
8
|
+
c.syntax 'contentful [OPTIONS]'
|
9
|
+
c.description 'Imports data from Contentful'
|
10
|
+
|
11
|
+
options.each {|opt| c.option *opt }
|
12
|
+
|
13
|
+
c.action do |args, options|
|
14
|
+
contentful_config = Jekyll.configuration['contentful']
|
15
|
+
process args, options, contentful_config
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.options
|
21
|
+
[
|
22
|
+
['rebuild', '-r', '--rebuild', 'Rebuild Jekyll Site after fetching data'],
|
23
|
+
]
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
def self.process(args = [], options = {}, contentful_config = {})
|
28
|
+
Jekyll.logger.info 'Starting Contentful import'
|
29
|
+
|
30
|
+
Jekyll::Contentful::Importer.new(contentful_config).run
|
31
|
+
|
32
|
+
Jekyll.logger.info 'Contentful import finished'
|
33
|
+
|
34
|
+
if options['rebuild']
|
35
|
+
Jekyll.logger.info 'Starting Jekyll Rebuild'
|
36
|
+
|
37
|
+
Jekyll::Commands::Build.process(options)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,914 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/0.7.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer b4c0n73n7fu1
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Connection:
|
17
|
+
- close
|
18
|
+
Host:
|
19
|
+
- cdn.contentful.com
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Access-Control-Allow-Headers:
|
26
|
+
- 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
|
27
|
+
Access-Control-Allow-Methods:
|
28
|
+
- GET,HEAD,OPTIONS
|
29
|
+
Access-Control-Allow-Origin:
|
30
|
+
- "*"
|
31
|
+
Access-Control-Expose-Headers:
|
32
|
+
- Etag
|
33
|
+
Access-Control-Max-Age:
|
34
|
+
- '86400'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0
|
37
|
+
Content-Type:
|
38
|
+
- application/vnd.contentful.delivery.v1+json
|
39
|
+
Etag:
|
40
|
+
- '"a74bc0b64b4ed0d8864f88c464ca92ec"'
|
41
|
+
Server:
|
42
|
+
- nginx
|
43
|
+
X-Contentful-Request-Id:
|
44
|
+
- c40-589309641
|
45
|
+
Content-Length:
|
46
|
+
- '5619'
|
47
|
+
Accept-Ranges:
|
48
|
+
- bytes
|
49
|
+
Date:
|
50
|
+
- Wed, 02 Dec 2015 18:20:27 GMT
|
51
|
+
Via:
|
52
|
+
- 1.1 varnish
|
53
|
+
Age:
|
54
|
+
- '0'
|
55
|
+
Connection:
|
56
|
+
- close
|
57
|
+
X-Served-By:
|
58
|
+
- cache-jfk1031-JFK
|
59
|
+
X-Cache:
|
60
|
+
- MISS
|
61
|
+
X-Cache-Hits:
|
62
|
+
- '0'
|
63
|
+
Vary:
|
64
|
+
- Accept-Encoding
|
65
|
+
body:
|
66
|
+
encoding: UTF-8
|
67
|
+
string: |
|
68
|
+
{
|
69
|
+
"sys": {
|
70
|
+
"type": "Array"
|
71
|
+
},
|
72
|
+
"total": 5,
|
73
|
+
"skip": 0,
|
74
|
+
"limit": 1000,
|
75
|
+
"items": [
|
76
|
+
{
|
77
|
+
"fields": [
|
78
|
+
{
|
79
|
+
"name": "Name",
|
80
|
+
"id": "name",
|
81
|
+
"type": "Text",
|
82
|
+
"required": true
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"name": "Center",
|
86
|
+
"id": "center",
|
87
|
+
"type": "Location",
|
88
|
+
"required": true
|
89
|
+
}
|
90
|
+
],
|
91
|
+
"name": "City",
|
92
|
+
"sys": {
|
93
|
+
"space": {
|
94
|
+
"sys": {
|
95
|
+
"type": "Link",
|
96
|
+
"linkType": "Space",
|
97
|
+
"id": "cfexampleapi"
|
98
|
+
}
|
99
|
+
},
|
100
|
+
"type": "ContentType",
|
101
|
+
"id": "1t9IbcfdCk6m04uISSsaIK",
|
102
|
+
"revision": 1,
|
103
|
+
"createdAt": "2014-02-21T13:42:33.009Z",
|
104
|
+
"updatedAt": "2014-02-21T13:42:33.009Z"
|
105
|
+
},
|
106
|
+
"displayField": "name"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"fields": [
|
110
|
+
{
|
111
|
+
"id": "name",
|
112
|
+
"name": "Name",
|
113
|
+
"type": "Text",
|
114
|
+
"required": true,
|
115
|
+
"localized": false
|
116
|
+
}
|
117
|
+
],
|
118
|
+
"name": "Cat",
|
119
|
+
"sys": {
|
120
|
+
"space": {
|
121
|
+
"sys": {
|
122
|
+
"type": "Link",
|
123
|
+
"linkType": "Space",
|
124
|
+
"id": "cfexampleapi"
|
125
|
+
}
|
126
|
+
},
|
127
|
+
"type": "ContentType",
|
128
|
+
"id": "63k4qdEi9aI8IQUGaYGg4O",
|
129
|
+
"revision": 1,
|
130
|
+
"createdAt": "2013-06-23T19:06:29.976Z",
|
131
|
+
"updatedAt": "2013-06-23T19:06:29.976Z"
|
132
|
+
},
|
133
|
+
"description": "Meow!",
|
134
|
+
"displayField": "name"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"fields": [
|
138
|
+
{
|
139
|
+
"id": "name",
|
140
|
+
"name": "Name",
|
141
|
+
"type": "Text",
|
142
|
+
"required": true,
|
143
|
+
"localized": false
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"id": "description",
|
147
|
+
"name": "Description",
|
148
|
+
"type": "Text",
|
149
|
+
"required": false,
|
150
|
+
"localized": false
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"id": "image",
|
154
|
+
"name": "Image",
|
155
|
+
"required": false,
|
156
|
+
"localized": false,
|
157
|
+
"type": "Link",
|
158
|
+
"linkType": "Asset"
|
159
|
+
}
|
160
|
+
],
|
161
|
+
"name": "Dog",
|
162
|
+
"description": "Bark!",
|
163
|
+
"displayField": "name",
|
164
|
+
"sys": {
|
165
|
+
"space": {
|
166
|
+
"sys": {
|
167
|
+
"type": "Link",
|
168
|
+
"linkType": "Space",
|
169
|
+
"id": "cfexampleapi"
|
170
|
+
}
|
171
|
+
},
|
172
|
+
"type": "ContentType",
|
173
|
+
"id": "dog",
|
174
|
+
"revision": 2,
|
175
|
+
"createdAt": "2013-06-27T22:46:13.498Z",
|
176
|
+
"updatedAt": "2013-09-02T14:32:11.837Z"
|
177
|
+
}
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"fields": [
|
181
|
+
{
|
182
|
+
"id": "name",
|
183
|
+
"name": "Name",
|
184
|
+
"type": "Text",
|
185
|
+
"required": true,
|
186
|
+
"localized": true
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"id": "likes",
|
190
|
+
"name": "Likes",
|
191
|
+
"type": "Array",
|
192
|
+
"required": false,
|
193
|
+
"localized": false,
|
194
|
+
"items": {
|
195
|
+
"type": "Symbol"
|
196
|
+
}
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"id": "color",
|
200
|
+
"name": "Color",
|
201
|
+
"type": "Symbol",
|
202
|
+
"required": false,
|
203
|
+
"localized": false
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"id": "bestFriend",
|
207
|
+
"name": "Best Friend",
|
208
|
+
"type": "Link",
|
209
|
+
"required": false,
|
210
|
+
"localized": false,
|
211
|
+
"linkType": "Entry"
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"id": "birthday",
|
215
|
+
"name": "Birthday",
|
216
|
+
"type": "Date",
|
217
|
+
"required": false,
|
218
|
+
"localized": false
|
219
|
+
},
|
220
|
+
{
|
221
|
+
"id": "lifes",
|
222
|
+
"name": "Lifes left",
|
223
|
+
"type": "Integer",
|
224
|
+
"required": false,
|
225
|
+
"localized": false,
|
226
|
+
"disabled": true
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"id": "lives",
|
230
|
+
"name": "Lives left",
|
231
|
+
"type": "Integer",
|
232
|
+
"required": false,
|
233
|
+
"localized": false
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"id": "image",
|
237
|
+
"name": "Image",
|
238
|
+
"required": false,
|
239
|
+
"localized": false,
|
240
|
+
"type": "Link",
|
241
|
+
"linkType": "Asset"
|
242
|
+
}
|
243
|
+
],
|
244
|
+
"name": "Cat",
|
245
|
+
"displayField": "name",
|
246
|
+
"description": "Meow.",
|
247
|
+
"sys": {
|
248
|
+
"space": {
|
249
|
+
"sys": {
|
250
|
+
"type": "Link",
|
251
|
+
"linkType": "Space",
|
252
|
+
"id": "cfexampleapi"
|
253
|
+
}
|
254
|
+
},
|
255
|
+
"type": "ContentType",
|
256
|
+
"id": "cat",
|
257
|
+
"revision": 2,
|
258
|
+
"createdAt": "2013-06-27T22:46:12.852Z",
|
259
|
+
"updatedAt": "2013-09-02T13:14:47.863Z"
|
260
|
+
}
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"fields": [
|
264
|
+
{
|
265
|
+
"id": "name",
|
266
|
+
"name": "Name",
|
267
|
+
"type": "Text",
|
268
|
+
"required": true,
|
269
|
+
"localized": false
|
270
|
+
},
|
271
|
+
{
|
272
|
+
"id": "description",
|
273
|
+
"name": "Description",
|
274
|
+
"type": "Text",
|
275
|
+
"required": false,
|
276
|
+
"localized": false
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"id": "likes",
|
280
|
+
"name": "Likes",
|
281
|
+
"type": "Array",
|
282
|
+
"required": false,
|
283
|
+
"localized": false,
|
284
|
+
"items": {
|
285
|
+
"type": "Symbol"
|
286
|
+
}
|
287
|
+
},
|
288
|
+
{
|
289
|
+
"id": "image",
|
290
|
+
"name": "Image",
|
291
|
+
"required": false,
|
292
|
+
"localized": false,
|
293
|
+
"type": "Array",
|
294
|
+
"items": {
|
295
|
+
"type": "Link",
|
296
|
+
"linkType": "Asset"
|
297
|
+
},
|
298
|
+
"disabled": true
|
299
|
+
}
|
300
|
+
],
|
301
|
+
"name": "Human",
|
302
|
+
"displayField": "name",
|
303
|
+
"sys": {
|
304
|
+
"space": {
|
305
|
+
"sys": {
|
306
|
+
"type": "Link",
|
307
|
+
"linkType": "Space",
|
308
|
+
"id": "cfexampleapi"
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"type": "ContentType",
|
312
|
+
"id": "human",
|
313
|
+
"revision": 3,
|
314
|
+
"createdAt": "2013-06-27T22:46:14.133Z",
|
315
|
+
"updatedAt": "2013-09-02T15:10:26.818Z"
|
316
|
+
}
|
317
|
+
}
|
318
|
+
]
|
319
|
+
}
|
320
|
+
http_version:
|
321
|
+
recorded_at: Wed, 02 Dec 2015 18:20:27 GMT
|
322
|
+
- request:
|
323
|
+
method: get
|
324
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries
|
325
|
+
body:
|
326
|
+
encoding: US-ASCII
|
327
|
+
string: ''
|
328
|
+
headers:
|
329
|
+
User-Agent:
|
330
|
+
- RubyContentfulGem/0.7.0
|
331
|
+
Authorization:
|
332
|
+
- Bearer b4c0n73n7fu1
|
333
|
+
Content-Type:
|
334
|
+
- application/vnd.contentful.delivery.v1+json
|
335
|
+
Connection:
|
336
|
+
- close
|
337
|
+
Host:
|
338
|
+
- cdn.contentful.com
|
339
|
+
response:
|
340
|
+
status:
|
341
|
+
code: 200
|
342
|
+
message: OK
|
343
|
+
headers:
|
344
|
+
Access-Control-Allow-Headers:
|
345
|
+
- 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
|
346
|
+
Access-Control-Allow-Methods:
|
347
|
+
- GET,HEAD,OPTIONS
|
348
|
+
Access-Control-Allow-Origin:
|
349
|
+
- "*"
|
350
|
+
Access-Control-Expose-Headers:
|
351
|
+
- Etag
|
352
|
+
Access-Control-Max-Age:
|
353
|
+
- '86400'
|
354
|
+
Cache-Control:
|
355
|
+
- max-age=0
|
356
|
+
Content-Type:
|
357
|
+
- application/vnd.contentful.delivery.v1+json
|
358
|
+
Etag:
|
359
|
+
- '"474a1d8a1e34ebf8e98f420724e24f17"'
|
360
|
+
Server:
|
361
|
+
- nginx
|
362
|
+
X-Contentful-Request-Id:
|
363
|
+
- c40-589333551
|
364
|
+
Content-Length:
|
365
|
+
- '12570'
|
366
|
+
Accept-Ranges:
|
367
|
+
- bytes
|
368
|
+
Date:
|
369
|
+
- Wed, 02 Dec 2015 18:20:28 GMT
|
370
|
+
Via:
|
371
|
+
- 1.1 varnish
|
372
|
+
Age:
|
373
|
+
- '0'
|
374
|
+
Connection:
|
375
|
+
- close
|
376
|
+
X-Served-By:
|
377
|
+
- cache-jfk1030-JFK
|
378
|
+
X-Cache:
|
379
|
+
- MISS
|
380
|
+
X-Cache-Hits:
|
381
|
+
- '0'
|
382
|
+
Vary:
|
383
|
+
- Accept-Encoding
|
384
|
+
body:
|
385
|
+
encoding: UTF-8
|
386
|
+
string: |
|
387
|
+
{
|
388
|
+
"sys": {
|
389
|
+
"type": "Array"
|
390
|
+
},
|
391
|
+
"total": 11,
|
392
|
+
"skip": 0,
|
393
|
+
"limit": 100,
|
394
|
+
"items": [
|
395
|
+
{
|
396
|
+
"sys": {
|
397
|
+
"space": {
|
398
|
+
"sys": {
|
399
|
+
"type": "Link",
|
400
|
+
"linkType": "Space",
|
401
|
+
"id": "cfexampleapi"
|
402
|
+
}
|
403
|
+
},
|
404
|
+
"type": "Entry",
|
405
|
+
"contentType": {
|
406
|
+
"sys": {
|
407
|
+
"type": "Link",
|
408
|
+
"linkType": "ContentType",
|
409
|
+
"id": "dog"
|
410
|
+
}
|
411
|
+
},
|
412
|
+
"id": "6KntaYXaHSyIw8M6eo26OK",
|
413
|
+
"revision": 2,
|
414
|
+
"createdAt": "2013-11-06T09:45:27.475Z",
|
415
|
+
"updatedAt": "2013-11-18T09:13:37.808Z",
|
416
|
+
"locale": "en-US"
|
417
|
+
},
|
418
|
+
"fields": {
|
419
|
+
"name": "Doge",
|
420
|
+
"image": {
|
421
|
+
"sys": {
|
422
|
+
"type": "Link",
|
423
|
+
"linkType": "Asset",
|
424
|
+
"id": "1x0xpXu4pSGS4OukSyWGUK"
|
425
|
+
}
|
426
|
+
},
|
427
|
+
"description": "such json\nwow"
|
428
|
+
}
|
429
|
+
},
|
430
|
+
{
|
431
|
+
"sys": {
|
432
|
+
"space": {
|
433
|
+
"sys": {
|
434
|
+
"type": "Link",
|
435
|
+
"linkType": "Space",
|
436
|
+
"id": "cfexampleapi"
|
437
|
+
}
|
438
|
+
},
|
439
|
+
"type": "Entry",
|
440
|
+
"contentType": {
|
441
|
+
"sys": {
|
442
|
+
"type": "Link",
|
443
|
+
"linkType": "ContentType",
|
444
|
+
"id": "1t9IbcfdCk6m04uISSsaIK"
|
445
|
+
}
|
446
|
+
},
|
447
|
+
"id": "4MU1s3potiUEM2G4okYOqw",
|
448
|
+
"revision": 1,
|
449
|
+
"createdAt": "2014-02-21T13:42:45.926Z",
|
450
|
+
"updatedAt": "2014-02-21T13:42:45.926Z",
|
451
|
+
"locale": "en-US"
|
452
|
+
},
|
453
|
+
"fields": {
|
454
|
+
"name": "Berlin",
|
455
|
+
"center": {
|
456
|
+
"lat": 52.52000659999999,
|
457
|
+
"lon": 13.404953999999975
|
458
|
+
}
|
459
|
+
}
|
460
|
+
},
|
461
|
+
{
|
462
|
+
"fields": {
|
463
|
+
"name": "Happy Cat",
|
464
|
+
"bestFriend": {
|
465
|
+
"sys": {
|
466
|
+
"type": "Link",
|
467
|
+
"linkType": "Entry",
|
468
|
+
"id": "nyancat"
|
469
|
+
}
|
470
|
+
},
|
471
|
+
"likes": [
|
472
|
+
"cheezburger"
|
473
|
+
],
|
474
|
+
"color": "gray",
|
475
|
+
"birthday": "2003-10-28T23:00:00+00:00",
|
476
|
+
"lives": 1,
|
477
|
+
"image": {
|
478
|
+
"sys": {
|
479
|
+
"type": "Link",
|
480
|
+
"linkType": "Asset",
|
481
|
+
"id": "happycat"
|
482
|
+
}
|
483
|
+
}
|
484
|
+
},
|
485
|
+
"sys": {
|
486
|
+
"space": {
|
487
|
+
"sys": {
|
488
|
+
"type": "Link",
|
489
|
+
"linkType": "Space",
|
490
|
+
"id": "cfexampleapi"
|
491
|
+
}
|
492
|
+
},
|
493
|
+
"type": "Entry",
|
494
|
+
"contentType": {
|
495
|
+
"sys": {
|
496
|
+
"type": "Link",
|
497
|
+
"linkType": "ContentType",
|
498
|
+
"id": "cat"
|
499
|
+
}
|
500
|
+
},
|
501
|
+
"id": "happycat",
|
502
|
+
"revision": 8,
|
503
|
+
"createdAt": "2013-06-27T22:46:20.171Z",
|
504
|
+
"updatedAt": "2013-11-18T15:58:02.018Z",
|
505
|
+
"locale": "en-US"
|
506
|
+
}
|
507
|
+
},
|
508
|
+
{
|
509
|
+
"sys": {
|
510
|
+
"space": {
|
511
|
+
"sys": {
|
512
|
+
"type": "Link",
|
513
|
+
"linkType": "Space",
|
514
|
+
"id": "cfexampleapi"
|
515
|
+
}
|
516
|
+
},
|
517
|
+
"type": "Entry",
|
518
|
+
"contentType": {
|
519
|
+
"sys": {
|
520
|
+
"type": "Link",
|
521
|
+
"linkType": "ContentType",
|
522
|
+
"id": "63k4qdEi9aI8IQUGaYGg4O"
|
523
|
+
}
|
524
|
+
},
|
525
|
+
"id": "CVebBDcQsSsu6yKKIayy",
|
526
|
+
"revision": 1,
|
527
|
+
"createdAt": "2013-06-23T19:06:46.224Z",
|
528
|
+
"updatedAt": "2013-06-23T19:06:46.224Z",
|
529
|
+
"locale": "en-US"
|
530
|
+
},
|
531
|
+
"fields": {
|
532
|
+
"name": "Nyancat"
|
533
|
+
}
|
534
|
+
},
|
535
|
+
{
|
536
|
+
"fields": {
|
537
|
+
"name": "Garfield",
|
538
|
+
"likes": [
|
539
|
+
"lasagna"
|
540
|
+
],
|
541
|
+
"color": "orange",
|
542
|
+
"lifes": null,
|
543
|
+
"lives": 9,
|
544
|
+
"birthday": "1979-06-18T23:00:00+00:00"
|
545
|
+
},
|
546
|
+
"sys": {
|
547
|
+
"space": {
|
548
|
+
"sys": {
|
549
|
+
"type": "Link",
|
550
|
+
"linkType": "Space",
|
551
|
+
"id": "cfexampleapi"
|
552
|
+
}
|
553
|
+
},
|
554
|
+
"type": "Entry",
|
555
|
+
"contentType": {
|
556
|
+
"sys": {
|
557
|
+
"type": "Link",
|
558
|
+
"linkType": "ContentType",
|
559
|
+
"id": "cat"
|
560
|
+
}
|
561
|
+
},
|
562
|
+
"id": "garfield",
|
563
|
+
"revision": 2,
|
564
|
+
"createdAt": "2013-06-27T22:46:20.821Z",
|
565
|
+
"updatedAt": "2013-08-27T10:09:07.929Z",
|
566
|
+
"locale": "en-US"
|
567
|
+
}
|
568
|
+
},
|
569
|
+
{
|
570
|
+
"fields": {
|
571
|
+
"name": "Nyan Cat",
|
572
|
+
"likes": [
|
573
|
+
"rainbows",
|
574
|
+
"fish"
|
575
|
+
],
|
576
|
+
"color": "rainbow",
|
577
|
+
"bestFriend": {
|
578
|
+
"sys": {
|
579
|
+
"type": "Link",
|
580
|
+
"linkType": "Entry",
|
581
|
+
"id": "happycat"
|
582
|
+
}
|
583
|
+
},
|
584
|
+
"birthday": "2011-04-04T22:00:00+00:00",
|
585
|
+
"lives": 1337,
|
586
|
+
"image": {
|
587
|
+
"sys": {
|
588
|
+
"type": "Link",
|
589
|
+
"linkType": "Asset",
|
590
|
+
"id": "nyancat"
|
591
|
+
}
|
592
|
+
}
|
593
|
+
},
|
594
|
+
"sys": {
|
595
|
+
"space": {
|
596
|
+
"sys": {
|
597
|
+
"type": "Link",
|
598
|
+
"linkType": "Space",
|
599
|
+
"id": "cfexampleapi"
|
600
|
+
}
|
601
|
+
},
|
602
|
+
"type": "Entry",
|
603
|
+
"contentType": {
|
604
|
+
"sys": {
|
605
|
+
"type": "Link",
|
606
|
+
"linkType": "ContentType",
|
607
|
+
"id": "cat"
|
608
|
+
}
|
609
|
+
},
|
610
|
+
"id": "nyancat",
|
611
|
+
"revision": 5,
|
612
|
+
"createdAt": "2013-06-27T22:46:19.513Z",
|
613
|
+
"updatedAt": "2013-09-04T09:19:39.027Z",
|
614
|
+
"locale": "en-US"
|
615
|
+
}
|
616
|
+
},
|
617
|
+
{
|
618
|
+
"sys": {
|
619
|
+
"space": {
|
620
|
+
"sys": {
|
621
|
+
"type": "Link",
|
622
|
+
"linkType": "Space",
|
623
|
+
"id": "cfexampleapi"
|
624
|
+
}
|
625
|
+
},
|
626
|
+
"type": "Entry",
|
627
|
+
"contentType": {
|
628
|
+
"sys": {
|
629
|
+
"type": "Link",
|
630
|
+
"linkType": "ContentType",
|
631
|
+
"id": "1t9IbcfdCk6m04uISSsaIK"
|
632
|
+
}
|
633
|
+
},
|
634
|
+
"id": "7qVBlCjpWE86Oseo40gAEY",
|
635
|
+
"revision": 2,
|
636
|
+
"createdAt": "2014-02-21T13:43:38.258Z",
|
637
|
+
"updatedAt": "2014-04-15T08:22:22.010Z",
|
638
|
+
"locale": "en-US"
|
639
|
+
},
|
640
|
+
"fields": {
|
641
|
+
"name": "San Francisco",
|
642
|
+
"center": {
|
643
|
+
"lat": 37.7749295,
|
644
|
+
"lon": -122.41941550000001
|
645
|
+
}
|
646
|
+
}
|
647
|
+
},
|
648
|
+
{
|
649
|
+
"fields": {
|
650
|
+
"name": "Finn",
|
651
|
+
"description": "Fearless adventurer! Defender of pancakes.",
|
652
|
+
"likes": [
|
653
|
+
"adventure"
|
654
|
+
]
|
655
|
+
},
|
656
|
+
"sys": {
|
657
|
+
"space": {
|
658
|
+
"sys": {
|
659
|
+
"type": "Link",
|
660
|
+
"linkType": "Space",
|
661
|
+
"id": "cfexampleapi"
|
662
|
+
}
|
663
|
+
},
|
664
|
+
"type": "Entry",
|
665
|
+
"contentType": {
|
666
|
+
"sys": {
|
667
|
+
"type": "Link",
|
668
|
+
"linkType": "ContentType",
|
669
|
+
"id": "human"
|
670
|
+
}
|
671
|
+
},
|
672
|
+
"id": "finn",
|
673
|
+
"revision": 6,
|
674
|
+
"createdAt": "2013-06-27T22:46:21.450Z",
|
675
|
+
"updatedAt": "2013-09-09T16:15:01.297Z",
|
676
|
+
"locale": "en-US"
|
677
|
+
}
|
678
|
+
},
|
679
|
+
{
|
680
|
+
"fields": {
|
681
|
+
"name": "Jake",
|
682
|
+
"description": "Bacon pancakes, makin' bacon pancakes!",
|
683
|
+
"image": {
|
684
|
+
"sys": {
|
685
|
+
"type": "Link",
|
686
|
+
"linkType": "Asset",
|
687
|
+
"id": "jake"
|
688
|
+
}
|
689
|
+
}
|
690
|
+
},
|
691
|
+
"sys": {
|
692
|
+
"space": {
|
693
|
+
"sys": {
|
694
|
+
"type": "Link",
|
695
|
+
"linkType": "Space",
|
696
|
+
"id": "cfexampleapi"
|
697
|
+
}
|
698
|
+
},
|
699
|
+
"type": "Entry",
|
700
|
+
"contentType": {
|
701
|
+
"sys": {
|
702
|
+
"type": "Link",
|
703
|
+
"linkType": "ContentType",
|
704
|
+
"id": "dog"
|
705
|
+
}
|
706
|
+
},
|
707
|
+
"id": "jake",
|
708
|
+
"revision": 5,
|
709
|
+
"createdAt": "2013-06-27T22:46:22.096Z",
|
710
|
+
"updatedAt": "2013-12-18T13:10:26.212Z",
|
711
|
+
"locale": "en-US"
|
712
|
+
}
|
713
|
+
},
|
714
|
+
{
|
715
|
+
"sys": {
|
716
|
+
"space": {
|
717
|
+
"sys": {
|
718
|
+
"type": "Link",
|
719
|
+
"linkType": "Space",
|
720
|
+
"id": "cfexampleapi"
|
721
|
+
}
|
722
|
+
},
|
723
|
+
"type": "Entry",
|
724
|
+
"contentType": {
|
725
|
+
"sys": {
|
726
|
+
"type": "Link",
|
727
|
+
"linkType": "ContentType",
|
728
|
+
"id": "1t9IbcfdCk6m04uISSsaIK"
|
729
|
+
}
|
730
|
+
},
|
731
|
+
"id": "ge1xHyH3QOWucKWCCAgIG",
|
732
|
+
"revision": 1,
|
733
|
+
"createdAt": "2014-02-21T13:43:23.210Z",
|
734
|
+
"updatedAt": "2014-02-21T13:43:23.210Z",
|
735
|
+
"locale": "en-US"
|
736
|
+
},
|
737
|
+
"fields": {
|
738
|
+
"name": "Paris",
|
739
|
+
"center": {
|
740
|
+
"lat": 48.856614,
|
741
|
+
"lon": 2.3522219000000177
|
742
|
+
}
|
743
|
+
}
|
744
|
+
},
|
745
|
+
{
|
746
|
+
"sys": {
|
747
|
+
"space": {
|
748
|
+
"sys": {
|
749
|
+
"type": "Link",
|
750
|
+
"linkType": "Space",
|
751
|
+
"id": "cfexampleapi"
|
752
|
+
}
|
753
|
+
},
|
754
|
+
"type": "Entry",
|
755
|
+
"contentType": {
|
756
|
+
"sys": {
|
757
|
+
"type": "Link",
|
758
|
+
"linkType": "ContentType",
|
759
|
+
"id": "1t9IbcfdCk6m04uISSsaIK"
|
760
|
+
}
|
761
|
+
},
|
762
|
+
"id": "5ETMRzkl9KM4omyMwKAOki",
|
763
|
+
"revision": 3,
|
764
|
+
"createdAt": "2014-02-21T13:42:57.752Z",
|
765
|
+
"updatedAt": "2014-08-23T14:42:35.207Z",
|
766
|
+
"locale": "en-US"
|
767
|
+
},
|
768
|
+
"fields": {
|
769
|
+
"name": "London",
|
770
|
+
"center": {
|
771
|
+
"lat": 51.508515,
|
772
|
+
"lon": -0.12548719999995228
|
773
|
+
}
|
774
|
+
}
|
775
|
+
}
|
776
|
+
],
|
777
|
+
"includes": {
|
778
|
+
"Asset": [
|
779
|
+
{
|
780
|
+
"fields": {
|
781
|
+
"title": "Jake",
|
782
|
+
"file": {
|
783
|
+
"fileName": "jake.png",
|
784
|
+
"contentType": "image/png",
|
785
|
+
"details": {
|
786
|
+
"image": {
|
787
|
+
"width": 100,
|
788
|
+
"height": 161
|
789
|
+
},
|
790
|
+
"size": 20480
|
791
|
+
},
|
792
|
+
"url": "//images.contentful.com/cfexampleapi/4hlteQAXS8iS0YCMU6QMWg/2a4d826144f014109364ccf5c891d2dd/jake.png"
|
793
|
+
}
|
794
|
+
},
|
795
|
+
"sys": {
|
796
|
+
"space": {
|
797
|
+
"sys": {
|
798
|
+
"type": "Link",
|
799
|
+
"linkType": "Space",
|
800
|
+
"id": "cfexampleapi"
|
801
|
+
}
|
802
|
+
},
|
803
|
+
"type": "Asset",
|
804
|
+
"id": "jake",
|
805
|
+
"revision": 2,
|
806
|
+
"createdAt": "2013-09-02T14:56:34.260Z",
|
807
|
+
"updatedAt": "2013-09-02T15:22:39.466Z",
|
808
|
+
"locale": "en-US"
|
809
|
+
}
|
810
|
+
},
|
811
|
+
{
|
812
|
+
"fields": {
|
813
|
+
"title": "Nyan Cat",
|
814
|
+
"file": {
|
815
|
+
"fileName": "Nyan_cat_250px_frame.png",
|
816
|
+
"contentType": "image/png",
|
817
|
+
"details": {
|
818
|
+
"image": {
|
819
|
+
"width": 250,
|
820
|
+
"height": 250
|
821
|
+
},
|
822
|
+
"size": 12273
|
823
|
+
},
|
824
|
+
"url": "//images.contentful.com/cfexampleapi/4gp6taAwW4CmSgumq2ekUm/9da0cd1936871b8d72343e895a00d611/Nyan_cat_250px_frame.png"
|
825
|
+
}
|
826
|
+
},
|
827
|
+
"sys": {
|
828
|
+
"space": {
|
829
|
+
"sys": {
|
830
|
+
"type": "Link",
|
831
|
+
"linkType": "Space",
|
832
|
+
"id": "cfexampleapi"
|
833
|
+
}
|
834
|
+
},
|
835
|
+
"type": "Asset",
|
836
|
+
"id": "nyancat",
|
837
|
+
"revision": 1,
|
838
|
+
"createdAt": "2013-09-02T14:56:34.240Z",
|
839
|
+
"updatedAt": "2013-09-02T14:56:34.240Z",
|
840
|
+
"locale": "en-US"
|
841
|
+
}
|
842
|
+
},
|
843
|
+
{
|
844
|
+
"fields": {
|
845
|
+
"file": {
|
846
|
+
"fileName": "happycatw.jpg",
|
847
|
+
"contentType": "image/jpeg",
|
848
|
+
"details": {
|
849
|
+
"image": {
|
850
|
+
"width": 273,
|
851
|
+
"height": 397
|
852
|
+
},
|
853
|
+
"size": 59939
|
854
|
+
},
|
855
|
+
"url": "//images.contentful.com/cfexampleapi/3MZPnjZTIskAIIkuuosCss/382a48dfa2cb16c47aa2c72f7b23bf09/happycatw.jpg"
|
856
|
+
},
|
857
|
+
"title": "Happy Cat"
|
858
|
+
},
|
859
|
+
"sys": {
|
860
|
+
"space": {
|
861
|
+
"sys": {
|
862
|
+
"type": "Link",
|
863
|
+
"linkType": "Space",
|
864
|
+
"id": "cfexampleapi"
|
865
|
+
}
|
866
|
+
},
|
867
|
+
"type": "Asset",
|
868
|
+
"id": "happycat",
|
869
|
+
"revision": 2,
|
870
|
+
"createdAt": "2013-09-02T14:56:34.267Z",
|
871
|
+
"updatedAt": "2013-09-02T15:11:24.361Z",
|
872
|
+
"locale": "en-US"
|
873
|
+
}
|
874
|
+
},
|
875
|
+
{
|
876
|
+
"sys": {
|
877
|
+
"space": {
|
878
|
+
"sys": {
|
879
|
+
"type": "Link",
|
880
|
+
"linkType": "Space",
|
881
|
+
"id": "cfexampleapi"
|
882
|
+
}
|
883
|
+
},
|
884
|
+
"type": "Asset",
|
885
|
+
"id": "1x0xpXu4pSGS4OukSyWGUK",
|
886
|
+
"revision": 6,
|
887
|
+
"createdAt": "2013-11-06T09:45:10.000Z",
|
888
|
+
"updatedAt": "2013-12-18T13:27:14.917Z",
|
889
|
+
"locale": "en-US"
|
890
|
+
},
|
891
|
+
"fields": {
|
892
|
+
"title": "Doge",
|
893
|
+
"file": {
|
894
|
+
"fileName": "doge.jpg",
|
895
|
+
"contentType": "image/jpeg",
|
896
|
+
"details": {
|
897
|
+
"image": {
|
898
|
+
"width": 5800,
|
899
|
+
"height": 4350
|
900
|
+
},
|
901
|
+
"size": 522943
|
902
|
+
},
|
903
|
+
"url": "//images.contentful.com/cfexampleapi/1x0xpXu4pSGS4OukSyWGUK/cc1239c6385428ef26f4180190532818/doge.jpg"
|
904
|
+
},
|
905
|
+
"description": "nice picture"
|
906
|
+
}
|
907
|
+
}
|
908
|
+
]
|
909
|
+
}
|
910
|
+
}
|
911
|
+
http_version:
|
912
|
+
recorded_at: Wed, 02 Dec 2015 18:20:28 GMT
|
913
|
+
recorded_with: VCR 2.9.3
|
914
|
+
|