contentful 1.2.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/LICENSE.txt +1 -0
  4. data/README.md +8 -0
  5. data/contentful.gemspec +2 -1
  6. data/examples/custom_classes.rb +23 -26
  7. data/examples/raise_errors.rb +2 -2
  8. data/lib/contentful.rb +0 -1
  9. data/lib/contentful/array.rb +27 -19
  10. data/lib/contentful/array_like.rb +51 -0
  11. data/lib/contentful/asset.rb +43 -11
  12. data/lib/contentful/base_resource.rb +87 -0
  13. data/lib/contentful/client.rb +43 -34
  14. data/lib/contentful/coercions.rb +116 -0
  15. data/lib/contentful/content_type.rb +23 -8
  16. data/lib/contentful/content_type_cache.rb +26 -0
  17. data/lib/contentful/deleted_asset.rb +2 -5
  18. data/lib/contentful/deleted_entry.rb +2 -5
  19. data/lib/contentful/entry.rb +55 -33
  20. data/lib/contentful/error.rb +1 -1
  21. data/lib/contentful/field.rb +37 -9
  22. data/lib/contentful/fields_resource.rb +115 -0
  23. data/lib/contentful/file.rb +7 -8
  24. data/lib/contentful/link.rb +3 -6
  25. data/lib/contentful/locale.rb +6 -6
  26. data/lib/contentful/location.rb +7 -5
  27. data/lib/contentful/resource_builder.rb +72 -226
  28. data/lib/contentful/space.rb +16 -6
  29. data/lib/contentful/support.rb +41 -3
  30. data/lib/contentful/sync_page.rb +17 -10
  31. data/lib/contentful/version.rb +1 -1
  32. data/spec/array_spec.rb +4 -8
  33. data/spec/client_class_spec.rb +12 -23
  34. data/spec/client_configuration_spec.rb +13 -23
  35. data/spec/content_type_spec.rb +0 -5
  36. data/spec/entry_spec.rb +130 -125
  37. data/spec/error_requests_spec.rb +1 -1
  38. data/spec/field_spec.rb +0 -5
  39. data/spec/file_spec.rb +0 -5
  40. data/spec/fixtures/vcr_cassettes/entry.yml +54 -64
  41. data/spec/fixtures/vcr_cassettes/entry/include_resolution.yml +101 -0
  42. data/spec/fixtures/vcr_cassettes/entry/marshall.yml +227 -251
  43. data/spec/fixtures/vcr_cassettes/entry/raw.yml +88 -124
  44. data/spec/fixtures/vcr_cassettes/entry_locales.yml +56 -74
  45. data/spec/fixtures/vcr_cassettes/human.yml +63 -40
  46. data/spec/fixtures/vcr_cassettes/location.yml +99 -211
  47. data/spec/fixtures/vcr_cassettes/multi_locale_array_reference.yml +12 -16
  48. data/spec/fixtures/vcr_cassettes/not_found.yml +26 -21
  49. data/spec/fixtures/vcr_cassettes/nyancat.yml +53 -63
  50. data/spec/fixtures/vcr_cassettes/ratelimit.yml +1 -1
  51. data/spec/fixtures/vcr_cassettes/reloaded_entry.yml +54 -64
  52. data/spec/fixtures/vcr_cassettes/unauthorized.yml +1 -1
  53. data/spec/fixtures/vcr_cassettes/unavailable.yml +27 -15
  54. data/spec/link_spec.rb +3 -2
  55. data/spec/locale_spec.rb +0 -5
  56. data/spec/location_spec.rb +1 -6
  57. data/spec/request_spec.rb +3 -2
  58. data/spec/resource_building_spec.rb +10 -7
  59. data/spec/response_spec.rb +1 -1
  60. data/spec/space_spec.rb +0 -5
  61. data/spec/spec_helper.rb +3 -0
  62. data/spec/support/json_responses.rb +3 -3
  63. data/spec/sync_page_spec.rb +1 -6
  64. data/spec/sync_spec.rb +11 -7
  65. metadata +69 -20
  66. data/examples/dynamic_entries.rb +0 -124
  67. data/examples/resource_mapping.rb +0 -32
  68. data/lib/contentful/constants.rb +0 -504
  69. data/lib/contentful/dynamic_entry.rb +0 -57
  70. data/lib/contentful/resource.rb +0 -239
  71. data/lib/contentful/resource/array_like.rb +0 -39
  72. data/lib/contentful/resource/asset_fields.rb +0 -58
  73. data/lib/contentful/resource/custom_resource.rb +0 -29
  74. data/lib/contentful/resource/fields.rb +0 -73
  75. data/lib/contentful/resource/system_properties.rb +0 -55
  76. data/spec/coercions_spec.rb +0 -23
  77. data/spec/dynamic_entry_spec.rb +0 -75
  78. data/spec/resource_spec.rb +0 -79
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - RubyContentfulGem/1.0.1
11
+ - RubyContentfulGem/1.2.2
12
12
  Authorization:
13
13
  - Bearer 3e4560614990c9ac47343b9eea762bdaaebd845766f619660d7230787fd545e1
14
14
  Content-Type:
@@ -44,19 +44,17 @@ http_interactions:
44
44
  - W/"d88da8bd0b663c91b528c893d220e530"
45
45
  Server:
46
46
  - Contentful
47
- Strict-Transport-Security:
48
- - max-age=15768000
49
47
  X-Content-Type-Options:
50
48
  - nosniff
51
49
  - nosniff
52
50
  X-Contentful-Request-Id:
53
- - a0059b039268294c11c0f01a5debe341
51
+ - 4bfef527dcfdfd29345093a3880ae7b7
54
52
  Content-Length:
55
53
  - '466'
56
54
  Accept-Ranges:
57
55
  - bytes
58
56
  Date:
59
- - Wed, 05 Oct 2016 10:24:47 GMT
57
+ - Thu, 05 Jan 2017 20:41:38 GMT
60
58
  Via:
61
59
  - 1.1 varnish
62
60
  Age:
@@ -64,13 +62,13 @@ http_interactions:
64
62
  Connection:
65
63
  - close
66
64
  X-Served-By:
67
- - cache-gru7126-GRU
65
+ - cache-gru7122-GRU
68
66
  X-Cache:
69
67
  - MISS
70
68
  X-Cache-Hits:
71
69
  - '0'
72
70
  X-Timer:
73
- - S1475663087.088657,VS0,VE163
71
+ - S1483648898.163319,VS0,VE341
74
72
  Vary:
75
73
  - Accept-Encoding
76
74
  body:
@@ -88,7 +86,7 @@ http_interactions:
88
86
  OlzDP2iNxYFRagJyK/ot/7gJzLwb9jkx1M9jUaRrTtuU5ZLPKcHcjH0OfzPt
89
87
  HdXSqrfvfQFKIERWiQcAAA==
90
88
  http_version:
91
- recorded_at: Wed, 05 Oct 2016 10:24:47 GMT
89
+ recorded_at: Thu, 05 Jan 2017 20:41:38 GMT
92
90
  - request:
93
91
  method: get
94
92
  uri: https://cdn.contentful.com/spaces/cma9f9g4dxvs/entries?content_type=test&locale=*
@@ -97,7 +95,7 @@ http_interactions:
97
95
  string: ''
98
96
  headers:
99
97
  User-Agent:
100
- - RubyContentfulGem/1.0.1
98
+ - RubyContentfulGem/1.2.2
101
99
  Authorization:
102
100
  - Bearer 3e4560614990c9ac47343b9eea762bdaaebd845766f619660d7230787fd545e1
103
101
  Content-Type:
@@ -133,19 +131,17 @@ http_interactions:
133
131
  - W/"8edf1404b7716c31b2d3e1ee5e7bcf1d"
134
132
  Server:
135
133
  - Contentful
136
- Strict-Transport-Security:
137
- - max-age=15768000
138
134
  X-Content-Type-Options:
139
135
  - nosniff
140
136
  - nosniff
141
137
  X-Contentful-Request-Id:
142
- - 4971acf3134093597e6a745b405ba08e
138
+ - cf89553cf35875de7c416bee28f1266b
143
139
  Content-Length:
144
140
  - '1349'
145
141
  Accept-Ranges:
146
142
  - bytes
147
143
  Date:
148
- - Wed, 05 Oct 2016 10:24:47 GMT
144
+ - Thu, 05 Jan 2017 20:41:38 GMT
149
145
  Via:
150
146
  - 1.1 varnish
151
147
  Age:
@@ -153,13 +149,13 @@ http_interactions:
153
149
  Connection:
154
150
  - close
155
151
  X-Served-By:
156
- - cache-gru7121-GRU
152
+ - cache-gru7124-GRU
157
153
  X-Cache:
158
154
  - MISS
159
155
  X-Cache-Hits:
160
156
  - '0'
161
157
  X-Timer:
