Documentation
¶
Index ¶
- Constants
- func NewMockServer(t *testing.T, fixturePath string) *httptest.Server
- type Author
- func (a Author) BirthName() string
- func (a Author) DateOfBirth() precisiondate.PrecisionDate
- func (a Author) DateOfDeath() precisiondate.PrecisionDate
- func (a Author) Description(language string) string
- func (a Author) Gender() float64
- func (a Author) Image() string
- func (a Author) InstanceOf() float64
- func (a Author) Pseudonyms() []string
- func (a Author) RetrievedOn() time.Time
- func (a Author) SourceID() string
- func (a Author) Website() string
- func (a Author) WikipediaLink(language string) string
- type EntitiesRequest
- type GetEntitiesRequest
- type Gowikidata
- type SearchEntitiesRequest
- type WikidataSource
Constants ¶
View Source
const ( InstanceUnknown = iota InstanceHuman InstancePseudonym InstancePenName InstanceCollectivePseudonym InstanceHumanWhoseExistenceIsDisputed )
View Source
const ( GenderUnknown = iota GenderMale GenderFemale GenderIntersex GenderTrasgenderFemale GenderTrasgenderMale )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Author ¶
type Author struct {
// contains filtered or unexported fields
}
func (Author) DateOfBirth ¶
func (a Author) DateOfBirth() precisiondate.PrecisionDate
func (Author) DateOfDeath ¶
func (a Author) DateOfDeath() precisiondate.PrecisionDate
func (Author) Description ¶
func (Author) InstanceOf ¶
func (Author) Pseudonyms ¶
func (Author) RetrievedOn ¶
func (Author) WikipediaLink ¶
type EntitiesRequest ¶
type EntitiesRequest struct {
// contains filtered or unexported fields
}
func (EntitiesRequest) Get ¶
func (e EntitiesRequest) Get() (*map[string]gowikidata.Entity, error)
func (EntitiesRequest) SetLanguages ¶
func (e EntitiesRequest) SetLanguages(languages []string)
func (EntitiesRequest) SetProps ¶
func (e EntitiesRequest) SetProps(props []string)
type GetEntitiesRequest ¶
type Gowikidata ¶
type Gowikidata struct {
}
func (Gowikidata) NewGetEntities ¶
func (w Gowikidata) NewGetEntities(ids []string) (GetEntitiesRequest, error)
func (Gowikidata) NewSearch ¶
func (w Gowikidata) NewSearch(search string, language string) (SearchEntitiesRequest, error)
type SearchEntitiesRequest ¶
type SearchEntitiesRequest interface {
Get() (*gowikidata.SearchEntitiesResponse, error)
}
type WikidataSource ¶
type WikidataSource struct {
// contains filtered or unexported fields
}
func NewWikidataSource ¶
func NewWikidataSource(w wikidata) WikidataSource
func (WikidataSource) RetrieveAuthor ¶
RetrieveAuthor returns the first match from the list of passed Wikidata entity IDs that represents a human
func (WikidataSource) SearchAuthor ¶
Click to show internal directories.
Click to hide internal directories.