module

DuckDuckGo

Constants

ANSWER_TYPE_MAPPING = {"" => AnswerType::None, "calc" => AnswerType::Calc, "color" => AnswerType::Color, "digest" => AnswerType::Digest, "info" => AnswerType::Info, "ip" => AnswerType::IP, "iploc" => AnswerType::IPLoc, "phone" => AnswerType::Phone, "pw" => AnswerType::Password, "rand" => AnswerType::Random, "regexp" => AnswerType::Regexp, "unicode" => AnswerType::Unicode, "upc" => AnswerType::UPC, "zip" => AnswerType::Zip}

Mapping from API strings to AnswerType enum values

VERSION = "0.1.0"

Class methods

client

Get the default client (creates one if needed)

Source
configure

Configure the default client

Source
query(query : String, no_redirect : Bool = false, no_html : Bool = false, skip_disambig : Bool = false) : InstantAnswer

Query the Instant Answer API

Source
secure_query(query : String, no_redirect : Bool = false, no_html : Bool = false, skip_disambig : Bool = false) : InstantAnswer

Query using HTTPS

Source
zci(query_string : String, no_html : Bool = false, skip_disambig : Bool = false) : String

Get zero-click info - the best single text answer for a query This is a convenience method that queries and returns the most relevant text.

Source

Nested types