Discover Packages
github.com/negapedia/wikipage
package
module
Version:
v0.0.0-...-5695dd0
Opens a new window with list of versions in this module.
Published: Nov 29, 2019
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 4
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
Package wikipage provides utility functions for retrieving informations about Wikipedia articles.
NotFound checks if current error was issued by a page not found, if so it returns page ID and sets "ok" true, otherwise "ok" is false.
type RequestHandler struct {
}
RequestHandler is a hub from which is possible to retrieve informations about Wikipedia articles.
New loads or creates a RequestHandler for the specified language.
func (RequestHandler) From ¶
From returns a WikiPage from an article Title. It's safe to use concurrently. Warning: in the worst case it can block for more than 48 hours. As such it's advised to setup a timeout with the context.
type WikiPage struct {
ID uint32 `json:"pageid"`
Title string
Abstract string `json:"Extract"`
}
WikiPage represents an article of Wikipedia.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.