schema

package
v0.0.0-...-1cdef85 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleBody

type ArticleBody struct {
	HTML     string `json:"html"`
	Wikitext string `json:"wikitext"`
}

ArticleBody content of the page.

type Editor

type Editor struct {
	Identifier  int        `json:"identifier,omitempty"`
	Name        string     `json:"name,omitempty"`
	EditCount   int        `json:"edit_count,omitempty"`
	Groups      []string   `json:"groups,omitempty"`
	IsBot       bool       `json:"is_bot,omitempty"`
	IsAnonymous bool       `json:"is_anonymous,omitempty"`
	DateStarted *time.Time `json:"date_started,omitempty"`
}

Editor for the page revision.

type Entity

type Entity struct {
	Identifier string   `json:"identifier,omitempty"`
	URL        string   `json:"url,omitempty"`
	Aspects    []string `json:"aspects,omitempty"`
}

Entity schema for wikidata item.

type Language

type Language struct {
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
}

Language schema to represent language.

type License

type License struct {
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
	URL        string `json:"url"`
}

License schema to represent license object.

type Namespace

type Namespace struct {
	Name       string `json:"name"`
	Identifier int    `json:"identifier"`
}

Namespace schema to represent namespace object.

type Page

type Page struct {
	Name               string        `json:"name"`
	Identifier         int           `json:"identifier,omitempty"`
	DateModified       *time.Time    `json:"date_modified,omitempty"`
	Protection         []*Protection `json:"protection,omitempty"`
	Version            *Version      `json:"version,omitempty"`
	URL                string        `json:"url,omitempty"`
	Namespace          *Namespace    `json:"namespace,omitempty"`
	InLanguage         *Language     `json:"in_language,omitempty"`
	MainEntity         *Entity       `json:"main_entity,omitempty"`
	AdditionalEntities []*Entity     `json:"additional_entities,omitempty"`
	Categories         []*Page       `json:"categories,omitempty"`
	Templates          []*Page       `json:"templates,omitempty"`
	Redirects          []*Page       `json:"redirects,omitempty"`
	IsPartOf           *Project      `json:"is_part_of,omitempty"`
	ArticleBody        *ArticleBody  `json:"article_body,omitempty"`
	License            []*License    `json:"license,omitempty"`
	Visibility         *Visibility   `json:"visibility,omitempty"`
}

Page schema to represent full page in the stream.

type Project

type Project struct {
	Name         string     `json:"name"`
	Identifier   string     `json:"identifier"`
	URL          string     `json:"url,omitempty"`
	Version      *string    `json:"version,omitempty"`
	DateModified *time.Time `json:"date_modified,omitempty"`
	InLanguage   *Language  `json:"in_language,omitempty"`
	Size         *Size      `json:"size,omitempty"`
}

Project representation fo project schema.

type Protection

type Protection struct {
	Type   string `json:"type,omitempty"`
	Level  string `json:"level,omitempty"`
	Expiry string `json:"expiry,omitempty"`
}

Protection level of protection for the page.

type Scores

type Scores struct {
	Damaging  *ores.ScoreDamaging  `json:"damaging,omitempty"`
	GoodFaith *ores.ScoreGoodFaith `json:"goodfaith,omitempty"`
}

Scores ORES scores schema representation.

type Size

type Size struct {
	Value    float64 `json:"value"`
	UnitText string  `json:"unit_text"`
}

Size schema for size representation.

type Version

type Version struct {
	Identifier      int      `json:"identifier,omitempty"`
	Comment         string   `json:"comment,omitempty"`
	Tags            []string `json:"tags,omitempty"`
	IsMinorEdit     bool     `json:"is_minor_edit,omitempty"`
	IsFlaggedStable bool     `json:"is_flagged_stable,omitempty"`
	Scores          *Scores  `json:"scores,omitempty"`
	Editor          *Editor  `json:"editor,omitempty"`
}

Version page versions meta data.

type Visibility

type Visibility struct {
	Text    bool `json:"text"`
	User    bool `json:"user"`
	Comment bool `json:"comment"`
}

Visibility representing visibility changes for parts of the revision.

Jump to

Keyboard shortcuts

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