Back to

Package fetch

Latest Go to latest

The latest major version is .

Published: Mar 22, 2020 | License: ISC | Module:


type Wiki

type Wiki struct {
	Type         string `json:"type"`
	Title        string `json:"title"`
	DisplayTitle string `json:"displaytitle"`
	PageID       int    `json:"pageid"`
	Description  string `json:"description"`
	Language     string `json:"lang"`
	Extract      string `json:"extract"`

Wiki struct holds information retrieved from wikipedia api.

func Wikipedia

func Wikipedia(q string) (Wiki, error)

Wikipedia gets the summary from wikipedia api & returns it with an error (if exists). It takes a string as input which will be the search query sent to wikipedia.

Package Files

  • request.go
  • wikipedia.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier