wolfram

package
v0.0.0-...-6de9b76 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ApiUrl = "https://api.wolframalpha.com/v2/query"

Variables

This section is empty.

Functions

func Command

func Command() lib.Command

Types

type Assumption

type Assumption struct {
	XMLName xml.Name          `xml:"assumption"`
	Word    string            `xml:"word"`
	Values  []AssumptionValue `xml:"value"`
}

type AssumptionValue

type AssumptionValue struct {
	XMLName xml.Name `xml:"value"`
	Content string   `xml:"desc"`
	Input   string   `xml:"input,attr"`
}

type Assumptions

type Assumptions struct {
	XMLName xml.Name     `xml:"assumptions"`
	Data    []Assumption `xml:"assumption"`
}

type DidYouMeans

type DidYouMeans struct {
	XMLName xml.Name `xml:"didyoumeans"`
	Data    []string `xml:"didyoumean"`
}

type Error

type Error struct {
	XMLName xml.Name `xml:"error"`
	Content string   `xml:"msg"`
}

type Image

type Image struct {
	XMLName xml.Name `xml:"img"`
	URL     string   `xml:"src,attr"`
}

type Pod

type Pod struct {
	XMLName xml.Name `xml:"pod"`
	Title   string   `xml:"title,attr"`
	Subpods []Subpod `xml:"subpod"`
}

type QueryResult

type QueryResult struct {
	XMLName    xml.Name `xml:"queryresult"`
	HasSuccess bool     `xml:"success,attr"`
	HasError   bool     `xml:"error,attr"`

	Pods        []Pod       `xml:"pod"`
	Tips        Tips        `xml:"tips"`
	DidYouMeans DidYouMeans `xml:"didyoumeans"`
	Assumptions Assumptions `xml:"assumptions"`
	Error       Error       `xml:"error"`
}

type Subpod

type Subpod struct {
	Image Image  `xml:"img"`
	Text  string `xml:"plaintext"`
}

type Tip

type Tip struct {
	XMLName xml.Name `xml:"tip"`
	Text    string   `xml:"text,attr"`
}

type Tips

type Tips struct {
	XMLName xml.Name `xml:"tips"`
	Data    []Tip    `xml:"tip"`
}

Jump to

Keyboard shortcuts

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