Documentation
¶
Index ¶
- func WikiPageUrl(slug, page string) *url.URL
- func WikiUrl(slug string) *url.URL
- type Breadcrumb
- type Contributor
- type HTMLEntity
- type HTMLValue
- type IGNWikiSlugGetter
- type ImageValue
- type SiblingPage
- type Views
- type WikiNavigation
- type WikiProps
- func (wp *WikiProps) HTMLEntities() []HTMLEntity
- func (wp *WikiProps) NextPageUrl() string
- func (wp *WikiProps) PageTitle() string
- func (wp *WikiProps) PreviousPageUrl() string
- func (wp *WikiProps) PrimaryImageUrl() string
- func (wp *WikiProps) PublishDate() time.Time
- func (wp *WikiProps) UpdatedAt() time.Time
- func (wp *WikiProps) WikiName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WikiPageUrl ¶ added in v0.1.42
Types ¶
type Breadcrumb ¶ added in v0.1.37
type Breadcrumb struct {
Typename string `json:"__typename"`
Id string `json:"id"`
Slug string `json:"slug"`
Type string `json:"type"`
Paywall bool `json:"paywall"`
Metadata struct {
Typename string `json:"__typename"`
Names struct {
Typename string `json:"__typename"`
Name string `json:"name"`
} `json:"names"`
} `json:"metadata"`
PrimaryImage struct {
Typename string `json:"__typename"`
Url string `json:"url"`
} `json:"primaryImage"`
Genres []struct {
Typename string `json:"__typename"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"genres"`
ObjectRegions []struct {
Typename string `json:"__typename"`
Id int `json:"id"`
Releases []struct {
Typename string `json:"__typename"`
Id string `json:"id"`
PlatformAttributes []struct {
Typename string `json:"__typename"`
Id int `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"platformAttributes"`
} `json:"releases"`
} `json:"objectRegions"`
Franchises []any `json:"franchises"`
}
type Contributor ¶ added in v0.1.37
type HTMLEntity ¶ added in v0.1.37
type HTMLEntity struct {
Typename string `json:"__typename"`
Name string `json:"name"`
Values HTMLValue `json:"values"`
// this field is not present in source data
// check github.com/arelate/align fixDataProblems
// for an introduction
ImageValues []ImageValue `json:"imageValues"`
}
func (*HTMLEntity) ImageUrls ¶ added in v0.1.38
func (he *HTMLEntity) ImageUrls() ([]string, error)
type IGNWikiSlugGetter ¶
type IGNWikiSlugGetter interface {
GetIgnWikiSlug() string
}
type ImageValue ¶ added in v0.1.39
type SiblingPage ¶ added in v0.1.37
type Views ¶ added in v0.1.37
type Views struct {
TOC string `json:"TOC"`
Search string `json:"Search"`
Settings string `json:"Settings"`
Maps string `json:"Maps"`
MapContent string `json:"MapContent"`
Notes string `json:"Notes"`
CustomMarkers string `json:"CustomMarkers"`
Regions string `json:"Regions"`
Groups string `json:"Groups"`
GroupMarkers string `json:"GroupMarkers"`
AddMarker string `json:"AddMarker"`
EditMarker string `json:"EditMarker"`
Checklists string `json:"Checklists"`
Heatmaps string `json:"Heatmaps"`
}
type WikiNavigation ¶ added in v0.1.41
type WikiNavigation struct {
}
type WikiProps ¶ added in v0.1.37
type WikiProps struct {
Props struct {
PageProps struct {
Page struct {
Canonical string `json:"canonical"`
Slug string `json:"slug"`
Typename string `json:"__typename"`
Id string `json:"id"`
Name string `json:"name"`
Tags any `json:"tags"`
Locked bool `json:"locked"`
Contributors int `json:"contributors"`
Maps []any `json:"maps"`
TopContributors []Contributor `json:"topContributors"`
Breadcrumbs []Breadcrumb `json:"breadcrumbs"`
IsCommunity string `json:"isCommunity"`
Resource string `json:"resource"`
PageType string `json:"pageType"`
Chapter string `json:"chapter"`
ChapterSlug string `json:"chapterSlug"`
Description string `json:"description"`
Title string `json:"title"`
AssetId string `json:"assetId"`
GenreSlugs []string `json:"genreSlugs"`
Platforms []string `json:"platforms"`
PlatformSlugs []string `json:"platformSlugs"`
ObjectId string `json:"objectId"`
ObjectSlug string `json:"objectSlug"`
UpdatedAt time.Time `json:"updatedAt"`
PublishDate time.Time `json:"publishDate"`
AdditionalDataLayer struct {
Content struct {
PageName string `json:"pageName"`
ContentId string `json:"contentId"`
ObjectIds []string `json:"objectIds"`
} `json:"content"`
} `json:"additionalDataLayer"`
Page struct {
Typename string `json:"__typename"`
Id string `json:"id"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updatedAt"`
PublishDate time.Time `json:"publishDate"`
Locked bool `json:"locked"`
RevisionId int `json:"revisionId"`
Thin bool `json:"thin"`
HasVideo bool `json:"hasVideo"`
ImageForTitle string `json:"imageForTitle"`
MapMarker any `json:"mapMarker"`
HtmlEntities []HTMLEntity `json:"htmlEntities"`
NextPage SiblingPage `json:"nextPage"`
PrevPage SiblingPage `json:"prevPage"`
ChecklistTasks []any `json:"checklistTasks"`
} `json:"page"`
PrimaryObject struct {
Typename string `json:"__typename"`
Id string `json:"id"`
Slug string `json:"slug"`
Type string `json:"type"`
Paywall bool `json:"paywall"`
Metadata struct {
Typename string `json:"__typename"`
Names struct {
Typename string `json:"__typename"`
Name string `json:"name"`
} `json:"names"`
} `json:"metadata"`
PrimaryImage struct {
Typename string `json:"__typename"`
Url string `json:"url"`
} `json:"primaryImage"`
Genres []struct {
Typename string `json:"__typename"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"genres"`
ObjectRegions []struct {
Typename string `json:"__typename"`
Id int `json:"id"`
Releases []struct {
Typename string `json:"__typename"`
Id string `json:"id"`
PlatformAttributes []struct {
Typename string `json:"__typename"`
Id int `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"platformAttributes"`
} `json:"releases"`
} `json:"objectRegions"`
Franchises []any `json:"franchises"`
} `json:"primaryObject"`
HasAds bool `json:"hasAds"`
Image string `json:"image"`
DesktopInitialAdBreak int `json:"desktopInitialAdBreak"`
DesktopAdBreak int `json:"desktopAdBreak"`
MobileInitialAdBreak int `json:"mobileInitialAdBreak"`
MobileAdBreak int `json:"mobileAdBreak"`
Paywall bool `json:"paywall"`
WikiSlug string `json:"wikiSlug"`
InitialSidebarViews struct {
Views Views `json:"views"`
InitialView string `json:"initialView"`
InitialSharedState struct {
SelectedSection string `json:"selectedSection"`
TrackingComponent string `json:"trackingComponent"`
} `json:"initialSharedState"`
} `json:"initialSidebarViews"`
RequestReferer string `json:"requestReferer"`
SiteEntryReferrer string `json:"siteEntryReferrer"`
Referrer string `json:"referrer"`
Region string `json:"region"`
ParsedUrl struct {
Slashes bool `json:"slashes"`
Protocol string `json:"protocol"`
Hash string `json:"hash"`
Query struct {
} `json:"query"`
Pathname string `json:"pathname"`
Auth string `json:"auth"`
Host string `json:"host"`
Port string `json:"port"`
Hostname string `json:"hostname"`
Password string `json:"password"`
Username string `json:"username"`
Origin string `json:"origin"`
Href string `json:"href"`
} `json:"parsedUrl"`
UADevice string `json:"uaDevice"`
} `json:"page"`
PageKey string `json:"pageKey"`
Headers struct {
Keys []string `json:"keys"`
} `json:"headers"`
} `json:"pageProps"`
} `json:"props"`
Page string `json:"page"`
Query struct {
Slug string `json:"slug"`
} `json:"query"`
}
func (*WikiProps) HTMLEntities ¶ added in v0.1.38
func (wp *WikiProps) HTMLEntities() []HTMLEntity
func (*WikiProps) NextPageUrl ¶ added in v0.1.38
func (*WikiProps) PreviousPageUrl ¶ added in v0.1.38
func (*WikiProps) PrimaryImageUrl ¶ added in v0.1.43
func (*WikiProps) PublishDate ¶ added in v0.1.45
Click to show internal directories.
Click to hide internal directories.