Module: Swiftype::Client::Domain
- Included in:
- Swiftype::Client
- Defined in:
- lib/swiftype/client.rb
Overview
A Domain represents a host in a crawler-based Engine. Domains are only relevant to crawler-base engines, but you can manipulate them through the REST API.
Instance Method Summary collapse
-
#crawl_url(engine_id, domain_id, url) ⇒ Object
Request to add or update a URL on a Domain.
- #create_domain(engine_id, url) ⇒ Object
- #destroy_domain(engine_id, domain_id) ⇒ Object
- #domain(engine_id, domain_id) ⇒ Object
- #domains(engine_id) ⇒ Object
-
#recrawl_domain(engine_id, domain_id) ⇒ Object
Trigger a recrawl request for a Domain.
Instance Method Details
#crawl_url(engine_id, domain_id, url) ⇒ Object
Request to add or update a URL on a Domain. The host of the URL must match the host of the Domain.
424 425 426 |
# File 'lib/swiftype/client.rb', line 424 def crawl_url(engine_id, domain_id, url) put("engines/#{engine_id}/domains/#{domain_id}/crawl_url.json", {:url => url}) end |
#create_domain(engine_id, url) ⇒ Object
[View source]
406 407 408 |
# File 'lib/swiftype/client.rb', line 406 def create_domain(engine_id, url) post("engines/#{engine_id}/domains.json", {:domain => {:submitted_url => url}}) end |
#destroy_domain(engine_id, domain_id) ⇒ Object
[View source]
410 411 412 |
# File 'lib/swiftype/client.rb', line 410 def destroy_domain(engine_id, domain_id) delete("engines/#{engine_id}/domains/#{domain_id}.json") end |
#domain(engine_id, domain_id) ⇒ Object
[View source]
402 403 404 |
# File 'lib/swiftype/client.rb', line 402 def domain(engine_id, domain_id) get("engines/#{engine_id}/domains/#{domain_id}.json") end |
#domains(engine_id) ⇒ Object
[View source]
398 399 400 |
# File 'lib/swiftype/client.rb', line 398 def domains(engine_id) get("engines/#{engine_id}/domains.json") end |
#recrawl_domain(engine_id, domain_id) ⇒ Object
Trigger a recrawl request for a Domain. Note that this will fail if you have exceeded your recrawl limit.
415 416 417 |
# File 'lib/swiftype/client.rb', line 415 def recrawl_domain(engine_id, domain_id) put("engines/#{engine_id}/domains/#{domain_id}/recrawl.json") end |