swiftype 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.travis.yml +6 -0
- data/Gemfile +1 -1
- data/README.md +202 -283
- data/lib/data/ca-bundle.crt +3554 -0
- data/lib/swiftype.rb +7 -31
- data/lib/swiftype/client.rb +439 -11
- data/lib/swiftype/configuration.rb +29 -4
- data/lib/swiftype/exceptions.rb +2 -0
- data/lib/swiftype/ext/backport-uri.rb +33 -0
- data/lib/swiftype/request.rb +88 -20
- data/lib/swiftype/result_set.rb +43 -6
- data/lib/swiftype/sso.rb +20 -0
- data/lib/swiftype/version.rb +1 -1
- data/spec/client_spec.rb +576 -0
- data/spec/configuration_spec.rb +36 -0
- data/spec/deprecated_spec.rb +20 -0
- data/spec/fixtures/vcr/analytics_autoselects.yml +55 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_document_type.yml +55 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_document_type_and_time_range.yml +55 -0
- data/spec/fixtures/vcr/analytics_autoselects_with_time_range.yml +55 -0
- data/spec/fixtures/vcr/analytics_clicks.yml +55 -0
- data/spec/fixtures/vcr/analytics_clicks_with_document_type.yml +55 -0
- data/spec/fixtures/vcr/analytics_clicks_with_document_type_and_time_range.yml +55 -0
- data/spec/fixtures/vcr/analytics_clicks_with_time_range.yml +55 -0
- data/spec/fixtures/vcr/analytics_searches.yml +55 -0
- data/spec/fixtures/vcr/analytics_searches_with_document_type_and_time_range.yml +55 -0
- data/spec/fixtures/vcr/analytics_searches_with_time_range.yml +55 -0
- data/spec/fixtures/vcr/analytics_searchs_with_document_type.yml +55 -0
- data/spec/fixtures/vcr/analytics_top_no_result_queries.yml +55 -0
- data/spec/fixtures/vcr/analytics_top_no_result_queries_paginated.yml +55 -0
- data/spec/fixtures/vcr/analytics_top_queries.yml +55 -0
- data/spec/fixtures/vcr/analytics_top_queries_paginated.yml +55 -0
- data/spec/fixtures/vcr/analytics_top_queries_too_large.yml +51 -0
- data/spec/fixtures/vcr/bulk_create_documents.yml +49 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_failure.yml +45 -0
- data/spec/fixtures/vcr/bulk_create_or_update_documents_success.yml +49 -0
- data/spec/fixtures/vcr/bulk_destroy_documents.yml +45 -0
- data/spec/fixtures/vcr/crawl_url.yml +45 -0
- data/spec/fixtures/vcr/create_document.yml +48 -0
- data/spec/fixtures/vcr/create_document_type.yml +45 -0
- data/spec/fixtures/vcr/create_domain.yml +45 -0
- data/spec/fixtures/vcr/create_engine.yml +45 -0
- data/spec/fixtures/vcr/create_or_update_document_create.yml +47 -0
- data/spec/fixtures/vcr/create_or_update_document_update.yml +47 -0
- data/spec/fixtures/vcr/create_user.yml +45 -0
- data/spec/fixtures/vcr/destroy_document.yml +41 -0
- data/spec/fixtures/vcr/destroy_document_type.yml +41 -0
- data/spec/fixtures/vcr/destroy_domain.yml +41 -0
- data/spec/fixtures/vcr/destroy_engine.yml +41 -0
- data/spec/fixtures/vcr/destroy_non_existent_document_type.yml +43 -0
- data/spec/fixtures/vcr/document_type_search.yml +60 -0
- data/spec/fixtures/vcr/document_type_search_pagination.yml +45 -0
- data/spec/fixtures/vcr/document_type_suggest.yml +50 -0
- data/spec/fixtures/vcr/document_type_suggest_pagination.yml +45 -0
- data/spec/fixtures/vcr/engine_search.yml +64 -0
- data/spec/fixtures/vcr/engine_search_facets.yml +162 -0
- data/spec/fixtures/vcr/engine_search_pagination.yml +45 -0
- data/spec/fixtures/vcr/engine_suggest.yml +52 -0
- data/spec/fixtures/vcr/engine_suggest_pagination.yml +45 -0
- data/spec/fixtures/vcr/find_document.yml +47 -0
- data/spec/fixtures/vcr/find_document_type.yml +45 -0
- data/spec/fixtures/vcr/find_domain.yml +45 -0
- data/spec/fixtures/vcr/find_domain_failure.yml +43 -0
- data/spec/fixtures/vcr/find_engine.yml +45 -0
- data/spec/fixtures/vcr/list_document_type.yml +45 -0
- data/spec/fixtures/vcr/list_documents.yml +68 -0
- data/spec/fixtures/vcr/list_documents_with_pagination.yml +68 -0
- data/spec/fixtures/vcr/list_domains.yml +45 -0
- data/spec/fixtures/vcr/list_engines.yml +46 -0
- data/spec/fixtures/vcr/list_users.yml +45 -0
- data/spec/fixtures/vcr/list_users_with_pagination.yml +45 -0
- data/spec/fixtures/vcr/log_clickthrough_failure.yml +43 -0
- data/spec/fixtures/vcr/log_clickthrough_success.yml +45 -0
- data/spec/fixtures/vcr/recrawl_domain_failure.yml +44 -0
- data/spec/fixtures/vcr/recrawl_domain_success.yml +45 -0
- data/spec/fixtures/vcr/show_user.yml +45 -0
- data/spec/fixtures/vcr/update_document.yml +47 -0
- data/spec/fixtures/vcr/update_document_unknown_field_failure.yml +45 -0
- data/spec/fixtures/vcr/update_documents_failure_non_existent_document.yml +45 -0
- data/spec/fixtures/vcr/update_documents_success.yml +45 -0
- data/spec/fixtures/vcr/users_client_secret_incorrect.yml +42 -0
- data/spec/fixtures/vcr/users_no_api_key.yml +42 -0
- data/spec/fixtures/vcr/users_no_client_id_or_secret.yml +43 -0
- data/spec/platform_spec.rb +95 -0
- data/spec/spec_helper.rb +26 -0
- data/spec/ssl_spec.rb +34 -0
- data/spec/sso_spec.rb +24 -0
- data/swiftype.gemspec +10 -11
- metadata +183 -52
- data/lib/swiftype/base_model.rb +0 -89
- data/lib/swiftype/connection.rb +0 -47
- data/lib/swiftype/document.rb +0 -17
- data/lib/swiftype/document_type.rb +0 -69
- data/lib/swiftype/easy.rb +0 -77
- data/lib/swiftype/engine.rb +0 -33
- data/lib/swiftype/search.rb +0 -23
@@ -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.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
|
+
- ! '"d4ddc5d4d5691709c01fd423ae8b7743"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTU5MjM3OGZiZDBmYjFhNDA2Mzk4NGU4NGEyNzc3YmM5BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--9e272659d4d78b91ca24a77389d3da60bff2143a;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 2c29b4fa4df592809e2d1a5052522194
|
34
|
+
X-Runtime:
|
35
|
+
- '0.042829'
|
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:45Z"}]'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 23:17:31 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines.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
|
+
- ! '"6f157adbf23af6b9bb0546228193603d"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk5OTA0ZjNmNjM4NTAwYjg3N2QzYzhhMjIxYTE5ZWEyBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3b73ac78f6e0b7fae3954979d536a6b2f39e17e6;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- a4f632b2818ff0e0c0a5de80a19829b6
|
34
|
+
X-Runtime:
|
35
|
+
- '0.197433'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '[{"name":"api-test","slug":"api-test","key":"vAWBdVfHeFZSxgEJwgVF","id":"51c1fcbd2ed960d45200000c","_id":"51c1fcbd2ed960d45200000c","updated_at":"2013-07-09T02:06:29Z","document_count":2},{"name":"articulate","slug":"articulate","key":"JKHB2u5fjLyhXLqiiiXg","id":"50ad44382ed960d73200000d","_id":"50ad44382ed960d73200000d","updated_at":"2013-07-09T02:06:29Z","document_count":0},{"name":"articulate
|
43
|
+
support","slug":"articulate-support","key":"X4jThg3nvrs5usN9fZ9g","id":"50819ba72ed9602079000004","_id":"50819ba72ed9602079000004","updated_at":"2013-07-09T02:06:29Z","document_count":1836},{"name":"biota","slug":"biota","key":"F1kK3BRmU77mLYPyGY7X","id":"518aa8e32ed960145200001b","_id":"518aa8e32ed960145200001b","updated_at":"2013-07-09T02:06:29Z","document_count":30},{"name":"bookstore","slug":"bookstore","key":"bookstore","id":"5090306a2ed960358200001b","_id":"5090306a2ed960358200001b","updated_at":"2013-07-09T02:06:30Z","document_count":21},{"name":"crawler","slug":"crawler","key":"3Lq7AzukeA1h5ta64oYX","id":"516f59112ed960d934000003","_id":"516f59112ed960d934000003","updated_at":"2013-07-09T02:06:30Z","document_count":2}]'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Thu, 12 Sep 2013 21:30:21 GMT
|
46
|
+
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/users.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240
|
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
|
+
- ! '"daf9596e877c78b8ff3264f5af845bea"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTIyODM3MTk0NzJhNGU1M2ZhZGExOGQ2MGMyM2RmZTZjBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--1318fb8cf52ee469dc559a17d8882194715c33c0;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 8e9d4bce7f2dbeff9fd9bbcdbd196f7e
|
34
|
+
X-Runtime:
|
35
|
+
- '0.044580'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '[{"id":"5230b8c82ed960ba2000001d","access_token":"0381294b7ef41db44fba20aad86a52d294b9fae67a26e85139d323eb78106706"},{"id":"5230c9c92ed960ba20000022","access_token":"e6998f8a36e29229198c77e6465f5d5271f9b60bf346654028c8241974f5d22d"},{"id":"5230fc6d2ed960ba20000026","access_token":"2565b0146bf79752ce7917d296f77614c1ebb5ffef28006e61927cd10d87968c"}]'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 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/users.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240&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
|
+
- ! '"d751713988987e9331980363e24189ce"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWY4ZTBmZDFkY2IxYzlmNDg3MmQ4NGNkZjExYmI3NmRlBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--2235d3b123ac9c7407cc1d4f7964d816f0948011;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 908b69372144b9a8e2c3014fd8f784b1
|
34
|
+
X-Runtime:
|
35
|
+
- '0.045036'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '[]'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/analytics/log_clickthrough.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"q":null,"id":"FtX8nswnUKU"}'
|
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: 400
|
19
|
+
message: Bad Request
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWFlOGQ0Yzg1Yjg5MDU4M2E0MjFiY2ZjYzgyZGViYTljBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--beefa75ecb409269e6210641c4ca982a3e865ac9;
|
29
|
+
path=/; HttpOnly
|
30
|
+
X-Request-Id:
|
31
|
+
- e078385a4d1d8982a0e84158c18442fd
|
32
|
+
X-Runtime:
|
33
|
+
- '0.032657'
|
34
|
+
Connection:
|
35
|
+
- close
|
36
|
+
Server:
|
37
|
+
- thin 1.5.0 codename Knife
|
38
|
+
body:
|
39
|
+
encoding: US-ASCII
|
40
|
+
string: ! ' '
|
41
|
+
http_version:
|
42
|
+
recorded_at: Thu, 12 Sep 2013 23:01:24 GMT
|
43
|
+
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/engines/swiftype-api-example/document_types/videos/analytics/log_clickthrough.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"q":"foo","id":"FtX8nswnUKU"}'
|
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
|
+
- ! '"7215ee9c7d9dc229d2921a40e899ec5f"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJThjMWQwNzc4ZjljMjJlNmJlOTU0NzgyYTM5OWUyMmU2BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--4d7dc75d8371e4ff995c8345280749c4e9dd2500;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- c674acf5da1089346b57f4ff2be52ba7
|
34
|
+
X-Runtime:
|
35
|
+
- '0.043841'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! ' '
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 23:00:17 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/51534c6e2ed960cc79000001/recrawl.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: 403
|
19
|
+
message: Forbidden
|
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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWRiNjMxNTIyMmE1YzBkZGQ3YjVlODk0Zjc3YWRhY2Y3BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3903145083ee009433e6491589e03425b6148b99;
|
29
|
+
path=/; HttpOnly
|
30
|
+
X-Request-Id:
|
31
|
+
- 72d38e905d05fceba85477f7daa8a884
|
32
|
+
X-Runtime:
|
33
|
+
- '0.037684'
|
34
|
+
Connection:
|
35
|
+
- close
|
36
|
+
Server:
|
37
|
+
- thin 1.5.0 codename Knife
|
38
|
+
body:
|
39
|
+
encoding: US-ASCII
|
40
|
+
string: ! '{"error":"You must wait at least 24 hours between forced crawls of
|
41
|
+
a domain."}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 12 Sep 2013 23:18:11 GMT
|
44
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/crawler-demo-site/domains/51534c6e2ed960cc79000001/recrawl.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=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTU3NzY5ZDdkNTczMWE3M2ZlNzYzM2UwYzYxZDY0NDA4BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--297355ac4365e74626d6fad5723a0b9e3040bbce;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 2ecfbbc7f75f38574762fd8de10e1289
|
34
|
+
X-Runtime:
|
35
|
+
- '0.173744'
|
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:31 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/users/5230b8c82ed960ba2000001d.json?client_id=0d94f7cf2bd1e65a7e1f9f929d1bcb2b248af69b8112d24484e87014125538f8&client_secret=f600fb0b16b516cbb9b9f0eeb60f3b35f685b5ec4a94694ae57b5bbb8860f240
|
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
|
+
- ! '"287d8777cdc43d5bc81fc46789fd568c"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWYyYjYzZTI3YjE4NWM5ZGZlOGNhNGMxODEwMWVjMDUzBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--0f60f350f59b58ccd69958c6dffc56cadd945f44;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- f32060d8af33e800aaf421fc8f252bd3
|
34
|
+
X-Runtime:
|
35
|
+
- '0.109367'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"id":"5230b8c82ed960ba2000001d","access_token":"0381294b7ef41db44fba20aad86a52d294b9fae67a26e85139d323eb78106706"}'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Fri, 13 Sep 2013 00:53:23 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/swiftype-api-example/document_types/videos/documents/FtX8nswnUKU/update_fields.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"fields":{"title":"awesome new title","channel_id":"UC5VA5j05FjETg-iLekcyiBw"}}'
|
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
|
+
- ! '"6700c44c03d4417c97bc50f69b6edd21"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTZkMDc4NjU2ZGQwMWZjN2MzNDM1ZGRjZDkyMzRlZDAxBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--a01d4013cdba077d3695886bededefd43470579c;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- ddc1aa098789c7bd0d536ab52f6f9dd7
|
34
|
+
X-Runtime:
|
35
|
+
- '0.044017'
|
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:40:58Z","url":"http://www.youtube.com/watch?v=FtX8nswnUKU","thumbnail_url":"https://i.ytimg.com/vi/FtX8nswnUKU/mqdefault.jpg","channel_id":"UC5VA5j05FjETg-iLekcyiBw","title":"awesome
|
43
|
+
new title","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:40:58 GMT
|
47
|
+
recorded_with: VCR 2.5.0
|