contentful-management 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.rubocop_todo.yml +2 -2
  4. data/CHANGELOG.md +27 -3
  5. data/README.md +34 -7
  6. data/lib/contentful/management/api_key.rb +4 -43
  7. data/lib/contentful/management/array.rb +1 -2
  8. data/lib/contentful/management/asset.rb +29 -191
  9. data/lib/contentful/management/client.rb +96 -7
  10. data/lib/contentful/management/client_api_key_methods_factory.rb +15 -0
  11. data/lib/contentful/management/client_asset_methods_factory.rb +13 -0
  12. data/lib/contentful/management/client_association_all_published_method_factory.rb +21 -0
  13. data/lib/contentful/management/client_association_methods_factory.rb +54 -0
  14. data/lib/contentful/management/client_content_type_methods_factory.rb +13 -0
  15. data/lib/contentful/management/client_entry_methods_factory.rb +21 -0
  16. data/lib/contentful/management/client_locale_methods_factory.rb +15 -0
  17. data/lib/contentful/management/client_space_methods_factory.rb +58 -0
  18. data/lib/contentful/management/client_webhook_methods_factory.rb +15 -0
  19. data/lib/contentful/management/content_type.rb +30 -151
  20. data/lib/contentful/management/content_type_entry_methods_factory.rb +9 -3
  21. data/lib/contentful/management/dynamic_entry.rb +20 -39
  22. data/lib/contentful/management/entry.rb +47 -182
  23. data/lib/contentful/management/http_client.rb +41 -8
  24. data/lib/contentful/management/locale.rb +7 -76
  25. data/lib/contentful/management/request.rb +3 -3
  26. data/lib/contentful/management/resource.rb +105 -7
  27. data/lib/contentful/management/resource/all_published.rb +24 -0
  28. data/lib/contentful/management/resource/archiver.rb +37 -0
  29. data/lib/contentful/management/resource/field_aware.rb +49 -29
  30. data/lib/contentful/management/resource/publisher.rb +37 -0
  31. data/lib/contentful/management/resource/refresher.rb +1 -1
  32. data/lib/contentful/management/resource_builder.rb +8 -4
  33. data/lib/contentful/management/resource_requester.rb +96 -0
  34. data/lib/contentful/management/space.rb +40 -43
  35. data/lib/contentful/management/space_association_all_published_method_factory.rb +1 -1
  36. data/lib/contentful/management/space_association_methods_factory.rb +6 -3
  37. data/lib/contentful/management/space_entry_methods_factory.rb +1 -1
  38. data/lib/contentful/management/version.rb +1 -1
  39. data/lib/contentful/management/webhook.rb +9 -82
  40. data/spec/fixtures/vcr_cassettes/asset/create.yml +1 -1
  41. data/spec/fixtures/vcr_cassettes/asset/create_with_locale.yml +1 -1
  42. data/spec/fixtures/vcr_cassettes/asset/process.yml +1 -1
  43. data/spec/fixtures/vcr_cassettes/asset/publish_after_create.yml +1 -1
  44. data/spec/fixtures/vcr_cassettes/content_type/create.yml +1 -1
  45. data/spec/fixtures/vcr_cassettes/content_type/create_with_Array_field.yml +1 -1
  46. data/spec/fixtures/vcr_cassettes/content_type/create_with_Boolean_field.yml +1 -1
  47. data/spec/fixtures/vcr_cassettes/content_type/create_with_Date_field.yml +1 -1
  48. data/spec/fixtures/vcr_cassettes/content_type/create_with_Integer_field.yml +1 -1
  49. data/spec/fixtures/vcr_cassettes/content_type/create_with_Link_field.yml +1 -1
  50. data/spec/fixtures/vcr_cassettes/content_type/create_with_Location_field.yml +1 -1
  51. data/spec/fixtures/vcr_cassettes/content_type/create_with_Number_field.yml +1 -1
  52. data/spec/fixtures/vcr_cassettes/content_type/create_with_Object_field.yml +1 -1
  53. data/spec/fixtures/vcr_cassettes/content_type/create_with_Symbol_field.yml +1 -1
  54. data/spec/fixtures/vcr_cassettes/content_type/create_with_Text_field.yml +1 -1
  55. data/spec/fixtures/vcr_cassettes/content_type/entry/create.yml +1 -1
  56. data/spec/fixtures/vcr_cassettes/content_type/entry/create_only_with_localized_fields.yml +1 -1
  57. data/spec/fixtures/vcr_cassettes/content_type/entry/create_to_single_locale_only_with_localized_fields.yml +1 -1
  58. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_camel_case_id_to_multiple_locales.yml +1 -1
  59. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries.yml +1 -1
  60. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries_for_multiple_locales.yml +1 -1
  61. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_multiple_locales.yml +1 -1
  62. data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_types.yml +1 -1
  63. data/spec/fixtures/vcr_cassettes/content_type/save_new.yml +1 -1
  64. data/spec/fixtures/vcr_cassettes/delete_request.yml +38 -0
  65. data/spec/fixtures/vcr_cassettes/entry/create.yml +1 -1
  66. data/spec/fixtures/vcr_cassettes/entry/create_with_asset.yml +1 -1
  67. data/spec/fixtures/vcr_cassettes/entry/create_with_assets.yml +1 -1
  68. data/spec/fixtures/vcr_cassettes/entry/create_with_entries.yml +1 -1
  69. data/spec/fixtures/vcr_cassettes/entry/create_with_entry.yml +1 -1
  70. data/spec/fixtures/vcr_cassettes/entry/create_with_just_id.yml +1 -1
  71. data/spec/fixtures/vcr_cassettes/entry/create_with_location.yml +1 -1
  72. data/spec/fixtures/vcr_cassettes/entry/create_with_specified_locale.yml +1 -1
  73. data/spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml +1 -1
  74. data/spec/fixtures/vcr_cassettes/entry/too_many_requests.yml +1 -1
  75. data/spec/fixtures/vcr_cassettes/entry/update_bool_field.yml +1 -1
  76. data/spec/fixtures/vcr_cassettes/post_request.yml +64 -0
  77. data/spec/fixtures/vcr_cassettes/proxy_request.yml +562 -0
  78. data/spec/fixtures/vcr_cassettes/put_request.yml +40 -0
  79. data/spec/fixtures/vcr_cassettes/space/asset/create.yml +1 -1
  80. data/spec/fixtures/vcr_cassettes/space/asset/create_with_multiple_locales.yml +1 -1
  81. data/spec/fixtures/vcr_cassettes/space/content_type/create.yml +1 -1
  82. data/spec/fixtures/vcr_cassettes/space/create_with_client_default_locale.yml +197 -36
  83. data/spec/fixtures/vcr_cassettes/space/webhook/create.yml +1 -1
  84. data/spec/lib/contentful/management/api_key_spec.rb +7 -1
  85. data/spec/lib/contentful/management/array_spec.rb +1 -1
  86. data/spec/lib/contentful/management/asset_spec.rb +52 -32
  87. data/spec/lib/contentful/management/client_spec.rb +38 -0
  88. data/spec/lib/contentful/management/content_type_spec.rb +37 -22
  89. data/spec/lib/contentful/management/entry_spec.rb +68 -57
  90. data/spec/lib/contentful/management/locale_spec.rb +7 -1
  91. data/spec/lib/contentful/management/space_spec.rb +9 -3
  92. data/spec/lib/contentful/management/webhook_spec.rb +11 -5
  93. metadata +23 -2
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets/
5
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"fields":{"title":{"pl-PL":"Title PL"},"description":{"pl-PL":"Description
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets/
5
+ uri: https://api.contentful.com/spaces/bfsvtul0c41g/assets
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"fields":{"title":{"en-US":"Asset title"},"description":{"en-US":"Description"},"file":{"en-US":{"contentType":"image/jpeg","fileName":"pic1.jpg","upload":"https://upload.wikimedia.org/wikipedia/commons/c/c7/Gasometer_Berlin_Sch%C3%B6neberg_2011.jpg"}}}}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/assets
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"fields":{"title":{"en-US":"titlebyCreateAPI"},"description":{"en-US":"descByAPI"},"file":{"en-US":{"contentType":"image/jpeg","fileName":"pic1.jpg","upload":"https://upload.wikimedia.org/wikipedia/commons/c/c7/Gasometer_Berlin_Sch%C3%B6neberg_2011.jpg"}}}}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Blog","description":"Blog content type","fields":[]}'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Array","description":"Content type with Array field","fields":[{"id":"my_Array_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Boolean","description":"Content type with Boolean field","fields":[{"id":"my_Boolean_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Date","description":"Content type with Date field","fields":[{"id":"my_Date_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Integer","description":"Content type with Integer field","fields":[{"id":"my_Integer_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Link","description":"Content type with Link field","fields":[{"id":"my_Link_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Location","description":"Content type with Location field","fields":[{"id":"my_Location_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Number","description":"Content type with Number field","fields":[{"id":"my_Number_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Object","description":"Content type with Object field","fields":[{"id":"my_Object_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Symbol","description":"Content type with Symbol field","fields":[{"id":"my_Symbol_field","name":"My
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
5
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"name":"Text","description":"Content type with Text field","fields":[{"id":"my_Text_field","name":"My
@@ -191,7 +191,7 @@ http_interactions:
191
191
  recorded_at: Fri, 01 Aug 2014 07:23:13 GMT
192
192
  - request:
193
193
  method: post
194
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
194
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
195
195
  body:
196
196
  encoding: UTF-8
197
197
  string: '{"fields":{"name":{"en-US":"Piotrek"}}}'
@@ -115,7 +115,7 @@ http_interactions:
115
115
  recorded_at: Tue, 02 Sep 2014 08:16:05 GMT
116
116
  - request:
117
117
  method: post
118
- uri: https://api.contentful.com/spaces/v2umtz8ths9v/entries/
118
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/entries
119
119
  body:
120
120
  encoding: UTF-8
121
121
  string: '{"fields":{"name":{"en-US":"Contentful EN","de-DE":"Contentful DE","pl-PL":"Contentful
@@ -115,7 +115,7 @@ http_interactions:
115
115
  recorded_at: Tue, 02 Sep 2014 08:31:00 GMT
116
116
  - request:
117
117
  method: post
118
- uri: https://api.contentful.com/spaces/v2umtz8ths9v/entries/
118
+ uri: https://api.contentful.com/spaces/v2umtz8ths9v/entries
119
119
  body:
120
120
  encoding: UTF-8
121
121
  string: '{"fields":{"name":{"en-US":"Some testing EN name","de-DE":"Some testing
@@ -130,7 +130,7 @@ http_interactions:
130
130
  recorded_at: Fri, 01 Aug 2014 11:25:32 GMT
131
131
  - request:
132
132
  method: post
133
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
133
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
134
134
  body:
135
135
  encoding: UTF-8
136
136
  string: '{"fields":{"carMark":{"en-US":"Mercedes Benz","pl":"Mercedes"},"carCityPlate":{"en-US":"en","pl":"bia"},"carCapacity":{"en-US":2.5,"pl":2.5}}}'
@@ -268,7 +268,7 @@ http_interactions:
268
268
  recorded_at: Mon, 04 Aug 2014 07:49:44 GMT
269
269
  - request:
270
270
  method: post
271
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
271
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
272
272
  body:
273
273
  encoding: UTF-8
274
274
  string: '{"fields":{"blog_name":{"en-US":"Piotrek"},"blog_entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}}},"blog_entries":{"en-US":[{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}},{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}},{"sys":{"type":"Link","linkType":"Entry","id":"Qa8TW5nPWgiU4MA6AGYgq"}}]}}}'
@@ -3010,7 +3010,7 @@ http_interactions:
3010
3010
  recorded_at: Mon, 04 Aug 2014 08:52:52 GMT
3011
3011
  - request:
3012
3012
  method: post
3013
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
3013
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
3014
3014
  body:
3015
3015
  encoding: UTF-8
3016
3016
  string: '{"fields":{"blog_name":{"en-US":"Contentful en","pl":"Contentful pl"},"blog_entries":{"en-US":[{"sys":{"type":"Link","linkType":"Entry","id":"664EPJ6zHqAeMO6O0mGggU"}},{"sys":{"type":"Link","linkType":"Entry","id":"664EPJ6zHqAeMO6O0mGggU"}}],"pl":[{"sys":{"type":"Link","linkType":"Entry","id":"664EPJ6zHqAeMO6O0mGggU"}},{"sys":{"type":"Link","linkType":"Entry","id":"664EPJ6zHqAeMO6O0mGggU"}}]},"blog_entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"664EPJ6zHqAeMO6O0mGggU"}},"pl":{"sys":{"type":"Link","linkType":"Entry","id":"664EPJ6zHqAeMO6O0mGggU"}}}}}'
@@ -128,7 +128,7 @@ http_interactions:
128
128
  recorded_at: Fri, 01 Aug 2014 09:48:27 GMT
129
129
  - request:
130
130
  method: post
131
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
131
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
132
132
  body:
133
133
  encoding: UTF-8
134
134
  string: '{"fields":{"post_title":{"en-US":"Company logo","pl":"Firmowe logo"},"post_body":{"en-US":"Story
@@ -144,7 +144,7 @@ http_interactions:
144
144
  recorded_at: Fri, 31 Oct 2014 09:27:37 GMT
145
145
  - request:
146
146
  method: post
147
- uri: https://api.contentful.com/spaces/2jtuu7nex6e6/content_types/
147
+ uri: https://api.contentful.com/spaces/2jtuu7nex6e6/content_types
148
148
  body:
149
149
  encoding: UTF-8
150
150
  string: '{"name":"Testing Content Types","description":"","fields":[{"id":"entries","name":"Entries","type":"Array","items":{"type":"Link","linkType":"Entry"}}]}'
@@ -784,7 +784,7 @@ http_interactions:
784
784
  recorded_at: Thu, 31 Jul 2014 10:19:50 GMT
785
785
  - request:
786
786
  method: post
787
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types/
787
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/content_types
788
788
  body:
789
789
  encoding: UTF-8
790
790
  string: '{"name":"Post title","description":"","fields":[{"id":"my_text_field","name":"My
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://example.com/?foo=bar
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Connection:
11
+ - close
12
+ Host:
13
+ - example.com
14
+ User-Agent:
15
+ - http.rb/0.9.8
16
+ response:
17
+ status:
18
+ code: 405
19
+ message: Method Not Allowed
20
+ headers:
21
+ Cache-Control:
22
+ - max-age=604800
23
+ Date:
24
+ - Fri, 11 Mar 2016 10:16:02 GMT
25
+ Expires:
26
+ - Fri, 18 Mar 2016 10:16:02 GMT
27
+ Server:
28
+ - EOS (lax004/45C0)
29
+ Content-Length:
30
+ - '0'
31
+ Connection:
32
+ - close
33
+ body:
34
+ encoding: UTF-8
35
+ string: ''
36
+ http_version:
37
+ recorded_at: Fri, 11 Mar 2016 10:16:01 GMT
38
+ recorded_with: VCR 2.9.3
@@ -396,7 +396,7 @@ http_interactions:
396
396
  recorded_at: Mon, 15 Sep 2014 09:10:55 GMT
397
397
  - request:
398
398
  method: post
399
- uri: https://api.contentful.com/spaces/ene4qtp2sh7u/entries/
399
+ uri: https://api.contentful.com/spaces/ene4qtp2sh7u/entries
400
400
  body:
401
401
  encoding: UTF-8
402
402
  string: '{"fields":{"name":{"en-US":"Test name"},"number":{"en-US":30},"float1":{"en-US":1.1},"boolean":{"en-US":true},"date":{"en-US":"2000-07-12T11:11:00+02:00"},"time":{"en-US":"2000-07-12T11:11:00+02:00"},"location":{"en-US":{"lat":22.44,"lon":33.33}},"file":{"en-US":{"sys":{"type":"Link","linkType":"Asset","id":"2oNoT3vSAs82SOIQmKe0KG"}}},"image":{"en-US":{"sys":{"type":"Link","linkType":"Asset","id":"2oNoT3vSAs82SOIQmKe0KG"}}},"array":{"en-US":["PL","USD","XX"]},"entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"60zYC7nY9GcKGiCYwAs4wm"}}},"entries":{"en-US":[{"sys":{"type":"Link","linkType":"Entry","id":"60zYC7nY9GcKGiCYwAs4wm"}},{"sys":{"type":"Link","linkType":"Entry","id":"60zYC7nY9GcKGiCYwAs4wm"}}]},"object_json":{"en-US":{"test":{"@type":"Codequest"}}}}}'
@@ -298,7 +298,7 @@ http_interactions:
298
298
  recorded_at: Thu, 31 Jul 2014 13:48:32 GMT
299
299
  - request:
300
300
  method: post
301
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
301
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
302
302
  body:
303
303
  encoding: UTF-8
304
304
  string: '{"fields":{"name":{"en-US":"OneAsset"},"asset":{"en-US":{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom"}}}}}'
@@ -298,7 +298,7 @@ http_interactions:
298
298
  recorded_at: Fri, 01 Aug 2014 08:55:42 GMT
299
299
  - request:
300
300
  method: post
301
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
301
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
302
302
  body:
303
303
  encoding: UTF-8
304
304
  string: '{"fields":{"name":{"en-US":"multiAssets"},"assets":{"en-US":[{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom"}},{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom"}},{"sys":{"type":"Link","linkType":"Asset","id":"codequest_id_test_custom"}}]}}}'
@@ -294,7 +294,7 @@ http_interactions:
294
294
  recorded_at: Thu, 31 Jul 2014 06:39:11 GMT
295
295
  - request:
296
296
  method: post
297
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
297
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
298
298
  body:
299
299
  encoding: UTF-8
300
300
  string: '{"fields":{"name":{"en-US":"EntryWithEntries"},"age":{"en-US":20},"entries":{"en-US":[{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}},{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}},{"sys":{"type":"Link","linkType":"Entry","id":"1d1QDYzeiyWmgqQYysae8u"}}]}}}'
@@ -385,7 +385,7 @@ http_interactions:
385
385
  recorded_at: Thu, 31 Jul 2014 06:36:07 GMT
386
386
  - request:
387
387
  method: post
388
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
388
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
389
389
  body:
390
390
  encoding: UTF-8
391
391
  string: '{"fields":{"name":{"en-US":"EntryWithEntry"},"age":{"en-US":20},"entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"4o6ghKSmSko4i828YCYaEo"}}}}}'
@@ -352,7 +352,7 @@ http_interactions:
352
352
  recorded_at: Thu, 19 Nov 2015 14:13:47 GMT
353
353
  - request:
354
354
  method: post
355
- uri: https://api.contentful.com/spaces/bbukbffokvih/entries/
355
+ uri: https://api.contentful.com/spaces/bbukbffokvih/entries
356
356
  body:
357
357
  encoding: UTF-8
358
358
  string: '{"fields":{}}'
@@ -154,7 +154,7 @@ http_interactions:
154
154
  recorded_at: Wed, 30 Jul 2014 13:18:00 GMT
155
155
  - request:
156
156
  method: post
157
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
157
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
158
158
  body:
159
159
  encoding: UTF-8
160
160
  string: '{"fields":{"name":{"en-US":"Tom Handy"},"age":{"en-US":30},"city":{"en-US":{"lat":22.44,"lon":33.33}}}}'
@@ -409,7 +409,7 @@ http_interactions:
409
409
  recorded_at: Sun, 17 Aug 2014 13:17:14 GMT
410
410
  - request:
411
411
  method: post
412
- uri: https://api.contentful.com/spaces/s37a4pe35l1x/entries/
412
+ uri: https://api.contentful.com/spaces/s37a4pe35l1x/entries
413
413
  body:
414
414
  encoding: UTF-8
415
415
  string: '{"fields":{"name":{"pl-PL":"Create test"},"description":{"pl-PL":"Test
@@ -169,7 +169,7 @@ http_interactions:
169
169
  recorded_at: Wed, 30 Jul 2014 13:34:25 GMT
170
170
  - request:
171
171
  method: post
172
- uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries/
172
+ uri: https://api.contentful.com/spaces/yr5m0jky5hsh/entries
173
173
  body:
174
174
  encoding: UTF-8
175
175
  string: '{"fields":{"name":{"en-US":"SymbolTest"},"symbols":{"en-US":["USD","PL","XX"]}}}'
@@ -562,7 +562,7 @@ http_interactions:
562
562
  recorded_at: Thu, 18 Dec 2014 12:21:25 GMT
563
563
  - request:
564
564
  method: post
565
- uri: https://api.contentful.com/spaces/286arvy86ry9/entries/
565
+ uri: https://api.contentful.com/spaces/286arvy86ry9/entries
566
566
  body:
567
567
  encoding: UTF-8
568
568
  string: '{"fields":{"name":{"en-US":"Create test"},"entry":{"en-US":{"sys":{"type":"Link","linkType":"Entry","id":"1YNepnMpXGiMWikaKC4GG0"}}}}}'
@@ -523,7 +523,7 @@ http_interactions:
523
523
  recorded_at: Wed, 03 Jun 2015 09:48:42 GMT
524
524
  - request:
525
525
  method: post
526
- uri: https://api.contentful.com/spaces/fujuvqn6zcl1/entries/
526
+ uri: https://api.contentful.com/spaces/fujuvqn6zcl1/entries
527
527
  body:
528
528
  encoding: UTF-8
529
529
  string: '{"fields":{"name":{"en-US":"Hello World"},"yolo":{"en-US":false}}}'
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"foo":"bar"}'
9
+ headers:
10
+ Connection:
11
+ - close
12
+ Content-Type:
13
+ - application/json
14
+ Host:
15
+ - example.com
16
+ User-Agent:
17
+ - http.rb/0.9.8
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Accept-Ranges:
24
+ - bytes
25
+ Cache-Control:
26
+ - max-age=604800
27
+ Content-Type:
28
+ - text/html
29
+ Date:
30
+ - Fri, 11 Mar 2016 10:16:02 GMT
31
+ Etag:
32
+ - '"359670651"'
33
+ Expires:
34
+ - Fri, 18 Mar 2016 10:16:02 GMT
35
+ Last-Modified:
36
+ - Fri, 09 Aug 2013 23:54:35 GMT
37
+ Server:
38
+ - EOS (lax004/45C0)
39
+ Content-Length:
40
+ - '1270'
41
+ Connection:
42
+ - close
43
+ body:
44
+ encoding: UTF-8
45
+ string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
46
+ \ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
47
+ charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
48
+ initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
49
+ #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: \"Open
50
+ Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n
51
+ \ div {\n width: 600px;\n margin: 5em auto;\n padding:
52
+ 50px;\n background-color: #fff;\n border-radius: 1em;\n }\n
53
+ \ a:link, a:visited {\n color: #38488f;\n text-decoration:
54
+ none;\n }\n @media (max-width: 700px) {\n body {\n background-color:
55
+ #fff;\n }\n div {\n width: auto;\n margin:
56
+ 0 auto;\n border-radius: 0;\n padding: 1em;\n }\n
57
+ \ }\n </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n
58
+ \ <p>This domain is established to be used for illustrative examples in
59
+ documents. You may use this\n domain in examples without prior coordination
60
+ or asking for permission.</p>\n <p><a href=\"http://www.iana.org/domains/example\">More
61
+ information...</a></p>\n</div>\n</body>\n</html>\n"
62
+ http_version:
63
+ recorded_at: Fri, 11 Mar 2016 10:16:01 GMT
64
+ recorded_with: VCR 2.9.3