wikidata

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBook

func GetBook(id, language string, connection *sql.DB) (*datastructure.Book, error)

func GetBookByTmdb

func GetBookByTmdb(id, language string) (datastructure.Book, error)

func GetCover

func GetCover(id, language string, connection *sql.DB) (string, error)

func GetWorkDescription

func GetWorkDescription(article, language string, connection *sql.DB) (string, error)

Types

type BookSerie

type BookSerie struct {
	Title       string
	Cover       string // note maybe first book’s cover?
	Description string
	Authors     []string
	Genres      []string
	Source      []datastructure.Source
	Article     string
	Parts       map[string]BookSeriePart
	SortedParts []BookSeriePart
}

func GetBookSerie

func GetBookSerie(id, language string, connection *sql.DB) (*BookSerie, error)

func GetBookSerieOrdinals

func GetBookSerieOrdinals(id string, bookSerie *BookSerie, connection *sql.DB) (*BookSerie, error)

func (BookSerie) GetArticle

func (s BookSerie) GetArticle() string

func (*BookSerie) SetDescription

func (s *BookSerie) SetDescription(description string)

type BookSeriePart

type BookSeriePart struct {
	Cover   string
	Ordinal string
	Title   string
	Uri     string
}

type Editions

type Editions struct {
	Entities map[string]struct {
		OriginalLang string
		Image        struct {
			Url string
		}
	}
}

type Ordinals

type Ordinals struct {
	Entities map[string]struct {
		Claims struct {
			P527 []struct {
				Mainsnak struct {
					Datavalue struct {
						Value struct {
							Id string
						}
					}
				}
				Qualifiers struct {
					P1545 []struct {
						Datavalue struct {
							Value string
						}
					}
				}
			}
		}
	}
}

type Result

type Result struct {
	Repo   *sparql.Repo
	Result *sparql.Results
	Work   datastructure.Work
}

type SearchResults

type SearchResults struct {
	Results []struct {
		Id          string
		Type        string
		Uri         string
		Label       string
		Description string
		Image       []string
		ImagePath   string
	}
}
func Search(query, language string, page int64) (*SearchResults, error)

type WikidataQuery

type WikidataQuery struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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