ign_integration

package
v0.1.51 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WikiPageUrl added in v0.1.42

func WikiPageUrl(slug, page string) *url.URL

func WikiUrl

func WikiUrl(slug string) *url.URL

Types

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 []interface{} `json:"franchises"`
}

type Contributor added in v0.1.37

type Contributor struct {
	Typename    string  `json:"__typename"`
	Name        *string `json:"name"`
	Nickname    string  `json:"nickname"`
	DisplayName string  `json:"displayName"`
}

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)

func (*HTMLEntity) PageUrls added in v0.1.38

func (he *HTMLEntity) PageUrls(slug string) ([]string, error)

type HTMLValue added in v0.1.39

type HTMLValue struct {
	Html   string `json:"html"`
	Tag    string `json:"tag"`
	Header bool   `json:"header"`
	Block  bool   `json:"block"`
}

type IGNWikiSlugGetter

type IGNWikiSlugGetter interface {
	GetIGNWikiSlug() string
}

type ImageValue added in v0.1.39

type ImageValue struct {
	Src      string `json:"src"`
	SrcSet   string `json:"srcset"`
	Original string `json:"original"`
	Size     string `json:"size"`
	Sizes    string `json:"sizes"`
	Modal    struct {
		Src    string `json:"src"`
		SrcSet string `json:"srcset"`
	} `json:"modal"`
}

type SiblingPage added in v0.1.37

type SiblingPage struct {
	Typename string `json:"__typename"`
	Label    string `json:"label"`
	Url      string `json:"url"`
}

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 {
	Label  string           `json:"label"`
	Url    string           `json:"url"`
	SubNav []WikiNavigation `json:"subnav"`
}

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                interface{}   `json:"tags"`
				Locked              bool          `json:"locked"`
				Contributors        int           `json:"contributors"`
				Maps                []interface{} `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      interface{}   `json:"mapMarker"`
					HtmlEntities   []HTMLEntity  `json:"htmlEntities"`
					NextPage       SiblingPage   `json:"nextPage"`
					PrevPage       SiblingPage   `json:"prevPage"`
					ChecklistTasks []interface{} `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 []interface{} `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 (wp *WikiProps) NextPageUrl() string

func (*WikiProps) PageTitle added in v0.1.44

func (wp *WikiProps) PageTitle() string

func (*WikiProps) PreviousPageUrl added in v0.1.38

func (wp *WikiProps) PreviousPageUrl() string

func (*WikiProps) PrimaryImageUrl added in v0.1.43

func (wp *WikiProps) PrimaryImageUrl() string

func (*WikiProps) PublishDate added in v0.1.45

func (wp *WikiProps) PublishDate() time.Time

func (*WikiProps) UpdatedAt added in v0.1.45

func (wp *WikiProps) UpdatedAt() time.Time

func (*WikiProps) WikiName added in v0.1.44

func (wp *WikiProps) WikiName() string

Jump to

Keyboard shortcuts

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