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,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/top_queries.json?end_date=2013-08-30&page=2&per_page=5&start_date=2013-08-01
|
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
|
+
Server:
|
22
|
+
- ngx_openresty/1.2.7.8
|
23
|
+
Date:
|
24
|
+
- Fri, 13 Sep 2013 00:32:18 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
Status:
|
34
|
+
- 200 OK
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- IE=Edge,chrome=1
|
37
|
+
Etag:
|
38
|
+
- ! '"5fdb334ef4f784fd2d86705c37a8d0cc"'
|
39
|
+
Cache-Control:
|
40
|
+
- must-revalidate, private, max-age=0
|
41
|
+
Set-Cookie:
|
42
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTMzMDM2MTBmY2U2OGQwNmYzMTI5ZDAzYWM4NzIyZmQxBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--4cda11a28565dd7de97f454d03a733638e66b33f;
|
43
|
+
path=/; HttpOnly; secure
|
44
|
+
X-Request-Id:
|
45
|
+
- 0313a1fd582b4aac934d3c87d50734f7
|
46
|
+
X-Runtime:
|
47
|
+
- '0.157479'
|
48
|
+
X-Rack-Cache:
|
49
|
+
- miss
|
50
|
+
body:
|
51
|
+
encoding: US-ASCII
|
52
|
+
string: ! '[["no simple victory",1],["email",1],["orgainizer",1],["rhodes",1],["rails",1]]'
|
53
|
+
http_version:
|
54
|
+
recorded_at: Fri, 13 Sep 2013 00:32:18 GMT
|
55
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://hello:@localhost:3000/api/v1/engines/recursion/analytics/top_queries.json?end_date=2013-05-01&start_date=2013-01-01
|
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: 400
|
19
|
+
message: Bad Request
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- ngx_openresty/1.2.7.8
|
23
|
+
Date:
|
24
|
+
- Fri, 13 Sep 2013 00:28:00 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Status:
|
32
|
+
- 400 Bad Request
|
33
|
+
X-Ua-Compatible:
|
34
|
+
- IE=Edge,chrome=1
|
35
|
+
Cache-Control:
|
36
|
+
- no-cache, private
|
37
|
+
Set-Cookie:
|
38
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTJmNDg0Y2NlMzk4MTFkYWNhZWJlYmFlMjZjZTA4MzE2BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRT6oFg9uoiHqsAAABSSIiJDJhJDEwJE1CYU9abE5nbU01T3hvMFI1Zy5Cay4GOwBU--ee8e4b90fe459f11a1ae8fee20beccf95cdb20e5;
|
39
|
+
path=/; HttpOnly; secure
|
40
|
+
X-Request-Id:
|
41
|
+
- 6684093a9fd6738cd5b178f4d93f5646
|
42
|
+
X-Runtime:
|
43
|
+
- '0.038821'
|
44
|
+
X-Rack-Cache:
|
45
|
+
- miss
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: ! '{"error":"The time range you specified was invalid."}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Fri, 13 Sep 2013 00:28:00 GMT
|
51
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,49 @@
|
|
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/bulk_create.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":[{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
9
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
10
|
+
& Animals","type":"string"}]},{"external_id":"XfY9Dsg_DZk","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=XfY9Dsg_DZk","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/XfY9Dsg_DZk/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UC5VA5j05FjETg-iLekcyiBw","type":"enum"},{"name":"title","value":"Corgi
|
11
|
+
talks to cat","type":"string"},{"name":"category_name","value":"Pets &
|
12
|
+
Animals","type":"string"}]}]}'
|
13
|
+
headers:
|
14
|
+
Accept:
|
15
|
+
- ! '*/*'
|
16
|
+
User-Agent:
|
17
|
+
- Swiftype-Ruby/1.0.0
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge
|
29
|
+
Etag:
|
30
|
+
- ! '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Set-Cookie:
|
34
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTAyNzczMTcxNDQ4NTNhOTFmNzQ4ZTdmM2Q0NzgxMzExBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--e90d34cab433a83a8ed1d54094fdfb83b6c67c67;
|
35
|
+
path=/; HttpOnly
|
36
|
+
X-Request-Id:
|
37
|
+
- 6a704401ec81b3b2c8cb11fe94984c20
|
38
|
+
X-Runtime:
|
39
|
+
- '0.076536'
|
40
|
+
Connection:
|
41
|
+
- close
|
42
|
+
Server:
|
43
|
+
- thin 1.5.0 codename Knife
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: ! '[true,true]'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Thu, 12 Sep 2013 22:15:47 GMT
|
49
|
+
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/documents/bulk_create_or_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":[{"external_id":"failed_doc","fields":[{"type":"string","name":"title"}]}]}'
|
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
|
+
- ! '"f9e544f77b7eac7add281ef28ca5559f"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJThjNDk5YmQxMTEyZTU0MDBiZmYxOTYxMGI3ZmYzODFiBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3787337087e1f0ec731c085bbbe0bd22d2804241;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 51c5ede927c6333db4197ef2405edd28
|
34
|
+
X-Runtime:
|
35
|
+
- '0.051252'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '[false]'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 22:32:45 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,49 @@
|
|
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/bulk_create_or_update.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":[{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
9
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
10
|
+
& Animals","type":"string"}]},{"external_id":"XfY9Dsg_DZk","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=XfY9Dsg_DZk","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/XfY9Dsg_DZk/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UC5VA5j05FjETg-iLekcyiBw","type":"enum"},{"name":"title","value":"Corgi
|
11
|
+
talks to cat","type":"string"},{"name":"category_name","value":"Pets &
|
12
|
+
Animals","type":"string"}]}]}'
|
13
|
+
headers:
|
14
|
+
Accept:
|
15
|
+
- ! '*/*'
|
16
|
+
User-Agent:
|
17
|
+
- Swiftype-Ruby/1.0.0
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge
|
29
|
+
Etag:
|
30
|
+
- ! '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Set-Cookie:
|
34
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWZjMDZlMjgwODhkMjBjYmExMDg2MWExZmE0MjBhZDdmBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--0d16dbc7fe243021edb77914496d4c38ef6c9234;
|
35
|
+
path=/; HttpOnly
|
36
|
+
X-Request-Id:
|
37
|
+
- 2a2a08cdc513d3c2b2f961e23096e889
|
38
|
+
X-Runtime:
|
39
|
+
- '0.052437'
|
40
|
+
Connection:
|
41
|
+
- close
|
42
|
+
Server:
|
43
|
+
- thin 1.5.0 codename Knife
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: ! '[true,true]'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Thu, 12 Sep 2013 22:49:55 GMT
|
49
|
+
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/documents/bulk_destroy.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"documents":["INscMGmhmX4","XfY9Dsg_DZk"]}'
|
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
|
+
- ! '"bb009c6dcb5c622766ad5aa1ea1562d9"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWIwZDEyODVlMmNmODIxMTc1MjBiNTM5NjliOWQxYzJiBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--e8672e5b1559fdd8875cf451cf58a8f5f867dabd;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 64753c2ee65f4e1f64fe25f5afc63e71
|
34
|
+
X-Runtime:
|
35
|
+
- '0.193708'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '[true,true]'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 22:17:06 GMT
|
45
|
+
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/crawl_url.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"url":"http://crawler-demo-site.herokuapp.com/2012/01/01/first-post.html"}'
|
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
|
+
- ! '"dc3e7df6ad36f807472e018fd1e7baeb"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWYzYTM5YTQzZTIwYmZmZWQ3MzIxZGFlMmFhN2RhNDNhBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--e96bdca607c9e4b372e020b9aa2f9a770769c1ec;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- 2e31f41f48df91f9de70039d65cca481
|
34
|
+
X-Runtime:
|
35
|
+
- '0.079952'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"external_id":"9508ace2e1ba669854eb49fbe9429952ff1a6d4c","url":"http://crawler-demo-site.herokuapp.com/2012/01/01/first-post.html"}'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 23:15:31 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,48 @@
|
|
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.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"document":{"external_id":"INscMGmhmX4","fields":[{"name":"url","value":"http://www.youtube.com/watch?v=v1uyQZNg2vE","type":"enum"},{"name":"thumbnail_url","value":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","type":"enum"},{"name":"channel_id","value":"UCTzVrd9ExsI3Zgnlh3_btLg","type":"enum"},{"name":"title","value":"The
|
9
|
+
Original Grumpy Cat","type":"string"},{"name":"category_name","value":"Pets
|
10
|
+
& Animals","type":"string"}]}}'
|
11
|
+
headers:
|
12
|
+
Accept:
|
13
|
+
- ! '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Swiftype-Ruby/1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge
|
27
|
+
Etag:
|
28
|
+
- ! '"5247c7b2d32d42ddedbe443f986a4de6"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
Set-Cookie:
|
32
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTg4NzczNDMyMGZlMGMwZjIwZTMwMjA1YmMwNjc4NjJhBjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--3b7af0396c432043e915447bfd2cbf3fa506d77f;
|
33
|
+
path=/; HttpOnly
|
34
|
+
X-Request-Id:
|
35
|
+
- 17c210b74766b815e46049e9456749d0
|
36
|
+
X-Runtime:
|
37
|
+
- '0.217177'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Server:
|
41
|
+
- thin 1.5.0 codename Knife
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! '{"external_id":"INscMGmhmX4","engine_id":"51b92f982ed960a844000248","document_type_id":"523231e62ed9605898000020","id":"52323cbf2ed9605898000035","_id":"52323cbf2ed9605898000035","updated_at":"2013-09-12T22:14:23Z","url":"http://www.youtube.com/watch?v=v1uyQZNg2vE","thumbnail_url":"https://i.ytimg.com/vi/INscMGmhmX4/mqdefault.jpg","channel_id":"UCTzVrd9ExsI3Zgnlh3_btLg","title":"The
|
45
|
+
Original Grumpy Cat","category_name":"Pets & Animals"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Thu, 12 Sep 2013 22:14:23 GMT
|
48
|
+
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.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"document_type":{"name":"new_doc_type"}}'
|
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
|
+
- ! '"06f1be79a40ef40229e7fe40dfd2c3a5"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWUwYzc2ZmY5ZWJkZWY4MzVmMGU1ZDdhNTUzMmZkNjk3BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--a4f56ce685daf5b6bd20bc129a83967ab6ae35e9;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- feee119776285704decf36d041dbe2cb
|
34
|
+
X-Runtime:
|
35
|
+
- '0.190533'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"id":"523248752ed9605898000048","name":"new_doc_type","slug":"new-doc-type","engine_id":"51b92f982ed960a844000248","updated_at":"2013-09-12T23:04:21Z","document_count":0,"field_mapping":{}}'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 23:04:21 GMT
|
45
|
+
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/crawler-demo-site/domains.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"domain":{"submitted_url":"http://www.zombo.com/"}}'
|
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
|
+
- ! '"83dd9f2e5a7609c46eb3aa26404c5e12"'
|
27
|
+
Cache-Control:
|
28
|
+
- max-age=0, private, must-revalidate
|
29
|
+
Set-Cookie:
|
30
|
+
- _session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTZiNjQ2NDljNTViM2VmOTAzZDgyMTQ4ZGRlODVmYjA4BjsAVEkiGXdhcmRlbi51c2VyLnVzZXIua2V5BjsAVFsISSIJVXNlcgY7AEZbBlU6Gk1vcGVkOjpCU09OOjpPYmplY3RJZCIRUDg5%2By7ZYCnHAAABSSIiJDJhJDEwJE1rNmZOdHA1cC9ZNVIuQU5sZFB2UWUGOwBU--365fbf71cc3dafd17b3179911132d52620b54338;
|
31
|
+
path=/; HttpOnly
|
32
|
+
X-Request-Id:
|
33
|
+
- a17f5806b66d854ee7def9d484de5efb
|
34
|
+
X-Runtime:
|
35
|
+
- '1.536812'
|
36
|
+
Connection:
|
37
|
+
- close
|
38
|
+
Server:
|
39
|
+
- thin 1.5.0 codename Knife
|
40
|
+
body:
|
41
|
+
encoding: US-ASCII
|
42
|
+
string: ! '{"id":"52324b132ed960589800004a","engine_id":"51534c502ed960a1e6000005","submitted_url":"http://www.zombo.com/","start_crawl_url":"http://www.zombo.com/","crawling":false,"document_count":0,"updated_at":"2013-09-12T23:15:32Z"}'
|
43
|
+
http_version:
|
44
|
+
recorded_at: Thu, 12 Sep 2013 23:15:33 GMT
|
45
|
+
recorded_with: VCR 2.5.0
|