162
- - S1475663087.427541,VS0,VE185
158
+ - S1483648898.699738,VS0,VE290
163
159
  Vary:
164
160
  - Accept-Encoding
165
161
  body:
@@ -196,5 +192,5 @@ http_interactions:
196
192
  aFkGwmfRzmpo2AxgC1ETmYYBLA4LXrGDDnUdlTiUaCyHhsD9S+NBhbaW/g9B
197
193
  8dkXGqCqqqXJd2OkUhIoOuNFICAnkNV7rnD29xtvfzh4OPgFEE8NsqwhAAA=
198
194
  http_version:
199
- recorded_at: Wed, 05 Oct 2016 10:24:47 GMT
195
+ recorded_at: Thu, 05 Jan 2017 20:41:39 GMT
200
196
  recorded_with: VCR 3.0.3
@@ -2,17 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/entries/not%20found
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types/not%20found
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - RubyContentfulGem/0.1.1
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,52 +24,53 @@ http_interactions:
20
24
  code: 404
21
25
  message: Not Found
22
26
  headers:
23
- Date:
24
- - Wed, 16 Apr 2014 09:00:22 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
37
39
  Content-Type:
38
40
  - application/vnd.contentful.delivery.v1+json
41
+ Server:
42
+ - Contentful
43
+ X-Contentful-Request-Id:
44
+ - 77047700ec63ba7bdf3b4f3b66770004
39
45
  Content-Length:
40
- - '234'
46
+ - '150'
41
47
  Accept-Ranges:
42
48
  - bytes
49
+ Date:
50
+ - Tue, 20 Dec 2016 15:32:25 GMT
43
51
  Via:
44
52
  - 1.1 varnish
45
- Age:
46
- - '0'
53
+ Connection:
54
+ - close
47
55
  X-Served-By:
48
- - cache-fra1223-FRA
56
+ - cache-fra1234-FRA
49
57
  X-Cache:
50
58
  - MISS
51
59
  X-Cache-Hits:
52
60
  - '0'
61
+ X-Timer:
62
+ - S1482247945.558499,VS0,VE107
53
63
  body:
54
- encoding: UTF-8
64
+ encoding: ASCII-8BIT
55
65
  string: |
56
66
  {
57
67
  "sys": {
58
68
  "type": "Error",
59
69
  "id": "NotFound"
60
70
  },
61
- "details": {
62
- "type": "Entry",
63
- "space": "cfexampleapi",
64
- "id": "not found"
65
- },
66
- "message": "The resource could not be found.",
67
- "requestId": "71a-635716683"
71
+ "message": "Invalid resource id",
72
+ "requestId": "77047700ec63ba7bdf3b4f3b66770004"
68
73
  }
69
74
  http_version:
70
- recorded_at: Wed, 16 Apr 2014 09:00:22 GMT
71
- recorded_with: VCR 2.9.0
75
+ recorded_at: Tue, 20 Dec 2016 15:32:24 GMT
76
+ recorded_with: VCR 3.0.3
@@ -2,17 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/entries/nyancat
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/0.1.1
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:22 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
- - "\"a9e11c59bf73598894bf05d4db7700cb\""
44
+ - W/"9707115047cc402819250f844939b2aa"
45
+ Server:
46
+ - Contentful
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ - nosniff
41
50
  X-Contentful-Request-Id:
42
- - 71a-635712892
51
+ - 5d8c70a35f32dff1f29bff44068b19df
43
52
  Content-Length:
44
- - '882'
53
+ - '1034'
45
54
  Accept-Ranges:
46
55
  - bytes
56
+ Date:
57
+ - Tue, 20 Dec 2016 15:24:54 GMT
47
58
  Via:
48
59
  - 1.1 varnish
49
60
  Age:
50
61
  - '0'
62
+ Connection:
63
+ - close
51
64
  X-Served-By:
52
- - cache-am77-AMS
65
+ - cache-fra1248-FRA
53
66
  X-Cache:
54
67
  - MISS
55
68
  X-Cache-Hits:
56
69
  - '0'
70
+ X-Timer:
71
+ - S1482247493.638006,VS0,VE388
57
72
  Vary:
58
73
  - Accept-Encoding
59
74
  body:
60
- encoding: UTF-8
61
- string: |
62
- {
63
- "fields": {
64
- "name": "Nyan Cat",
65
- "likes": [
66
- "rainbows",
67
- "fish"
68
- ],
69
- "color": "rainbow",
70
- "bestFriend": {
71
- "sys": {
72
- "type": "Link",
73
- "linkType": "Entry",
74
- "id": "happycat"
75
- }
76
- },
77
- "birthday": "2011-04-04T22:00:00+00:00",
78
- "lives": 1337,
79
- "image": {
80
- "sys": {
81
- "type": "Link",
82
- "linkType": "Asset",
83
- "id": "nyancat"
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+1fr8oGYcDGCpDCfZ0C8k
81
+ LzNKSiaj6p7X/l3F2TxWY1OcSJEQrk3Ye/JrwauT3pFUlHCaLiUQFgIQL4C/
82
+ QMEKodj1YxjZHsSPusGxTIcG0QK4KxCJ0TGObIACw6Cin1nNDoVYwNNcTQ4F
83
+ pwVvIbgelnfavNOICmTeBDI7JCRT+USLxaeHzqDH2towmqXn9JP4WwXJlclH
84
+ gf/tnbkBGdvTc3K121URVqwPL7Wx9WLqenf28F8Ds+xQyRVaQ31f1rTmv1WM
85
+ FjJtrgfnMGFUoE2a7UhZnmSevYnmmlV8lwpaNjkGRb7IlBE5BoD4+6B+9WAy
86
+ 9lmhBTEO9PTOyfa6zFvWNdWJooXXsWg6ura1oaH8VftksSLJjqnyvdWlBsBO
87
+ Vc66MqEsM9oyOVI5ekFfRO9bCtNv5JzGCA3Vg9fZNEwBo69za5w71mW5QcCG
88
+ AdTVQ/g4FhwIFzBcQS/2whggG8BwYKJJTmh4Ni861wB5XnrOUJt0uYTwjAS1
89
+ B1urIBMyJNbqhOh3ydCBEqnEGGuRaE52lH5dH6strXRKawIkBx1aCdrKY9YA
90
+ d1aBroHtOJcuU/USsqYcAbyAYIHCFcIzcqQgawXJJMGEHl0j2ClV6lNoSnYH
91
+ 0fas7fjb/G930mqm/yklaYzslCSJggatoBt7foxdG/lGQSM2YixJoDHxYghj
92
+ 5NrYH6qYJknIyKEfoDlnvKlRZni+YapbLwak85Wshy3HYTJ7a7vVxM0xE6+5
93
+ ox8GDv7z8a/i+XF1X++X9/f74/FQ39W1g0NE3DDdEJSsoZ+4ARFvAdoEa4TX
94
+ GxA5XY6+2M/l1lAJ4UBKOWGZWTu1clazr9JjL4pwpKPUcH2SbarrhaV8JwxR
95
+ gIdmondH2XYnC1wcBdqBJi31A85QVjWtBPBjW9RdDMk8VyyFrPNc0u1MbdRV
96
+ D52z5y0yLjUdKhMXjmvIzNS1o5eZ9xcF4+uHmLS/no0Kru8goAverAlaAvac
97
+ HZloBFR3we6xrkHAiYq/TZ8f45+7LX1Oli9/u3f5w/aY/4fo/lPuRCkBSQoj
98
+ 7IcBXIdpgLCLaRh5BIDUh9CR/jyJ0vwJeaD88rSpRBLbZfEOKkI0wakmwUeh
99
+ Kc70VPTUrdp8zlQUjr2bit8b3SQrJQp6VTt3Vor215vXm/8BI5JeymkQAAA=
110
100
  http_version:
111
- recorded_at: Wed, 16 Apr 2014 09:00:22 GMT
112
- recorded_with: VCR 2.9.0
101
+ recorded_at: Tue, 20 Dec 2016 15:24:53 GMT
102
+ recorded_with: VCR 3.0.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/wrong/entries/nyancat
5
+ uri: https://cdn.contentful.com/spaces/wrong/entries?sys.id=nyancat
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,17 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/entries/nyancat
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/0.1.1
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:27 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
- - "\"a9e11c59bf73598894bf05d4db7700cb\""
44
+ - W/"9707115047cc402819250f844939b2aa"
45
+ Server:
46
+ - Contentful
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ - nosniff
41
50
  X-Contentful-Request-Id:
42
- - 71a-635712892
51
+ - 5d8c70a35f32dff1f29bff44068b19df
43
52
  Content-Length:
44
- - '882'
53
+ - '1034'
45
54
  Accept-Ranges:
46
55
  - bytes
56
+ Date:
57
+ - Tue, 20 Dec 2016 16:08:26 GMT
47
58
  Via:
48
59
  - 1.1 varnish
49
60
  Age:
50
- - '5'
61
+ - '2613'
62
+ Connection:
63
+ - close
51
64
  X-Served-By:
52
- - cache-am76-AMS
65
+ - cache-fra1246-FRA
53
66
  X-Cache:
54
67
  - HIT
55
68
  X-Cache-Hits:
56
69
  - '1'
70
+ X-Timer:
71
+ - S1482250106.761069,VS0,VE0
57
72
  Vary:
58
73
  - Accept-Encoding
59
74
  body:
60
- encoding: UTF-8
61
- string: |
62
- {
63
- "fields": {
64
- "name": "Nyan Cat",
65
- "likes": [
66
- "rainbows",
67
- "fish"
68
- ],
69
- "color": "rainbow",
70
- "bestFriend": {
71
- "sys": {
72
- "type": "Link",
73
- "linkType": "Entry",
74
- "id": "happycat"
75
- }
76
- },
77
- "birthday": "2011-04-04T22:00:00+00:00",
78
- "lives": 1337,
79
- "image": {
80
- "sys": {
81
- "type": "Link",
82
- "linkType": "Asset",
83
- "id": "nyancat"
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+1fr8oGYcDGCpDCfZ0C8k
81
+ LzNKSiaj6p7X/l3F2TxWY1OcSJEQrk3Ye/JrwauT3pFUlHCaLiUQFgIQL4C/
82
+ QMEKodj1YxjZHsSPusGxTIcG0QK4KxCJ0TGObIACw6Cin1nNDoVYwNNcTQ4F
83
+ pwVvIbgelnfavNOICmTeBDI7JCRT+USLxaeHzqDH2towmqXn9JP4WwXJlclH
84
+ gf/tnbkBGdvTc3K121URVqwPL7Wx9WLqenf28F8Ds+xQyRVaQ31f1rTmv1WM
85
+ FjJtrgfnMGFUoE2a7UhZnmSevYnmmlV8lwpaNjkGRb7IlBE5BoD4+6B+9WAy
86
+ 9lmhBTEO9PTOyfa6zFvWNdWJooXXsWg6ura1oaH8VftksSLJjqnyvdWlBsBO
87
+ Vc66MqEsM9oyOVI5ekFfRO9bCtNv5JzGCA3Vg9fZNEwBo69za5w71mW5QcCG
88
+ AdTVQ/g4FhwIFzBcQS/2whggG8BwYKJJTmh4Ni861wB5XnrOUJt0uYTwjAS1
89
+ B1urIBMyJNbqhOh3ydCBEqnEGGuRaE52lH5dH6strXRKawIkBx1aCdrKY9YA
90
+ d1aBroHtOJcuU/USsqYcAbyAYIHCFcIzcqQgawXJJMGEHl0j2ClV6lNoSnYH
91
+ 0fas7fjb/G930mqm/yklaYzslCSJggatoBt7foxdG/lGQSM2YixJoDHxYghj
92
+ 5NrYH6qYJknIyKEfoDlnvKlRZni+YapbLwak85Wshy3HYTJ7a7vVxM0xE6+5
93
+ ox8GDv7z8a/i+XF1X++X9/f74/FQ39W1g0NE3DDdEJSsoZ+4ARFvAdoEa4TX
94
+ GxA5XY6+2M/l1lAJ4UBKOWGZWTu1clazr9JjL4pwpKPUcH2SbarrhaV8JwxR
95
+ gIdmondH2XYnC1wcBdqBJi31A85QVjWtBPBjW9RdDMk8VyyFrPNc0u1MbdRV
96
+ D52z5y0yLjUdKhMXjmvIzNS1o5eZ9xcF4+uHmLS/no0Kru8goAverAlaAvac
97
+ HZloBFR3we6xrkHAiYq/TZ8f45+7LX1Oli9/u3f5w/aY/4fo/lPuRCkBSQoj
98
+ 7IcBXIdpgLCLaRh5BIDUh9CR/jyJ0vwJeaD88rSpRBLbZfEOKkI0wakmwUeh
99
+ Kc70VPTUrdp8zlQUjr2bit8b3SQrJQp6VTt3Vor215vXm/8BI5JeymkQAAA=
110
100
  http_version:
111
- recorded_at: Wed, 16 Apr 2014 09:00:27 GMT
112
- recorded_with: VCR 2.9.0
101
+ recorded_at: Tue, 20 Dec 2016 16:08:26 GMT
102
+ recorded_with: VCR 3.0.3