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/swiftype-api-example/suggest.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"q":"goo","page":2}'
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
+ - ! '"3808268d101ef1017e4abf36ab55aa2e"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQyZmJkMTcyMTEwN2U0ZDcwNjZjOTI4MTMwMGI5Y2I4BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--21e3ec1874607815193e8c7793a3e9974144075b;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 04b206c0beb9fb36b8ea6f8109c61dd7
34
+ X-Runtime:
35
+ - '0.183618'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"record_count":0,"records":{"videos":[],"channels":[]},"info":{"videos":{"query":"goo","current_page":2,"num_pages":1,"per_page":10,"total_result_count":1},"channels":{"query":"goo","current_page":2,"num_pages":1,"per_page":10,"total_result_count":1}},"errors":{}}'
43
+ http_version:
44
+ recorded_at: Thu, 12 Sep 2013 21:30:21 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents/FtX8nswnUKU.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: 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
+ - ! '"c589a7e58252eb4b44fc53be90e8785e"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTAzODA2YzIxZGVhM2IwMTUyZWI3ODRiMDI5ZjVmOGZjBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--b6dd76eda13f42b331847ee3b70a5d16ba2e3155;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - fb0984f666b77726158616bbeb5638c2
34
+ X-Runtime:
35
+ - '0.034305'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"external_id":"FtX8nswnUKU","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231eb2ed9605898000027","_id":"523231eb2ed9605898000027","updated_at":"2013-09-12T22:42:51Z","url":"http://www.youtube.com/watch?v=FtX8nswnUKU","thumbnail_url":"https://i.ytimg.com/vi/FtX8nswnUKU/mqdefault.jpg","channel_id":"UC0c2TaeQY5VRMltq5Z2TQMA","title":"kittens
43
+ inspired by kittens","caption":"http://www.facebook.com/pages/Kittens-Inspired-by-Kittens/49930012799","category_name":"Pets
44
+ & Animals","category_id":"15","published_at":"2008-09-01T14:25:17Z","duration":92,"view_count":17228767,"like_count":47388}'
45
+ http_version:
46
+ recorded_at: Thu, 12 Sep 2013 22:43:05 GMT
47
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos.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: 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
+ - ! '"c0b8e0a96ec5b4216a0f7059ea47b93a"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQxMTkxOGJhNGY5MDNlMzljMmIyNGExYWM4OWE1MmMyBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--7c4487a9697246fbe8f2bf96762f0e24d886601c;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - b8db67ee444cb38bd096d9887d3347b8
34
+ X-Runtime:
35
+ - '0.037643'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":"523231e62ed9605898000020","name":"videos","slug":"videos","engine_id":"51b92f982ed960a844000248","updated_at":"2013-09-12T21:28:13Z","document_count":12,"field_mapping":{"external_id":"enum","updated_at":"date","url":"enum","thumbnail_url":"enum","channel_id":"enum","title":"string","caption":"text","category_name":"string","category_id":"enum","published_at":"date","duration":"integer","view_count":"integer","like_count":"integer","tags":"string"}}'
43
+ http_version:
44
+ recorded_at: Thu, 12 Sep 2013 21:30:19 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/51534c6e2ed960cc79000001.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: 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
+ - ! '"c7ea64ce75482ff6c299922bcd87b7af"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTI0ZTgzZjYyNjZiZDMwOWIyZDhiYjE5ZWE4NmIxNGFlBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--65ede0a4cc89f4446d351e20a92bccf6d14bffba;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 20c1f48621e18c7baf28ced390f38fc3
34
+ X-Runtime:
35
+ - '0.051562'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":"51534c6e2ed960cc79000001","engine_id":"51534c502ed960a1e6000005","submitted_url":"http://crawler-demo-site.herokuapp.com/","start_crawl_url":"http://crawler-demo-site.herokuapp.com/","crawling":false,"document_count":5,"updated_at":"2013-09-12T23:15:31Z"}'
43
+ http_version:
44
+ recorded_at: Thu, 12 Sep 2013 23:15:33 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/bogus.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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTRiMzg0MzhjMzJkMDVlY2I5ZjE2MjhlOTIzNTc0NDMzBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--a9fafafb9de8c13294cfb4508ea5c77c6a692c84;
29
+ path=/; HttpOnly
30
+ X-Request-Id:
31
+ - 6667ca52cfefd21bdb16b46f32d52e21
32
+ X-Runtime:
33
+ - '0.161114'
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 ''bogus''"}'
41
+ http_version:
42
+ recorded_at: Thu, 12 Sep 2013 23:15:33 GMT
43
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example.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: 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
+ - ! '"08e8d7974722c9259634cc6cff0bd5cf"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTMwOTRmZjJiZTY3Njc3MDVjM2UxMjBjOWQ2ODFkMzdmBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--536b127b7e0ad758d2436b429e3a76dad68b8119;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 8e42dc4c230e9212e6754ccff7e1a04f
34
+ X-Runtime:
35
+ - '0.038173'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"name":"swiftype-api-example","slug":"swiftype-api-example","key":"88LCBKWrZnbQgyqzdefX","id":"51b92f982ed960a844000248","_id":"51b92f982ed960a844000248","updated_at":"2013-09-12T20:39:02Z","document_count":36}'
43
+ http_version:
44
+ recorded_at: Thu, 12 Sep 2013 21:30:20 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types.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: 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
+ - ! '"4374411a4b29635b19346e2fae4a4761"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTYxN2EyOGEzNzM3ZDQwZDAzYjA1MmY4YzY3ZTBmZjVlBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--ac4885951e99ca51ab5666fd79e27bb1bb705fd4;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - 30c047178b2bad4a36470cfe5e36aeab
34
+ X-Runtime:
35
+ - '0.057562'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '[{"id":"523231e62ed9605898000020","name":"videos","slug":"videos","engine_id":"51b92f982ed960a844000248","updated_at":"2013-09-12T21:28:13Z","document_count":12,"field_mapping":{"external_id":"enum","updated_at":"date","url":"enum","thumbnail_url":"enum","channel_id":"enum","title":"string","caption":"text","category_name":"string","category_id":"enum","published_at":"date","duration":"integer","view_count":"integer","like_count":"integer","tags":"string"}},{"id":"51b92f992ed960a84400024b","name":"channels","slug":"channels","engine_id":"51b92f982ed960a844000248","updated_at":"2013-06-13T02:34:16Z","document_count":12,"field_mapping":{"external_id":"enum","updated_at":"date","url":"enum","thumbnail_url":"enum","title":"string","description":"string","published_at":"date","view_count":"integer","subscriber_count":"integer","video_count":"integer"}}]'
43
+ http_version:
44
+ recorded_at: Thu, 12 Sep 2013 21:30:20 GMT
45
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents.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: 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
+ - ! '"6a9a170b4de7756b0f1371b0ba3f04fe"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTU4MjEyNDMxNGI0NDkwMzMyMzYzYTliYTY4OWM4YzgzBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--9e994b3c88ee82371f7525b8f0bd53584ee7fdee;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - a1da222a29ca8afc26bf5ed4a63dcc03
34
+ X-Runtime:
35
+ - '0.045269'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '[{"external_id":"C8Wu3Bps9ic","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231ea2ed9605898000025","_id":"523231ea2ed9605898000025","updated_at":"2013-09-12T21:28:10Z","url":"http://www.youtube.com/watch?v=C8Wu3Bps9ic","thumbnail_url":"https://i.ytimg.com/vi/C8Wu3Bps9ic/mqdefault.jpg","channel_id":"UCfLGZs8bSDbkNJjCRIE7NSg","title":"Meatball
43
+ Massacre - Regular Ordinary Swedish Meal Time","caption":"Swedish Meatballs.
44
+ They are good for you.\r\n\r\nLingonsylt are for Swedish nationalists. WE
45
+ DONT LIKE THAT\r\n\r\n\r\nEnjoy.\r\n\r\n\r\n( Greyish sometimes to compensate
46
+ for bad lighting, deal with it haters )\r\n\r\nLove us on Facebook http://www.facebook.com/pages/Regular-Ordinary-Swedish-Meal-Time/166173596761030
47
+ \r\nand Twitter: http://twitter.com/SwedishMealTime","category_name":"Comedy","category_id":"23","published_at":"2011-01-13T21:48:04Z","duration":199,"view_count":5565896,"like_count":30139},{"external_id":"FHtvDA0W34I","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231eb2ed9605898000026","_id":"523231eb2ed9605898000026","updated_at":"2013-09-12T21:28:11Z","url":"http://www.youtube.com/watch?v=FHtvDA0W34I","thumbnail_url":"https://i.ytimg.com/vi/FHtvDA0W34I/mqdefault.jpg","channel_id":"UCblfuW_4rakIf2h6aqANefA","title":"Felix
48
+ Baumgartner''s supersonic freefall from 128k'' - Mission Highlights","caption":"Song:
49
+ http://smarturl.it/tafreespacedout\n\nAfter flying to an altitude of 39,045
50
+ meters (128,100 feet) in a helium-filled balloon, Felix Baumgartner completed
51
+ a record breaking jump for the ages from the edge of space, exactly 65 years
52
+ after Chuck Yeager first broke the sound barrier flying in an experimental
53
+ rocket-powered airplane. Felix reached a maximum of speed of 1,357.6 km/h
54
+ or 843.6 mph(Mach 1.25) through the near vacuum of the stratosphere before
55
+ being slowed by the atmosphere later during his 4:20 minute long freefall.
56
+ The 43-year-old Austrian skydiving expert also broke two other world records
57
+ (highest freefall, highest manned balloon flight), leaving the one for the
58
+ longest freefall to project mentor Col. Joe Kittinger.\n\nWatch the Full Recap:
59
+ http://www.youtube.com/watch?v=dOoHArAzdug\n\nhttp://www.redbullstratos.com\n___________________________________________________________\n\nExperience
60
+ the world of Red Bull like you have never seen it before. With the best action
61
+ sports clips on the web and YouTube exclusive series, prepare for your \"stoke
62
+ factor\" to be at an all time high.\n\nRed Bull on Facebook: http://win.gs/redbullfb\n\nRed
63
+ Bull on Twitter: http://win.gs/redbulltwitter\n\nSubscribe to Red Bull on
64
+ Youtube: http://www.youtube.com/subscription_center?add_user=redbull","category_name":"Science
65
+ & Technology","category_id":"28","published_at":"2012-10-15T00:06:53Z","duration":91,"view_count":32874417,"like_count":127463}]'
66
+ http_version:
67
+ recorded_at: Thu, 12 Sep 2013 21:30:21 GMT
68
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents.json?page=2&per_page=2
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: 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
+ - ! '"6a9a170b4de7756b0f1371b0ba3f04fe"'
27
+ Cache-Control:
28
+ - max-age=0, private, must-revalidate
29
+ Set-Cookie:
30
+ - _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTU4MjEyNDMxNGI0NDkwMzMyMzYzYTliYTY4OWM4YzgzBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--9e994b3c88ee82371f7525b8f0bd53584ee7fdee;
31
+ path=/; HttpOnly
32
+ X-Request-Id:
33
+ - a1da222a29ca8afc26bf5ed4a63dcc03
34
+ X-Runtime:
35
+ - '0.045269'
36
+ Connection:
37
+ - close
38
+ Server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '[{"external_id":"C8Wu3Bps9ic","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231ea2ed9605898000025","_id":"523231ea2ed9605898000025","updated_at":"2013-09-12T21:28:10Z","url":"http://www.youtube.com/watch?v=C8Wu3Bps9ic","thumbnail_url":"https://i.ytimg.com/vi/C8Wu3Bps9ic/mqdefault.jpg","channel_id":"UCfLGZs8bSDbkNJjCRIE7NSg","title":"Meatball
43
+ Massacre - Regular Ordinary Swedish Meal Time","caption":"Swedish Meatballs.
44
+ They are good for you.\r\n\r\nLingonsylt are for Swedish nationalists. WE
45
+ DONT LIKE THAT\r\n\r\n\r\nEnjoy.\r\n\r\n\r\n( Greyish sometimes to compensate
46
+ for bad lighting, deal with it haters )\r\n\r\nLove us on Facebook http://www.facebook.com/pages/Regular-Ordinary-Swedish-Meal-Time/166173596761030
47
+ \r\nand Twitter: http://twitter.com/SwedishMealTime","category_name":"Comedy","category_id":"23","published_at":"2011-01-13T21:48:04Z","duration":199,"view_count":5565896,"like_count":30139},{"external_id":"FHtvDA0W34I","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"523231eb2ed9605898000026","_id":"523231eb2ed9605898000026","updated_at":"2013-09-12T21:28:11Z","url":"http://www.youtube.com/watch?v=FHtvDA0W34I","thumbnail_url":"https://i.ytimg.com/vi/FHtvDA0W34I/mqdefault.jpg","channel_id":"UCblfuW_4rakIf2h6aqANefA","title":"Felix
48
+ Baumgartner''s supersonic freefall from 128k'' - Mission Highlights","caption":"Song:
49
+ http://smarturl.it/tafreespacedout\n\nAfter flying to an altitude of 39,045
50
+ meters (128,100 feet) in a helium-filled balloon, Felix Baumgartner completed
51
+ a record breaking jump for the ages from the edge of space, exactly 65 years
52
+ after Chuck Yeager first broke the sound barrier flying in an experimental
53
+ rocket-powered airplane. Felix reached a maximum of speed of 1,357.6 km/h
54
+ or 843.6 mph(Mach 1.25) through the near vacuum of the stratosphere before
55
+ being slowed by the atmosphere later during his 4:20 minute long freefall.
56
+ The 43-year-old Austrian skydiving expert also broke two other world records
57
+ (highest freefall, highest manned balloon flight), leaving the one for the
58
+ longest freefall to project mentor Col. Joe Kittinger.\n\nWatch the Full Recap:
59
+ http://www.youtube.com/watch?v=dOoHArAzdug\n\nhttp://www.redbullstratos.com\n___________________________________________________________\n\nExperience
60
+ the world of Red Bull like you have never seen it before. With the best action
61
+ sports clips on the web and YouTube exclusive series, prepare for your \"stoke
62
+ factor\" to be at an all time high.\n\nRed Bull on Facebook: http://win.gs/redbullfb\n\nRed
63
+ Bull on Twitter: http://win.gs/redbulltwitter\n\nSubscribe to Red Bull on
64
+ Youtube: http://www.youtube.com/subscription_center?add_user=redbull","category_name":"Science
65
+ & Technology","category_id":"28","published_at":"2012-10-15T00:06:53Z","duration":91,"view_count":32874417,"like_count":127463}]'
66
+ http_version:
67
+ recorded_at: Thu, 12 Sep 2013 21:30:21 GMT
68
+ recorded_with: VCR 2.5.0