answer

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswerService

type AnswerService struct {
	// contains filtered or unexported fields
}

func NewAnswerService

func NewAnswerService(token string) *AnswerService

func (*AnswerService) Question

func (t *AnswerService) Question(request *QuestionRequest) (*QuestionResponse, error)

Ask a question and receive an instant answer

type QuestionRequest

type QuestionRequest struct {
	// the question to answer
	Query string `json:"query"`
}

type QuestionResponse

type QuestionResponse struct {
	// the answer to your question
	Answer string `json:"answer"`
	// any related image
	Image string `json:"image"`
	// a related url
	Url string `json:"url"`
}

Jump to

Keyboard shortcuts

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