contentful 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.README.md.swp +0 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/.travis.yml +10 -0
- data/ChangeLog.md +3 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +193 -0
- data/Rakefile +30 -0
- data/contentful.gemspec +31 -0
- data/do_request.sh +5 -0
- data/doc/Contentful.html +131 -0
- data/doc/Contentful/AccessDenied.html +158 -0
- data/doc/Contentful/Array.html +346 -0
- data/doc/Contentful/Asset.html +315 -0
- data/doc/Contentful/BadRequest.html +158 -0
- data/doc/Contentful/Client.html +1407 -0
- data/doc/Contentful/ContentType.html +183 -0
- data/doc/Contentful/DynamicEntry.html +333 -0
- data/doc/Contentful/Entry.html +198 -0
- data/doc/Contentful/Error.html +413 -0
- data/doc/Contentful/Field.html +161 -0
- data/doc/Contentful/File.html +160 -0
- data/doc/Contentful/Link.html +275 -0
- data/doc/Contentful/Locale.html +161 -0
- data/doc/Contentful/NotFound.html +158 -0
- data/doc/Contentful/Request.html +669 -0
- data/doc/Contentful/Resource.html +606 -0
- data/doc/Contentful/Resource/AssetFields.html +413 -0
- data/doc/Contentful/Resource/AssetFields/ClassMethods.html +174 -0
- data/doc/Contentful/Resource/ClassMethods.html +271 -0
- data/doc/Contentful/Resource/Fields.html +398 -0
- data/doc/Contentful/Resource/Fields/ClassMethods.html +187 -0
- data/doc/Contentful/Resource/SystemProperties.html +444 -0
- data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +174 -0
- data/doc/Contentful/ResourceBuilder.html +1400 -0
- data/doc/Contentful/Response.html +546 -0
- data/doc/Contentful/ServerError.html +158 -0
- data/doc/Contentful/Space.html +183 -0
- data/doc/Contentful/Support.html +198 -0
- data/doc/Contentful/Unauthorized.html +158 -0
- data/doc/Contentful/UnparsableJson.html +158 -0
- data/doc/Contentful/UnparsableResource.html +158 -0
- data/doc/_index.html +410 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.README.html +214 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +214 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +533 -0
- data/doc/top-level-namespace.html +112 -0
- data/examples/custom_classes.rb +43 -0
- data/examples/dynamic_entries.rb +126 -0
- data/examples/example_queries.rb +27 -0
- data/examples/raise_errors.rb +22 -0
- data/examples/raw_mode.rb +15 -0
- data/examples/resource_mapping.rb +33 -0
- data/lib/contentful.rb +3 -0
- data/lib/contentful/array.rb +47 -0
- data/lib/contentful/asset.rb +34 -0
- data/lib/contentful/client.rb +193 -0
- data/lib/contentful/content_type.rb +16 -0
- data/lib/contentful/dynamic_entry.rb +54 -0
- data/lib/contentful/entry.rb +12 -0
- data/lib/contentful/error.rb +52 -0
- data/lib/contentful/field.rb +16 -0
- data/lib/contentful/file.rb +13 -0
- data/lib/contentful/link.rb +20 -0
- data/lib/contentful/locale.rb +12 -0
- data/lib/contentful/location.rb +12 -0
- data/lib/contentful/request.rb +37 -0
- data/lib/contentful/resource.rb +146 -0
- data/lib/contentful/resource/asset_fields.rb +50 -0
- data/lib/contentful/resource/fields.rb +39 -0
- data/lib/contentful/resource/system_properties.rb +48 -0
- data/lib/contentful/resource_builder.rb +197 -0
- data/lib/contentful/response.rb +64 -0
- data/lib/contentful/space.rb +14 -0
- data/lib/contentful/support.rb +18 -0
- data/lib/contentful/version.rb +3 -0
- data/spec/array_spec.rb +69 -0
- data/spec/asset_spec.rb +62 -0
- data/spec/auto_includes_spec.rb +12 -0
- data/spec/client_class_spec.rb +59 -0
- data/spec/client_configuration_spec.rb +197 -0
- data/spec/coercions_spec.rb +10 -0
- data/spec/content_type_spec.rb +44 -0
- data/spec/dynamic_entry_spec.rb +34 -0
- data/spec/entry_spec.rb +53 -0
- data/spec/error_class_spec.rb +60 -0
- data/spec/error_requests_spec.rb +32 -0
- data/spec/field_spec.rb +36 -0
- data/spec/file_spec.rb +28 -0
- data/spec/fixtures/json_responses/content_type.json +83 -0
- data/spec/fixtures/json_responses/not_found.json +13 -0
- data/spec/fixtures/json_responses/nyancat.json +48 -0
- data/spec/fixtures/json_responses/unparsable.json +13 -0
- data/spec/fixtures/vcr_cassettes/array.yml +288 -0
- data/spec/fixtures/vcr_cassettes/array_page_1.yml +106 -0
- data/spec/fixtures/vcr_cassettes/array_page_2.yml +73 -0
- data/spec/fixtures/vcr_cassettes/asset.yml +96 -0
- data/spec/fixtures/vcr_cassettes/bad_request.yml +76 -0
- data/spec/fixtures/vcr_cassettes/content_type.yml +147 -0
- data/spec/fixtures/vcr_cassettes/entries.yml +561 -0
- data/spec/fixtures/vcr_cassettes/entry.yml +112 -0
- data/spec/fixtures/vcr_cassettes/entry_cache.yml +288 -0
- data/spec/fixtures/vcr_cassettes/field.yml +147 -0
- data/spec/fixtures/vcr_cassettes/locale.yml +81 -0
- data/spec/fixtures/vcr_cassettes/location.yml +305 -0
- data/spec/fixtures/vcr_cassettes/not_found.yml +71 -0
- data/spec/fixtures/vcr_cassettes/nyancat.yml +112 -0
- data/spec/fixtures/vcr_cassettes/nyancat_include.yml +112 -0
- data/spec/fixtures/vcr_cassettes/reloaded_entry.yml +112 -0
- data/spec/fixtures/vcr_cassettes/space.yml +81 -0
- data/spec/fixtures/vcr_cassettes/unauthorized.yml +64 -0
- data/spec/link_spec.rb +40 -0
- data/spec/locale_spec.rb +20 -0
- data/spec/location_spec.rb +30 -0
- data/spec/request_spec.rb +48 -0
- data/spec/resource_spec.rb +52 -0
- data/spec/response_spec.rb +50 -0
- data/spec/space_spec.rb +36 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/support/client.rb +6 -0
- data/spec/support/json_responses.rb +11 -0
- data/spec/support/vcr.rb +16 -0
- metadata +374 -0
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries/nyancat
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/0.1.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer b4c0n73n7fu1
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Host:
|
17
|
+
- cdn.contentful.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Wed, 05 Mar 2014 21:16:41 GMT
|
25
|
+
Server:
|
26
|
+
- nginx/1.1.19
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.contentful.delivery.v1+json
|
29
|
+
X-Contentful-Request-Id:
|
30
|
+
- 85f-830831812
|
31
|
+
Etag:
|
32
|
+
- "\"a9e11c59bf73598894bf05d4db7700cb\""
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Allow-Headers:
|
36
|
+
- 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
|
37
|
+
Access-Control-Allow-Methods:
|
38
|
+
- GET,HEAD,OPTIONS
|
39
|
+
Access-Control-Max-Age:
|
40
|
+
- '86400'
|
41
|
+
Cache-Control:
|
42
|
+
- max-age=0
|
43
|
+
Content-Length:
|
44
|
+
- '882'
|
45
|
+
Accept-Ranges:
|
46
|
+
- bytes
|
47
|
+
Via:
|
48
|
+
- 1.1 varnish
|
49
|
+
Age:
|
50
|
+
- '0'
|
51
|
+
X-Served-By:
|
52
|
+
- cache-fra1235-FRA
|
53
|
+
X-Cache:
|
54
|
+
- MISS
|
55
|
+
X-Cache-Hits:
|
56
|
+
- '0'
|
57
|
+
Vary:
|
58
|
+
- Accept-Encoding
|
59
|
+
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
|
+
}
|
110
|
+
http_version:
|
111
|
+
recorded_at: Wed, 05 Mar 2014 21:16:41 GMT
|
112
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries/nyancat?include=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/0.1.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer b4c0n73n7fu1
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Host:
|
17
|
+
- cdn.contentful.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Wed, 05 Mar 2014 21:15:55 GMT
|
25
|
+
Server:
|
26
|
+
- nginx/1.1.19
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.contentful.delivery.v1+json
|
29
|
+
X-Contentful-Request-Id:
|
30
|
+
- 85f-830831771
|
31
|
+
Etag:
|
32
|
+
- "\"a9e11c59bf73598894bf05d4db7700cb\""
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Allow-Headers:
|
36
|
+
- 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
|
37
|
+
Access-Control-Allow-Methods:
|
38
|
+
- GET,HEAD,OPTIONS
|
39
|
+
Access-Control-Max-Age:
|
40
|
+
- '86400'
|
41
|
+
Cache-Control:
|
42
|
+
- max-age=0
|
43
|
+
Content-Length:
|
44
|
+
- '882'
|
45
|
+
Accept-Ranges:
|
46
|
+
- bytes
|
47
|
+
Via:
|
48
|
+
- 1.1 varnish
|
49
|
+
Age:
|
50
|
+
- '0'
|
51
|
+
X-Served-By:
|
52
|
+
- cache-fra1227-FRA
|
53
|
+
X-Cache:
|
54
|
+
- MISS
|
55
|
+
X-Cache-Hits:
|
56
|
+
- '0'
|
57
|
+
Vary:
|
58
|
+
- Accept-Encoding
|
59
|
+
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
|
+
}
|
110
|
+
http_version:
|
111
|
+
recorded_at: Wed, 05 Mar 2014 21:15:55 GMT
|
112
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi/entries/nyancat
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/0.1.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer b4c0n73n7fu1
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Host:
|
17
|
+
- cdn.contentful.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Wed, 12 Mar 2014 23:25:44 GMT
|
25
|
+
Server:
|
26
|
+
- nginx/1.1.19
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.contentful.delivery.v1+json
|
29
|
+
X-Contentful-Request-Id:
|
30
|
+
- 85f-830971439
|
31
|
+
Etag:
|
32
|
+
- "\"a9e11c59bf73598894bf05d4db7700cb\""
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Allow-Headers:
|
36
|
+
- 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
|
37
|
+
Access-Control-Allow-Methods:
|
38
|
+
- GET,HEAD,OPTIONS
|
39
|
+
Access-Control-Max-Age:
|
40
|
+
- '86400'
|
41
|
+
Cache-Control:
|
42
|
+
- max-age=0
|
43
|
+
Content-Length:
|
44
|
+
- '882'
|
45
|
+
Accept-Ranges:
|
46
|
+
- bytes
|
47
|
+
Via:
|
48
|
+
- 1.1 varnish
|
49
|
+
Age:
|
50
|
+
- '0'
|
51
|
+
X-Served-By:
|
52
|
+
- cache-am77-AMS
|
53
|
+
X-Cache:
|
54
|
+
- MISS
|
55
|
+
X-Cache-Hits:
|
56
|
+
- '0'
|
57
|
+
Vary:
|
58
|
+
- Accept-Encoding
|
59
|
+
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
|
+
}
|
110
|
+
http_version:
|
111
|
+
recorded_at: Wed, 12 Mar 2014 23:25:43 GMT
|
112
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/cfexampleapi
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/0.1.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer b4c0n73n7fu1
|
14
|
+
Content-Type:
|
15
|
+
- application/vnd.contentful.delivery.v1+json
|
16
|
+
Host:
|
17
|
+
- cdn.contentful.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Wed, 05 Mar 2014 21:15:56 GMT
|
25
|
+
Server:
|
26
|
+
- nginx/1.1.19
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.contentful.delivery.v1+json
|
29
|
+
X-Contentful-Request-Id:
|
30
|
+
- 85f-830831773
|
31
|
+
Etag:
|
32
|
+
- "\"23e4b3361b063c545fdd9f7f4f97d825\""
|
33
|
+
Access-Control-Allow-Origin:
|
34
|
+
- "*"
|
35
|
+
Access-Control-Allow-Headers:
|
36
|
+
- 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
|
37
|
+
Access-Control-Allow-Methods:
|
38
|
+
- GET,HEAD,OPTIONS
|
39
|
+
Access-Control-Max-Age:
|
40
|
+
- '86400'
|
41
|
+
Cache-Control:
|
42
|
+
- max-age=0
|
43
|
+
Content-Length:
|
44
|
+
- '238'
|
45
|
+
Accept-Ranges:
|
46
|
+
- bytes
|
47
|
+
Via:
|
48
|
+
- 1.1 varnish
|
49
|
+
Age:
|
50
|
+
- '0'
|
51
|
+
X-Served-By:
|
52
|
+
- cache-fra1227-FRA
|
53
|
+
X-Cache:
|
54
|
+
- HIT
|
55
|
+
X-Cache-Hits:
|
56
|
+
- '1'
|
57
|
+
Vary:
|
58
|
+
- Accept-Encoding
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: |
|
62
|
+
{
|
63
|
+
"sys": {
|
64
|
+
"type": "Space",
|
65
|
+
"id": "cfexampleapi"
|
66
|
+
},
|
67
|
+
"name": "Contentful Example API",
|
68
|
+
"locales": [
|
69
|
+
{
|
70
|
+
"code": "en-US",
|
71
|
+
"name": "English"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"code": "tlh",
|
75
|
+
"name": "Klingon"
|
76
|
+
}
|
77
|
+
]
|
78
|
+
}
|
79
|
+
http_version:
|
80
|
+
recorded_at: Wed, 05 Mar 2014 21:15:56 GMT
|
81
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://cdn.contentful.com/spaces/wrong/entries/nyancat
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- RubyContentfulGem/0.1.0
|
12
|
+
Content-Type:
|
13
|
+
- application/vnd.contentful.delivery.v1+json
|
14
|
+
Authorization:
|
15
|
+
- Bearer credentials
|
16
|
+
Host:
|
17
|
+
- cdn.contentful.com
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 401
|
21
|
+
message: Unauthorized
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Sun, 02 Mar 2014 12:03:31 GMT
|
25
|
+
Server:
|
26
|
+
- nginx/1.1.19
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.contentful.delivery.v1+json
|
29
|
+
Access-Control-Allow-Origin:
|
30
|
+
- "*"
|
31
|
+
Access-Control-Allow-Headers:
|
32
|
+
- 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
|
33
|
+
Access-Control-Allow-Methods:
|
34
|
+
- GET,HEAD,OPTIONS
|
35
|
+
Access-Control-Max-Age:
|
36
|
+
- '86400'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0
|
39
|
+
Content-Length:
|
40
|
+
- '179'
|
41
|
+
Accept-Ranges:
|
42
|
+
- bytes
|
43
|
+
Via:
|
44
|
+
- 1.1 varnish
|
45
|
+
X-Served-By:
|
46
|
+
- cache-fra1235-FRA
|
47
|
+
X-Cache:
|
48
|
+
- MISS
|
49
|
+
X-Cache-Hits:
|
50
|
+
- '0'
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: |
|
54
|
+
{
|
55
|
+
"sys": {
|
56
|
+
"type": "Error",
|
57
|
+
"id": "AccessTokenInvalid"
|
58
|
+
},
|
59
|
+
"message": "The access token you sent could not be found or is invalid.",
|
60
|
+
"requestId": "85f-351082324"
|
61
|
+
}
|
62
|
+
http_version:
|
63
|
+
recorded_at: Sun, 02 Mar 2014 12:03:31 GMT
|
64
|
+
recorded_with: VCR 2.8.0
|