duckduckgo

package
v0.0.0-...-48b2bb9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2018 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package duckduckgo provides the ability to query DuckDuckGo from IRC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hook

func Hook(c *godrop.Client, message irc.Message)

Hook fires when an IRC message of some kind occurs.

This can let us know whether to do anything or not.

Types

type Answer

type Answer struct {
	Heading       string
	AbstractText  string
	Type          string
	Answer        string
	AnswerType    string
	Redirect      string
	RelatedTopics []RelatedTopic

	// APIURL is not part of the response but it's nice to have on hand.
	APIURL string
}

Answer holds an instant answer API result.

type RelatedTopic

type RelatedTopic struct {
	Text string
}

RelatedTopic holds an instant answer API related topic answer.

type SearchResult

type SearchResult struct {
	URL  string
	Text string
}

SearchResult holds a single parsed out search result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL