Icon

SeekingWhirl is a library for easy work with DuckDuckGo API

Get it!

Latest version: 1.0.0

Free and easy

Just add it to your project and use! Code is truly open source.

In your dub.json:

{	...
	"dependencies": {
		"seekingwhirl": "~>1.0.0"
	}
}

You can also visit page on code.dlang.org, or download zipped package on releases


API reference

class SeekingWhirl
Very important class. Although it is a only one.
Properties
string Abstract
topic summary (can contain HTML)
string AbstractText
topic summary (w\o HTML)
string AbstractSource
name of source
string AbstractURL
link to topic page
string Image
link to Abstract's image
string Heading
topic name
string Answer
instant answer
string AnswerType
type of instant answer
string Definition
dictionary definition
string DefinitionSource
source of definition
string DefinitionURL
link to expanded page
string Type
response category
string Redirect
!bang redirect
result[] RelatedTopics
internal links
result[] Results
external links
Structs
struct result
string Result
link to topic
string FirstURL
first url in Result
string Text
text from firstURL
icon Icon
icon of topic
struct icon
string URL
link to icon
long Height
icon height
long Width
icon width
Functions
this(query, appname, no_redirect, no_html, skip_disambig)
string query
search string
string appname (optional)
name of app (default="")
bool no_redirect (optional)
true to skip HTTP redirects (default=false)
bool no_html (optional)
true to remove HTML from text (default=false)
bool skip_disambig (optional)
true to skip disambugation (D) Type (default=false)

Examples

Everybody likes examples! Moar examples - less questions, isn't it?

Prints all fields. Usable for debug.
Smart and funny helper. It seeks for answers, and offers a related topics.

This page licenced under WTFPL license

You have a question, or found an mistake? Start an issue on GitHub.