contentful 1.2.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/LICENSE.txt +1 -0
- data/README.md +8 -0
- data/contentful.gemspec +2 -1
- data/examples/custom_classes.rb +23 -26
- data/examples/raise_errors.rb +2 -2
- data/lib/contentful.rb +0 -1
- data/lib/contentful/array.rb +27 -19
- data/lib/contentful/array_like.rb +51 -0
- data/lib/contentful/asset.rb +43 -11
- data/lib/contentful/base_resource.rb +87 -0
- data/lib/contentful/client.rb +43 -34
- data/lib/contentful/coercions.rb +116 -0
- data/lib/contentful/content_type.rb +23 -8
- data/lib/contentful/content_type_cache.rb +26 -0
- data/lib/contentful/deleted_asset.rb +2 -5
- data/lib/contentful/deleted_entry.rb +2 -5
- data/lib/contentful/entry.rb +55 -33
- data/lib/contentful/error.rb +1 -1
- data/lib/contentful/field.rb +37 -9
- data/lib/contentful/fields_resource.rb +115 -0
- data/lib/contentful/file.rb +7 -8
- data/lib/contentful/link.rb +3 -6
- data/lib/contentful/locale.rb +6 -6
- data/lib/contentful/location.rb +7 -5
- data/lib/contentful/resource_builder.rb +72 -226
- data/lib/contentful/space.rb +16 -6
- data/lib/contentful/support.rb +41 -3
- data/lib/contentful/sync_page.rb +17 -10
- data/lib/contentful/version.rb +1 -1
- data/spec/array_spec.rb +4 -8
- data/spec/client_class_spec.rb +12 -23
- data/spec/client_configuration_spec.rb +13 -23
- data/spec/content_type_spec.rb +0 -5
- data/spec/entry_spec.rb +130 -125
- data/spec/error_requests_spec.rb +1 -1
- data/spec/field_spec.rb +0 -5
- data/spec/file_spec.rb +0 -5
- data/spec/fixtures/vcr_cassettes/entry.yml +54 -64
- data/spec/fixtures/vcr_cassettes/entry/include_resolution.yml +101 -0
- data/spec/fixtures/vcr_cassettes/entry/marshall.yml +227 -251
- data/spec/fixtures/vcr_cassettes/entry/raw.yml +88 -124
- data/spec/fixtures/vcr_cassettes/entry_locales.yml +56 -74
- data/spec/fixtures/vcr_cassettes/human.yml +63 -40
- data/spec/fixtures/vcr_cassettes/location.yml +99 -211
- data/spec/fixtures/vcr_cassettes/multi_locale_array_reference.yml +12 -16
- data/spec/fixtures/vcr_cassettes/not_found.yml +26 -21
- data/spec/fixtures/vcr_cassettes/nyancat.yml +53 -63
- data/spec/fixtures/vcr_cassettes/ratelimit.yml +1 -1
- data/spec/fixtures/vcr_cassettes/reloaded_entry.yml +54 -64
- data/spec/fixtures/vcr_cassettes/unauthorized.yml +1 -1
- data/spec/fixtures/vcr_cassettes/unavailable.yml +27 -15
- data/spec/link_spec.rb +3 -2
- data/spec/locale_spec.rb +0 -5
- data/spec/location_spec.rb +1 -6
- data/spec/request_spec.rb +3 -2
- data/spec/resource_building_spec.rb +10 -7
- data/spec/response_spec.rb +1 -1
- data/spec/space_spec.rb +0 -5
- data/spec/spec_helper.rb +3 -0
- data/spec/support/json_responses.rb +3 -3
- data/spec/sync_page_spec.rb +1 -6
- data/spec/sync_spec.rb +11 -7
- metadata +69 -20
- data/examples/dynamic_entries.rb +0 -124
- data/examples/resource_mapping.rb +0 -32
- data/lib/contentful/constants.rb +0 -504
- data/lib/contentful/dynamic_entry.rb +0 -57
- data/lib/contentful/resource.rb +0 -239
- data/lib/contentful/resource/array_like.rb +0 -39
- data/lib/contentful/resource/asset_fields.rb +0 -58
- data/lib/contentful/resource/custom_resource.rb +0 -29
- data/lib/contentful/resource/fields.rb +0 -73
- data/lib/contentful/resource/system_properties.rb +0 -55
- data/spec/coercions_spec.rb +0 -23
- data/spec/dynamic_entry_spec.rb +0 -75
- data/spec/resource_spec.rb +0 -79
data/spec/error_requests_spec.rb
CHANGED
data/spec/field_spec.rb
CHANGED
@@ -13,11 +13,6 @@ describe Contentful::Field do
|
|
13
13
|
} }
|
14
14
|
|
15
15
|
describe 'Properties' do
|
16
|
-
it 'has a #properties getter returning a hash with symbol keys' do
|
17
|
-
expect(field.properties).to be_a Hash
|
18
|
-
expect(field.properties.keys.sample).to be_a Symbol
|
19
|
-
end
|
20
|
-
|
21
16
|
it 'has #id' do
|
22
17
|
expect(field.id).to eq 'name'
|
23
18
|
end
|
data/spec/file_spec.rb
CHANGED
@@ -4,11 +4,6 @@ describe Contentful::File do
|
|
4
4
|
let(:file) { vcr('asset') { create_client.asset('nyancat').file } }
|
5
5
|
|
6
6
|
describe 'Properties' do
|
7
|
-
it 'has a #properties getter returning a hash with symbol keys' do
|
8
|
-
expect(file.properties).to be_a Hash
|
9
|
-
expect(file.properties.keys.sample).to be_a Symbol
|
10
|
-
end
|
11
|
-
|
12
7
|
it 'has #file_name' do
|
13
8
|
expect(file.file_name).to eq 'Nyan_cat_250px_frame.png'
|
14
9
|
end
|
@@ -2,17 +2,21 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?sys.id=nyancat
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- RubyContentfulGem/
|
11
|
+
- RubyContentfulGem/1.2.0
|
12
12
|
Authorization:
|
13
13
|
- Bearer b4c0n73n7fu1
|
14
14
|
Content-Type:
|
15
15
|
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip
|
18
|
+
Connection:
|
19
|
+
- close
|
16
20
|
Host:
|
17
21
|
- cdn.contentful.com
|
18
22
|
response:
|
@@ -20,93 +24,79 @@ http_interactions:
|
|
20
24
|
code: 200
|
21
25
|
message: OK
|
22
26
|
headers:
|
23
|
-
Date:
|
24
|
-
- Wed, 16 Apr 2014 09:00:23 GMT
|
25
|
-
Server:
|
26
|
-
- nginx/1.1.19
|
27
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
|
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,X-Contentful-User-Agent
|
29
29
|
Access-Control-Allow-Methods:
|
30
30
|
- GET,HEAD,OPTIONS
|
31
31
|
Access-Control-Allow-Origin:
|
32
32
|
- "*"
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Etag
|
33
35
|
Access-Control-Max-Age:
|
34
36
|
- '86400'
|
35
37
|
Cache-Control:
|
36
38
|
- max-age=0
|
39
|
+
Content-Encoding:
|
40
|
+
- gzip
|
37
41
|
Content-Type:
|
38
42
|
- application/vnd.contentful.delivery.v1+json
|
39
43
|
Etag:
|
40
|
-
- "
|
44
|
+
- W/"9707115047cc402819250f844939b2aa"
|
45
|
+
Server:
|
46
|
+
- Contentful
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
- nosniff
|
41
50
|
X-Contentful-Request-Id:
|
42
|
-
-
|
51
|
+
- 5d8c70a35f32dff1f29bff44068b19df
|
43
52
|
Content-Length:
|
44
|
-
- '
|
53
|
+
- '1034'
|
45
54
|
Accept-Ranges:
|
46
55
|
- bytes
|
56
|
+
Date:
|
57
|
+
- Tue, 20 Dec 2016 15:57:32 GMT
|
47
58
|
Via:
|
48
59
|
- 1.1 varnish
|
49
60
|
Age:
|
50
|
-
- '
|
61
|
+
- '1958'
|
62
|
+
Connection:
|
63
|
+
- close
|
51
64
|
X-Served-By:
|
52
|
-
- cache-
|
65
|
+
- cache-fra1229-FRA
|
53
66
|
X-Cache:
|
54
67
|
- HIT
|
55
68
|
X-Cache-Hits:
|
56
69
|
- '1'
|
70
|
+
X-Timer:
|
71
|
+
- S1482249452.372291,VS0,VE0
|
57
72
|
Vary:
|
58
73
|
- Accept-Encoding
|
59
74
|
body:
|
60
|
-
encoding:
|
61
|
-
string:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
}
|
86
|
-
},
|
87
|
-
"sys": {
|
88
|
-
"space": {
|
89
|
-
"sys": {
|
90
|
-
"type": "Link",
|
91
|
-
"linkType": "Space",
|
92
|
-
"id": "cfexampleapi"
|
93
|
-
}
|
94
|
-
},
|
95
|
-
"type": "Entry",
|
96
|
-
"contentType": {
|
97
|
-
"sys": {
|
98
|
-
"type": "Link",
|
99
|
-
"linkType": "ContentType",
|
100
|
-
"id": "cat"
|
101
|
-
}
|
102
|
-
},
|
103
|
-
"id": "nyancat",
|
104
|
-
"revision": 5,
|
105
|
-
"createdAt": "2013-06-27T22:46:19.513Z",
|
106
|
-
"updatedAt": "2013-09-04T09:19:39.027Z",
|
107
|
-
"locale": "en-US"
|
108
|
-
}
|
109
|
-
}
|
75
|
+
encoding: ASCII-8BIT
|
76
|
+
string: !binary |-
|
77
|
+
H4sIAAAAAAAAA+VX227jNhB9z1cEet1a4kX3NyNo0QDtokC8KJCiCGiJthlL
|
78
|
+
sirRm/Uu8u8lqYtJXZxF1m8rBI5EcsiZwzmHw283t7dWfaqt+PabeBUf/FRS
|
79
|
+
8WUtq4qcLNH2+oscww+cZKIdqq96z0rxAdRHxnLGZRdovhmnuZzwHzVhM+1g
|
80
|
+
FbVSXZJELtWNaBo1X2SDaux8+oMVe0uueX7E6sV+1f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KhMXjmvIzNS1o5eZ9xcF4+uHmLS/no0Kru8goAverAlaAvac
|
97
|
+
HZloBFR3we6xrkHAiYq/TZ8f45+7LX1Oli9/u3f5w/aY/4fo/lPuRCkBSQoj
|
98
|
+
7IcBXIdpgLCLaRh5BIDUh9CR/jyJ0vwJeaD88rSpRBLbZfEOKkI0wakmwUeh
|
99
|
+
Kc70VPTUrdp8zlQUjr2bit8b3SQrJQp6VTt3Vor215vXm/8BI5JeymkQAAA=
|
110
100
|
http_version:
|
111
|
-
recorded_at:
|
112
|
-
recorded_with: VCR
|
101
|
+
recorded_at: Tue, 20 Dec 2016 15:57:32 GMT
|
102
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?include=2&sys.id=nyancat
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/1.2.2
|
12
|
+
Authorization:
|
13
|
+
- Bearer b4c0n73n7fu1
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip
|
18
|
+
Connection:
|
19
|
+
- close
|
20
|
+
Host:
|
21
|
+
- cdn.contentful.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
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,X-Contentful-User-Agent
|
29
|
+
Access-Control-Allow-Methods:
|
30
|
+
- GET,HEAD,OPTIONS
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Access-Control-Expose-Headers:
|
34
|
+
- Etag
|
35
|
+
Access-Control-Max-Age:
|
36
|
+
- '86400'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0
|
39
|
+
Content-Encoding:
|
40
|
+
- gzip
|
41
|
+
Content-Type:
|
42
|
+
- application/vnd.contentful.delivery.v1+json
|
43
|
+
Etag:
|
44
|
+
- W/"9707115047cc402819250f844939b2aa"
|
45
|
+
Server:
|
46
|
+
- Contentful
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Contentful-Request-Id:
|
50
|
+
- e59ee42f06d8d80fa40efcba8da996f4
|
51
|
+
Content-Length:
|
52
|
+
- '1034'
|
53
|
+
Accept-Ranges:
|
54
|
+
- bytes
|
55
|
+
Date:
|
56
|
+
- Wed, 15 Mar 2017 09:31:53 GMT
|
57
|
+
Via:
|
58
|
+
- 1.1 varnish
|
59
|
+
Age:
|
60
|
+
- '0'
|
61
|
+
Connection:
|
62
|
+
- close
|
63
|
+
X-Served-By:
|
64
|
+
- cache-hhn1531-HHN
|
65
|
+
X-Cache:
|
66
|
+
- MISS
|
67
|
+
X-Cache-Hits:
|
68
|
+
- '0'
|
69
|
+
X-Timer:
|
70
|
+
- S1489570313.756275,VS0,VE128
|
71
|
+
Vary:
|
72
|
+
- Accept-Encoding
|
73
|
+
body:
|
74
|
+
encoding: ASCII-8BIT
|
75
|
+
string: !binary |-
|
76
|
+
H4sIAAAAAAAAA+VX227jNhB9z1cEet1a4kX3NyNo0QDtokC8KJCiCGiJthlL
|
77
|
+
sirRm/Uu8u8lqYtJXZxF1m8rBI5EcsiZwzmHw283t7dWfaqt+PabeBUf/FRS
|
78
|
+
8WUtq4qcLNH2+oscww+cZKIdqq96z0rxAdRHxnLGZRdovhmnuZzwHzVhM+1g
|
79
|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RdDMk8VyyFrPNc0u1MbdRV
|
95
|
+
D52z5y0yLjUdKhMXjmvIzNS1o5eZ9xcF4+uHmLS/no0Kru8goAverAlaAvac
|
96
|
+
HZloBFR3we6xrkHAiYq/TZ8f45+7LX1Oli9/u3f5w/aY/4fo/lPuRCkBSQoj
|
97
|
+
7IcBXIdpgLCLaRh5BIDUh9CR/jyJ0vwJeaD88rSpRBLbZfEOKkI0wakmwUeh
|
98
|
+
Kc70VPTUrdp8zlQUjr2bit8b3SQrJQp6VTt3Vor215vXm/8BI5JeymkQAAA=
|
99
|
+
http_version:
|
100
|
+
recorded_at: Wed, 15 Mar 2017 09:31:53 GMT
|
101
|
+
recorded_with: VCR 3.0.3
|
@@ -8,13 +8,11 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- RubyContentfulGem/
|
11
|
+
- RubyContentfulGem/1.2.2
|
12
12
|
Authorization:
|
13
13
|
- Bearer b4c0n73n7fu1
|
14
14
|
Content-Type:
|
15
15
|
- application/vnd.contentful.delivery.v1+json
|
16
|
-
Accept-Encoding:
|
17
|
-
- gzip
|
18
16
|
Connection:
|
19
17
|
- close
|
20
18
|
Host:
|
@@ -25,7 +23,7 @@ http_interactions:
|
|
25
23
|
message: OK
|
26
24
|
headers:
|
27
25
|
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
|
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,X-Contentful-User-Agent
|
29
27
|
Access-Control-Allow-Methods:
|
30
28
|
- GET,HEAD,OPTIONS
|
31
29
|
Access-Control-Allow-Origin:
|
@@ -38,280 +36,258 @@ http_interactions:
|
|
38
36
|
- max-age=0
|
39
37
|
Content-Type:
|
40
38
|
- application/vnd.contentful.delivery.v1+json
|
39
|
+
Etag:
|
40
|
+
- W/"9707115047cc402819250f844939b2aa"
|
41
41
|
Server:
|
42
|
-
-
|
42
|
+
- Contentful
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
- nosniff
|
43
46
|
X-Contentful-Request-Id:
|
44
|
-
-
|
47
|
+
- fdff368667a9181d8c0b1451c9499407
|
45
48
|
Content-Length:
|
46
|
-
- '
|
49
|
+
- '4201'
|
47
50
|
Accept-Ranges:
|
48
51
|
- bytes
|
49
52
|
Date:
|
50
|
-
-
|
53
|
+
- Thu, 05 Jan 2017 21:35:14 GMT
|
51
54
|
Via:
|
52
55
|
- 1.1 varnish
|
53
56
|
Age:
|
54
|
-
- '
|
57
|
+
- '284'
|
55
58
|
Connection:
|
56
59
|
- close
|
57
60
|
X-Served-By:
|
58
|
-
- cache-
|
61
|
+
- cache-gru7120-GRU
|
59
62
|
X-Cache:
|
60
63
|
- HIT
|
61
64
|
X-Cache-Hits:
|
62
65
|
- '1'
|
66
|
+
X-Timer:
|
67
|
+
- S1483652114.308569,VS0,VE0
|
63
68
|
Vary:
|
64
69
|
- Accept-Encoding
|
65
70
|
body:
|
66
|
-
encoding:
|
71
|
+
encoding: ASCII-8BIT
|
67
72
|
string: |
|
68
73
|
{
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
"
|
109
|
-
"
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
74
|
+
"sys": {
|
75
|
+
"type": "Array"
|
76
|
+
},
|
77
|
+
"total": 1,
|
78
|
+
"skip": 0,
|
79
|
+
"limit": 100,
|
80
|
+
"items": [
|
81
|
+
{
|
82
|
+
"sys": {
|
83
|
+
"space": {
|
84
|
+
"sys": {
|
85
|
+
"type": "Link",
|
86
|
+
"linkType": "Space",
|
87
|
+
"id": "cfexampleapi"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"id": "nyancat",
|
91
|
+
"type": "Entry",
|
92
|
+
"createdAt": "2013-06-27T22:46:19.513Z",
|
93
|
+
"updatedAt": "2013-09-04T09:19:39.027Z",
|
94
|
+
"revision": 5,
|
95
|
+
"contentType": {
|
96
|
+
"sys": {
|
97
|
+
"type": "Link",
|
98
|
+
"linkType": "ContentType",
|
99
|
+
"id": "cat"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"locale": "en-US"
|
103
|
+
},
|
104
|
+
"fields": {
|
105
|
+
"name": "Nyan Cat",
|
106
|
+
"likes": [
|
107
|
+
"rainbows",
|
108
|
+
"fish"
|
109
|
+
],
|
110
|
+
"color": "rainbow",
|
111
|
+
"bestFriend": {
|
112
|
+
"sys": {
|
113
|
+
"type": "Link",
|
114
|
+
"linkType": "Entry",
|
115
|
+
"id": "happycat"
|
116
|
+
}
|
117
|
+
},
|
118
|
+
"birthday": "2011-04-04T22:00:00+00:00",
|
119
|
+
"lives": 1337,
|
120
|
+
"image": {
|
121
|
+
"sys": {
|
122
|
+
"type": "Link",
|
123
|
+
"linkType": "Asset",
|
124
|
+
"id": "nyancat"
|
125
|
+
}
|
126
|
+
},
|
127
|
+
"catPack": [
|
128
|
+
{
|
129
|
+
"sys": {
|
130
|
+
"type": "Link",
|
131
|
+
"linkType": "Entry",
|
132
|
+
"id": "happycat"
|
115
133
|
}
|
116
|
-
|
117
|
-
|
118
|
-
"
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
"type":"Entry",
|
126
|
-
"contentType":{
|
127
|
-
"sys":{
|
128
|
-
"type":"Link",
|
129
|
-
"linkType":"ContentType",
|
130
|
-
"id":"cat"
|
131
|
-
}
|
132
|
-
},
|
133
|
-
"id":"nyancat",
|
134
|
-
"revision":5,
|
135
|
-
"createdAt":"2013-06-27T22:46:19.513Z",
|
136
|
-
"updatedAt":"2013-09-04T09:19:39.027Z",
|
137
|
-
"locale":"en-US"
|
138
|
-
}
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"sys": {
|
137
|
+
"type": "Link",
|
138
|
+
"linkType": "Entry",
|
139
|
+
"id": "worriedcat"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
]
|
139
143
|
}
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
}
|
152
|
-
},
|
153
|
-
"catPack": [
|
154
|
-
{
|
155
|
-
"sys":{
|
156
|
-
"type":"Link",
|
157
|
-
"linkType":"Entry",
|
158
|
-
"id":"nyancat"
|
159
|
-
}
|
160
|
-
},
|
161
|
-
{
|
162
|
-
"sys":{
|
163
|
-
"type":"Link",
|
164
|
-
"linkType":"Entry",
|
165
|
-
"id":"worriedcat"
|
166
|
-
}
|
167
|
-
}
|
168
|
-
],
|
169
|
-
"likes":[
|
170
|
-
"cheezburger"
|
171
|
-
],
|
172
|
-
"color":"gray",
|
173
|
-
"birthday":"2003-10-28T23:00:00+00:00",
|
174
|
-
"lives":1,
|
175
|
-
"image":{
|
176
|
-
"sys":{
|
177
|
-
"type":"Link",
|
178
|
-
"linkType":"Asset",
|
179
|
-
"id":"happycat"
|
180
|
-
}
|
181
|
-
}
|
182
|
-
},
|
183
|
-
"sys":{
|
184
|
-
"space":{
|
185
|
-
"sys":{
|
186
|
-
"type":"Link",
|
187
|
-
"linkType":"Space",
|
188
|
-
"id":"cfexampleapi"
|
189
|
-
}
|
190
|
-
},
|
191
|
-
"type":"Entry",
|
192
|
-
"contentType":{
|
193
|
-
"sys":{
|
194
|
-
"type":"Link",
|
195
|
-
"linkType":"ContentType",
|
196
|
-
"id":"cat"
|
197
|
-
}
|
198
|
-
},
|
199
|
-
"id":"happycat",
|
200
|
-
"revision":8,
|
201
|
-
"createdAt":"2013-06-27T22:46:20.171Z",
|
202
|
-
"updatedAt":"2013-11-18T15:58:02.018Z",
|
203
|
-
"locale":"en-US"
|
144
|
+
}
|
145
|
+
],
|
146
|
+
"includes": {
|
147
|
+
"Entry": [
|
148
|
+
{
|
149
|
+
"sys": {
|
150
|
+
"space": {
|
151
|
+
"sys": {
|
152
|
+
"type": "Link",
|
153
|
+
"linkType": "Space",
|
154
|
+
"id": "cfexampleapi"
|
204
155
|
}
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
"likes":[
|
217
|
-
"lasagna"
|
218
|
-
],
|
219
|
-
"color":"taupe",
|
220
|
-
"birthday":"2003-10-28T23:00:00+00:00",
|
221
|
-
"lives":7
|
222
|
-
},
|
223
|
-
"sys":{
|
224
|
-
"space":{
|
225
|
-
"sys":{
|
226
|
-
"type":"Link",
|
227
|
-
"linkType":"Space",
|
228
|
-
"id":"cfexampleapi"
|
229
|
-
}
|
230
|
-
},
|
231
|
-
"type":"Entry",
|
232
|
-
"contentType":{
|
233
|
-
"sys":{
|
234
|
-
"type":"Link",
|
235
|
-
"linkType":"ContentType",
|
236
|
-
"id":"cat"
|
237
|
-
}
|
238
|
-
},
|
239
|
-
"id":"worriedcat",
|
240
|
-
"revision":8,
|
241
|
-
"createdAt":"2013-06-27T22:46:20.171Z",
|
242
|
-
"updatedAt":"2013-11-18T15:58:02.018Z",
|
243
|
-
"locale":"en-US"
|
156
|
+
},
|
157
|
+
"id": "happycat",
|
158
|
+
"type": "Entry",
|
159
|
+
"createdAt": "2013-06-27T22:46:20.171Z",
|
160
|
+
"updatedAt": "2013-11-18T15:58:02.018Z",
|
161
|
+
"revision": 8,
|
162
|
+
"contentType": {
|
163
|
+
"sys": {
|
164
|
+
"type": "Link",
|
165
|
+
"linkType": "ContentType",
|
166
|
+
"id": "cat"
|
244
167
|
}
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
"sys":{
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
"linkType":"Space",
|
269
|
-
"id":"cfexampleapi"
|
270
|
-
}
|
271
|
-
},
|
272
|
-
"type":"Asset",
|
273
|
-
"id":"happycat",
|
274
|
-
"revision":2,
|
275
|
-
"createdAt":"2013-09-02T14:56:34.267Z",
|
276
|
-
"updatedAt":"2013-09-02T15:11:24.361Z",
|
277
|
-
"locale":"en-US"
|
168
|
+
},
|
169
|
+
"locale": "en-US"
|
170
|
+
},
|
171
|
+
"fields": {
|
172
|
+
"name": "Happy Cat",
|
173
|
+
"likes": [
|
174
|
+
"cheezburger"
|
175
|
+
],
|
176
|
+
"color": "gray",
|
177
|
+
"bestFriend": {
|
178
|
+
"sys": {
|
179
|
+
"type": "Link",
|
180
|
+
"linkType": "Entry",
|
181
|
+
"id": "nyancat"
|
182
|
+
}
|
183
|
+
},
|
184
|
+
"birthday": "2003-10-28T23:00:00+00:00",
|
185
|
+
"lives": 1,
|
186
|
+
"image": {
|
187
|
+
"sys": {
|
188
|
+
"type": "Link",
|
189
|
+
"linkType": "Asset",
|
190
|
+
"id": "happycat"
|
278
191
|
}
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
192
|
+
}
|
193
|
+
}
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"sys": {
|
197
|
+
"space": {
|
198
|
+
"sys": {
|
199
|
+
"type": "Link",
|
200
|
+
"linkType": "Space",
|
201
|
+
"id": "cfexampleapi"
|
202
|
+
}
|
203
|
+
},
|
204
|
+
"id": "worriedcat",
|
205
|
+
"type": "Entry",
|
206
|
+
"createdAt": "2013-06-27T22:46:20.171Z",
|
207
|
+
"updatedAt": "2013-11-18T15:58:02.018Z",
|
208
|
+
"revision": 8,
|
209
|
+
"contentType": {
|
210
|
+
"sys": {
|
211
|
+
"type": "Link",
|
212
|
+
"linkType": "ContentType",
|
213
|
+
"id": "cat"
|
214
|
+
}
|
215
|
+
},
|
216
|
+
"locale": "en-US"
|
217
|
+
},
|
218
|
+
"fields": {
|
219
|
+
"name": "Worried Cat"
|
220
|
+
}
|
221
|
+
}
|
222
|
+
],
|
223
|
+
"Asset": [
|
224
|
+
{
|
225
|
+
"sys": {
|
226
|
+
"space": {
|
227
|
+
"sys": {
|
228
|
+
"type": "Link",
|
229
|
+
"linkType": "Space",
|
230
|
+
"id": "cfexampleapi"
|
231
|
+
}
|
232
|
+
},
|
233
|
+
"id": "happycat",
|
234
|
+
"type": "Asset",
|
235
|
+
"createdAt": "2013-09-02T14:56:34.267Z",
|
236
|
+
"updatedAt": "2013-09-02T15:11:24.361Z",
|
237
|
+
"revision": 2,
|
238
|
+
"locale": "en-US"
|
239
|
+
},
|
240
|
+
"fields": {
|
241
|
+
"title": "Happy Cat",
|
242
|
+
"file": {
|
243
|
+
"url": "//images.contentful.com/cfexampleapi/3MZPnjZTIskAIIkuuosCss/382a48dfa2cb16c47aa2c72f7b23bf09/happycatw.jpg",
|
244
|
+
"details": {
|
245
|
+
"size": 59939,
|
246
|
+
"image": {
|
247
|
+
"width": 273,
|
248
|
+
"height": 397
|
249
|
+
}
|
295
250
|
},
|
296
|
-
"
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
"updatedAt":"2013-09-02T14:56:34.240Z",
|
309
|
-
"locale":"en-US"
|
251
|
+
"fileName": "happycatw.jpg",
|
252
|
+
"contentType": "image/jpeg"
|
253
|
+
}
|
254
|
+
}
|
255
|
+
},
|
256
|
+
{
|
257
|
+
"sys": {
|
258
|
+
"space": {
|
259
|
+
"sys": {
|
260
|
+
"type": "Link",
|
261
|
+
"linkType": "Space",
|
262
|
+
"id": "cfexampleapi"
|
310
263
|
}
|
311
|
-
|
312
|
-
|
313
|
-
|
264
|
+
},
|
265
|
+
"id": "nyancat",
|
266
|
+
"type": "Asset",
|
267
|
+
"createdAt": "2013-09-02T14:56:34.240Z",
|
268
|
+
"updatedAt": "2013-09-02T14:56:34.240Z",
|
269
|
+
"revision": 1,
|
270
|
+
"locale": "en-US"
|
271
|
+
},
|
272
|
+
"fields": {
|
273
|
+
"title": "Nyan Cat",
|
274
|
+
"file": {
|
275
|
+
"url": "//images.contentful.com/cfexampleapi/4gp6taAwW4CmSgumq2ekUm/9da0cd1936871b8d72343e895a00d611/Nyan_cat_250px_frame.png",
|
276
|
+
"details": {
|
277
|
+
"size": 12273,
|
278
|
+
"image": {
|
279
|
+
"width": 250,
|
280
|
+
"height": 250
|
281
|
+
}
|
282
|
+
},
|
283
|
+
"fileName": "Nyan_cat_250px_frame.png",
|
284
|
+
"contentType": "image/png"
|
285
|
+
}
|
286
|
+
}
|
287
|
+
}
|
288
|
+
]
|
289
|
+
}
|
314
290
|
}
|
315
291
|
http_version:
|
316
|
-
recorded_at:
|
317
|
-
recorded_with: VCR
|
292
|
+
recorded_at: Thu, 05 Jan 2017 21:35:14 GMT
|
293
|
+
recorded_with: VCR 3.0.3
|