swiftype 0.0.5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/.gitignore +5 -0
  2. data/.travis.yml +6 -0
  3. data/Gemfile +1 -1
  4. data/README.md +202 -283
  5. data/lib/data/ca-bundle.crt +3554 -0
  6. data/lib/swiftype.rb +7 -31
  7. data/lib/swiftype/client.rb +439 -11
  8. data/lib/swiftype/configuration.rb +29 -4
  9. data/lib/swiftype/exceptions.rb +2 -0
  10. data/lib/swiftype/ext/backport-uri.rb +33 -0
  11. data/lib/swiftype/request.rb +88 -20
  12. data/lib/swiftype/result_set.rb +43 -6
  13. data/lib/swiftype/sso.rb +20 -0
  14. data/lib/swiftype/version.rb +1 -1
  15. data/spec/client_spec.rb +576 -0
  16. data/spec/configuration_spec.rb +36 -0
  17. data/spec/deprecated_spec.rb +20 -0
  18. data/spec/fixtures/vcr/analytics_autoselects.yml +55 -0
  19. data/spec/fixtures/vcr/analytics_autoselects_with_document_type.yml +55 -0
  20. data/spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml +55 -0
  21. data/spec/fixtures/vcr/analytics_autoselects_with_time_range.yml +55 -0
  22. data/spec/fixtures/vcr/analytics_clicks.yml +55 -0
  23. data/spec/fixtures/vcr/analytics_clicks_with_document_type.yml +55 -0
  24. data/spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml +55 -0
  25. data/spec/fixtures/vcr/analytics_clicks_with_time_range.yml +55 -0
  26. data/spec/fixtures/vcr/analytics_searches.yml +55 -0
  27. data/spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml +55 -0
  28. data/spec/fixtures/vcr/analytics_searches_with_time_range.yml +55 -0
  29. data/spec/fixtures/vcr/analytics_searchs_with_document_type.yml +55 -0
  30. data/spec/fixtures/vcr/analytics_top_no_result_queries.yml +55 -0
  31. data/spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml +55 -0
  32. data/spec/fixtures/vcr/analytics_top_queries.yml +55 -0
  33. data/spec/fixtures/vcr/analytics_top_queries_paginated.yml +55 -0
  34. data/spec/fixtures/vcr/analytics_top_queries_too_large.yml +51 -0
  35. data/spec/fixtures/vcr/bulk_create_documents.yml +49 -0
  36. data/spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml +45 -0
  37. data/spec/fixtures/vcr/bulk_create_or_update_documents_success.yml +49 -0
  38. data/spec/fixtures/vcr/bulk_destroy_documents.yml +45 -0
  39. data/spec/fixtures/vcr/crawl_url.yml +45 -0
  40. data/spec/fixtures/vcr/create_document.yml +48 -0
  41. data/spec/fixtures/vcr/create_document_type.yml +45 -0
  42. data/spec/fixtures/vcr/create_domain.yml +45 -0
  43. data/spec/fixtures/vcr/create_engine.yml +45 -0
  44. data/spec/fixtures/vcr/create_or_update_document_create.yml +47 -0
  45. data/spec/fixtures/vcr/create_or_update_document_update.yml +47 -0
  46. data/spec/fixtures/vcr/create_user.yml +45 -0
  47. data/spec/fixtures/vcr/destroy_document.yml +41 -0
  48. data/spec/fixtures/vcr/destroy_document_type.yml +41 -0
  49. data/spec/fixtures/vcr/destroy_domain.yml +41 -0
  50. data/spec/fixtures/vcr/destroy_engine.yml +41 -0
  51. data/spec/fixtures/vcr/destroy_non_existent_document_type.yml +43 -0
  52. data/spec/fixtures/vcr/document_type_search.yml +60 -0
  53. data/spec/fixtures/vcr/document_type_search_pagination.yml +45 -0
  54. data/spec/fixtures/vcr/document_type_suggest.yml +50 -0
  55. data/spec/fixtures/vcr/document_type_suggest_pagination.yml +45 -0
  56. data/spec/fixtures/vcr/engine_search.yml +64 -0
  57. data/spec/fixtures/vcr/engine_search_facets.yml +162 -0
  58. data/spec/fixtures/vcr/engine_search_pagination.yml +45 -0
  59. data/spec/fixtures/vcr/engine_suggest.yml +52 -0
  60. data/spec/fixtures/vcr/engine_suggest_pagination.yml +45 -0
  61. data/spec/fixtures/vcr/find_document.yml +47 -0
  62. data/spec/fixtures/vcr/find_document_type.yml +45 -0
  63. data/spec/fixtures/vcr/find_domain.yml +45 -0
  64. data/spec/fixtures/vcr/find_domain_failure.yml +43 -0
  65. data/spec/fixtures/vcr/find_engine.yml +45 -0
  66. data/spec/fixtures/vcr/list_document_type.yml +45 -0
  67. data/spec/fixtures/vcr/list_documents.yml +68 -0
  68. data/spec/fixtures/vcr/list_documents_with_pagination.yml +68 -0
  69. data/spec/fixtures/vcr/list_domains.yml +45 -0
  70. data/spec/fixtures/vcr/list_engines.yml +46 -0
  71. data/spec/fixtures/vcr/list_users.yml +45 -0
  72. data/spec/fixtures/vcr/list_users_with_pagination.yml +45 -0
  73. data/spec/fixtures/vcr/log_clickthrough_failure.yml +43 -0
  74. data/spec/fixtures/vcr/log_clickthrough_success.yml +45 -0
  75. data/spec/fixtures/vcr/recrawl_domain_failure.yml +44 -0
  76. data/spec/fixtures/vcr/recrawl_domain_success.yml +45 -0
  77. data/spec/fixtures/vcr/show_user.yml +45 -0
  78. data/spec/fixtures/vcr/update_document.yml +47 -0
  79. data/spec/fixtures/vcr/update_document_unknown_field_failure.yml +45 -0
  80. data/spec/fixtures/vcr/update_documents_failure_non_existent_document.yml +45 -0
  81. data/spec/fixtures/vcr/update_documents_success.yml +45 -0
  82. data/spec/fixtures/vcr/users_client_secret_incorrect.yml +42 -0
  83. data/spec/fixtures/vcr/users_no_api_key.yml +42 -0
  84. data/spec/fixtures/vcr/users_no_client_id_or_secret.yml +43 -0
  85. data/spec/platform_spec.rb +95 -0
  86. data/spec/spec_helper.rb +26 -0
  87. data/spec/ssl_spec.rb +34 -0
  88. data/spec/sso_spec.rb +24 -0
  89. data/swiftype.gemspec +10 -11
  90. metadata +183 -52
  91. data/lib/swiftype/base_model.rb +0 -89
  92. data/lib/swiftype/connection.rb +0 -47
  93. data/lib/swiftype/document.rb +0 -17
  94. data/lib/swiftype/document_type.rb +0 -69
  95. data/lib/swiftype/easy.rb +0 -77
  96. data/lib/swiftype/engine.rb +0 -33
  97. data/lib/swiftype/search.rb +0 -23
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://hello:@localhost:3000/api/v1/engines.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"engine":{"name":"new engine from spec"}}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Ua-Compatible:
24
+ - IE=Edge
25
+ Etag:
26
+ - ! '"f022b16e11b2d1d15380ed8f23f78c8c"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTA3ZThlODdjZjI1ZmI1MzU4ODY3YjQzMTFjN2FhMGI4BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--c43d6fb40ab9e64c5c31d1f16e708a305817fc57;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 57c41803f457a67906a4e3f2e844140e
34
+ X-Runtime:
35
+ - '0.068736'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"name":"new engine from spec","slug":"new-engine-from-spec","key":"wpJr9UJKygVyzEVN7GvM","id":"5232326c2ed9605898000033","_id":"5232326c2ed9605898000033","updated_at":"2013-09-12T21:30:20Z","document_count":0}'
43
+ http_version:
44
+ recorded_at: Thu, 12 Sep 2013 21:30:20 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents/create_or_update.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"document":{"external_id":"foobar","fields":[{"type":"string","name":"title","value":"new
9
+ document"}]}}'
10
+ headers:
11
+ Accept:
12
+ - ! '*/*'
13
+ User-Agent:
14
+ - Swiftype-Ruby/1.0.0
15
+ Content-Type:
16
+ - application/json
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Content-Type:
23
+ - application/json; charset=utf-8
24
+ X-Ua-Compatible:
25
+ - IE=Edge
26
+ Etag:
27
+ - ! '"3763bb197507514eb8ac090998b3deb3"'
28
+ Cache-Control:
29
+ - max-age=0, private, must-revalidate
30
+ Set-Cookie:
31
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWFiYTAxYjJhYzJhOTdlNDY0M2QzMjg4ZjNhMmIzNTNhBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--0a519708383944dfc4d388112b215f9cd2e62319;
32
+ path=/; HttpOnly
33
+ X-Request-Id:
34
+ - ba5e1e5a3e53e6fc25a07f64d86e16b5
35
+ X-Runtime:
36
+ - '0.065348'
37
+ Connection:
38
+ - close
39
+ Server:
40
+ - thin 1.5.0 codename Knife
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! '{"external_id":"foobar","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"52323fe92ed960589800003a","_id":"52323fe92ed960589800003a","updated_at":"2013-09-12T22:27:53Z","title":"new
44
+ document"}'
45
+ http_version:
46
+ recorded_at: Thu, 12 Sep 2013 22:27:53 GMT
47
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents/create_or_update.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"document":{"external_id":"FtX8nswnUKU","fields":[{"type":"string","name":"title","value":"new
9
+ title"}]}}'
10
+ headers:
11
+ Accept:
12
+ - ! '*/*'
13
+ User-Agent:
14
+ - Swiftype-Ruby/1.0.0
15
+ Content-Type:
16
+ - application/json
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Content-Type:
23
+ - application/json; charset=utf-8
24
+ X-Ua-Compatible:
25
+ - IE=Edge
26
+ Etag:
27
+ - ! '"488aba5c2ad2a659d05843295a3498fc"'
28
+ Cache-Control:
29
+ - max-age=0, private, must-revalidate
30
+ Set-Cookie:
31
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTE4YzllZGM2YmZiNTZkYzYyZmQ0NjE3ZGNiOGJkNWNhBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--64335e3c3b784178b315963cd727aa9aef214cc4;
32
+ path=/; HttpOnly
33
+ X-Request-Id:
34
+ - 8d4b593a1091399681f7a24e63497363
35
+ X-Runtime:
36
+ - '0.041548'
37
+ Connection:
38
+ - close
39
+ Server:
40
+ - thin 1.5.0 codename Knife
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! '{"external_id":"FtX8nswnUKU","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231eb2ed9605898000027","_id":"523231eb2ed9605898000027","updated_at":"2013-09-12T22:42:28Z","title":"new
44
+ title"}'
45
+ http_version:
46
+ recorded_at: Thu, 12 Sep 2013 22:42:28 GMT
47
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://hello:@localhost:3000/api/v1/users.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"client_id":"0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8","client_secret":"f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240"}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Ua-Compatible:
24
+ - IE=Edge
25
+ Etag:
26
+ - ! '"f667288357fd5b6401e78f25c6bc7216"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTVlZDQ4ZjdmNjZmNjRjMGI2NjllMzI5ZDdmN2JlZTY1BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--65fe1f516fe61490759edfc961a4d6793df541fb;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 1d5d3cb5f037bc9533615229314a6772
34
+ X-Runtime:
35
+ - '0.242698'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":"523262032ed960589800004b","access_token":"06feb198d229d781f53a9f2e9747569e3494d3a5a6a90687231847462063911c"}'
43
+ http_version:
44
+ recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents/INscMGmhmX4.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Cache-Control:
24
+ - no-cache
25
+ Set-Cookie:
26
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJThiZGQ1MDkyNGQ0MjMyMDA2NWVjMmJjMDMxMmRjNzdmBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--91735a6824ba6c6e0b26bb7ba687d4dcf057a16e;
27
+ path=/; HttpOnly
28
+ X-Request-Id:
29
+ - 5f57953bef26af9f39e7bc0309c77420
30
+ X-Runtime:
31
+ - '0.059379'
32
+ Connection:
33
+ - close
34
+ Server:
35
+ - thin 1.5.0 codename Knife
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
39
+ http_version:
40
+ recorded_at: Thu, 12 Sep 2013 22:15:17 GMT
41
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/new-doc-type.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Cache-Control:
24
+ - no-cache
25
+ Set-Cookie:
26
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJThiMTA5ODM1MzYzMGIzNWYyYzA0NTE0NTBhZjc0NjExBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--bfb00f5e3c15f13ff47e9f6540a212bd33e6d9c5;
27
+ path=/; HttpOnly
28
+ X-Request-Id:
29
+ - 9d450a01b3860197cf381d4451cd41e3
30
+ X-Runtime:
31
+ - '0.040484'
32
+ Connection:
33
+ - close
34
+ Server:
35
+ - thin 1.5.0 codename Knife
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
39
+ http_version:
40
+ recorded_at: Thu, 12 Sep 2013 23:04:28 GMT
41
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/52324b132ed960589800004a.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Cache-Control:
24
+ - no-cache
25
+ Set-Cookie:
26
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWMzOTdiNGMxMjUxZmY3ZDNkYjQ3MDM1NTRhYTUyZTRkBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--bf52b2401dd088e203b2563c423f090ea98fcb49;
27
+ path=/; HttpOnly
28
+ X-Request-Id:
29
+ - 405af179e6dfd3b14eddf67cd913f14d
30
+ X-Runtime:
31
+ - '0.055119'
32
+ Connection:
33
+ - close
34
+ Server:
35
+ - thin 1.5.0 codename Knife
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
39
+ http_version:
40
+ recorded_at: Thu, 12 Sep 2013 23:17:13 GMT
41
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,41 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://hello:@localhost:3000/api/v1/engines/new-engine-from-spec.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ X-Ua-Compatible:
22
+ - IE=Edge
23
+ Cache-Control:
24
+ - no-cache
25
+ Set-Cookie:
26
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTE4OGYyZjY0Nzg1MzBkOWQxNjNiMjViZGNhZjEwNTU0BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--db98175a56618c07340907ef4fefb602c5d46b99;
27
+ path=/; HttpOnly
28
+ X-Request-Id:
29
+ - dbb2f1acc3dd9647226d7c17316de7d8
30
+ X-Runtime:
31
+ - '0.052098'
32
+ Connection:
33
+ - close
34
+ Server:
35
+ - thin 1.5.0 codename Knife
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
39
+ http_version:
40
+ recorded_at: Thu, 12 Sep 2013 21:30:21 GMT
41
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/not_there.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 404
19
+ message: Not Found
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Ua-Compatible:
24
+ - IE=Edge
25
+ Cache-Control:
26
+ - no-cache
27
+ Set-Cookie:
28
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTdhMDI0OGRhYmRkM2M0ZDJlNDRhMzFiODQ2YTg2MzM3BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--7ea19453061a0c033d6be77318d2546897670234;
29
+ path=/; HttpOnly
30
+ X-Request-Id:
31
+ - 3a21cf4a6c541ccc2e02f5ad51b35c15
32
+ X-Runtime:
33
+ - '0.037767'
34
+ Connection:
35
+ - close
36
+ Server:
37
+ - thin 1.5.0 codename Knife
38
+ body:
39
+ encoding: US-ASCII
40
+ string: ! '{"error":"Record not found. No entity with id ''not_there''"}'
41
+ http_version:
42
+ recorded_at: Thu, 12 Sep 2013 21:30:19 GMT
43
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,60 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/search.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"q":"cat"}'
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Swiftype-Ruby/1.0.0
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Ua-Compatible:
24
+ - IE=Edge
25
+ Etag:
26
+ - ! '"6c2dbb3f37bd448cfe9a99c0d2efa091"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQ3MmEzNzU3ZTk3YTc0ZjUxODVkMGQ1ZWJlNGQ5MDMyBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--eb803d773ab13fc6f3d33f73954dc4892fc8dc03;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 69889a2a2016d5388428991397b2c5c4
34
+ X-Runtime:
35
+ - '0.082285'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"records":{"videos":[{"external_id":"QH2-TGUlwu4","category_id":"23","caption":"For
43
+ PJ.\n\nCheck out Nyan Cat at http://nyan.cat/\nOfficial Nyan Cat Facebook:
44
+ http://www.facebook.com/NyanCatWorld\nNyan Cat on Twitter: https://twitter.com/nyannyancat\n\nNyan
45
+ Cat Store: http://nyancat.cat/store.html\n\nGIF by PRguitarman http://www.prguitarman.com/index.php?id=348\nSong
46
+ by Daniwell-P/Momone Momo UTAU http://momolabo.lolipop.jp/nyancatsong/Nyan/\n***used
47
+ with permission; I own neither***","channel_id":"UC3VHfy8e1jbDnT5TG2pjP1w","url":"http://www.youtube.com/watch?v=QH2-TGUlwu4","published_at":"2011-04-06T03:21:59Z","thumbnail_url":"https://i.ytimg.com/vi/QH2-TGUlwu4/mqdefault.jpg","title":"Nyan
48
+ Cat [original]","duration":217,"updated_at":"2013-09-12T21:28:13Z","category_name":"Comedy","like_count":711548,"view_count":93258193,"id":"523231ed2ed9605898000028","_score":1.1538672,"_type":"523231e62ed9605898000020","_index":"51b92f982ed960a844000248","_version":null,"sort":null,"highlight":{"title":"Nyan
49
+ <em>Cat</em> [original]","caption":"For PJ.\n\nCheck out Nyan <em>Cat</em>
50
+ at http://nyan.<em>cat</em>/\nOfficial Nyan <em>Cat</em> Facebook: http://www.facebook.com/Nyan<em>Cat</em>World\nNyan
51
+ <em>Cat</em> on Twitter: https://twitter.com/nyannyancat\n\nNyan <em>Cat</em>
52
+ Store: http://nyancat.<em>cat</em>/store.html\n\nGIF by PRguitarman http://www.prguitarman.com/index.php?id=348\nSong
53
+ by Daniwell-P/Momone"},"_explanation":null},{"external_id":"ik5sdwYZ01Q","category_id":"15","caption":"Best
54
+ Harlem Shake Ever. No Ads.","channel_id":"UCiTvufmbsDlYeZ9JOVtiYYQ","url":"http://www.youtube.com/watch?v=ik5sdwYZ01Q","published_at":"2013-02-20T02:37:53Z","thumbnail_url":"https://i.ytimg.com/vi/FHtvDA0W34I/mqdefault.jpg","title":"Grumpy
55
+ Cat Does The Harlem Shake (Ad Free)","duration":18,"updated_at":"2013-09-12T21:28:16Z","category_name":"Pets
56
+ & Animals","like_count":1014,"view_count":125939,"id":"523231f02ed960589800002c","_score":0.86540043,"_type":"523231e62ed9605898000020","_index":"51b92f982ed960a844000248","_version":null,"sort":null,"highlight":{"title":"Grumpy
57
+ <em>Cat</em> Does The Harlem Shake (Ad Free)"},"_explanation":null}]},"info":{"videos":{"query":"cat","current_page":1,"num_pages":1,"per_page":20,"total_result_count":2,"facets":{}}},"errors":{}}'
58
+ http_version:
59
+ recorded_at: Thu, 12 Sep 2013 21:30:20 GMT
60
+ recorded_with: VCR 2.5.0