models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InnerBacklinks struct {
	Title string `json:"title"`
}

type InnerBasic

type InnerBasic struct {
	Aster string `json:"*"`
}

type InnerGeoSearch

type InnerGeoSearch struct {
	PageID    int     `json:"pageid"`
	Ns        int     `json:"ns"`
	Title     string  `json:"title"`
	Latitude  float32 `json:"lat"`
	Longitude float32 `json:"lom"`
	Distance  float32 `json:"dist"`
	Primary   string  `json:"primary"`
}

type InnerNormalize

type InnerNormalize struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type InnerPage

type InnerPage struct {
	Ns                  int                      `json:"ns"`
	Title               string                   `json:"title"`
	PageID              int                      `json:"pageid"`
	ContentModel        string                   `json:"contentmodel"`
	PageLanguage        string                   `json:"pagelanguage"`
	PageLanguageTmlCode string                   `json:"pagelanguagetmlcode"`
	PageLanguageDir     string                   `json:"pagelanguagedir"`
	Touched             string                   `json:"touched"`
	LastRevid           int                      `json:"lastrevid"`
	Length              int                      `json:"length"`
	FullURL             string                   `json:"fullurl"`
	EditURL             string                   `json:"editurl"`
	CanonicalURL        string                   `json:"canonicalurl"`
	PageProps           map[string]string        `json:"pageprops"`
	Missing             string                   `json:"missing"`
	Extract             string                   `json:"extract"`
	Revision            []map[string]interface{} `json:"revisions"`
	Extlink             []map[string]string      `json:"extlinks"`
	Link                []map[string]interface{} `json:"links"`
	Category            []map[string]interface{} `json:"categories"`
	ImageInfo           []map[string]string      `json:"imageinfo"`
	Coordinate          []map[string]interface{} `json:"coordinates"`
}

type InnerSearch

type InnerSearch struct {
	Ns        int    `json:"ns"`
	Title     string `json:"title"`
	PageID    int    `json:"pageid"`
	Size      int    `json:"size"`
	Wordcount int    `json:"wordcount"`
	Snippet   string `json:"snippet"`
	Timestamp string `json:"timestamp"`
}

type InnerSearchInfo

type InnerSearchInfo struct {
	TotalHits         int    `json:"totalhits"`
	Suggestion        string `json:"suggestion"`
	SuggestionSnippet string `json:"suggestionsnippet"`
}

type RequestError

type RequestError struct {
	Code  string `json:"code"`
	Info  string `json:"info"`
	Aster string `json:"*"`
}

type RequestQuery

type RequestQuery struct {
	SearchInfo InnerSearchInfo      `json:"searchinfo"`
	Normalize  []InnerNormalize     `json:"normalized"`
	Redirect   []InnerNormalize     `json:"redirects"`
	Search     []InnerSearch        `json:"search"`
	GeoSearch  []InnerGeoSearch     `json:"geosearch"`
	Page       map[string]InnerPage `json:"pages"`
	Random     []InnerSearch        `json:"random"`
	Language   []map[string]string  `json:"languages"`
	Backlinks  []InnerBacklinks     `json:"backlinks"`
}

type RequestResult

type RequestResult struct {
	Error         RequestError           `json:"error"`
	Warning       map[string]InnerBasic  `json:"warnings"`
	Batchcomplete string                 `json:"batchcomplete"`
	Query         RequestQuery           `json:"query"`
	Servedby      string                 `json:"servedby"`
	Continue      map[string]interface{} `json:"continue"`
	Parse         map[string]interface{} `json:"parse"`
}

The result of calling the Wikipedia API

Jump to

Keyboard shortcuts

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