amiibo

package module
v1.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 18 Imported by: 0

README

Go Apache V2 License

Amiibo

Amiibo is the an Nintendo Amiibo SDK for the Go programming language.

Amiibo is a fan project to collect the latest information about the Amiibo products on offer from Nintendo. Package is built on scraping the Nintendo Amiibo website and normalizing the data into consumable chunks.

The package is built around the Go API reference documentation. Please consider using godoc to build custom integrations. If you are using Go 1.12 or earlier, godoc should be included. All Go 1.13 users will need to grab this package using the go get flow.

Installing

Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.

go get github.com/lindsaygelle/amiibo

To update the SDK use go get -u to retrieve the latest version of the SDK.

go get -u github.com/lindsaygelle/amiibo

Dependencies

The Amiibo SDK is built Go's module system. Please update to Go 1.13 to use go mod out of the box.

Go Modules

If you are using Go modules, your go get will default to the latest tagged release version of the SDK. To get a specific release version of the SDK use @<tag> in your go get command.

go get github.com/lindsaygelle/amiibo@<version>

To get the latest SDK repository change use @latest.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.

Documentation

Overview

Package amiibo provides a simple SDK to build an application that provides data about Nintendo Amiibo products.

Package uses public data found on nintendo.com and nintendo.co.jp to generate content.

Index

Constants

View Source
const ENGChartURL string = "" /* 126-byte string literal not displayed */

ENGChartURL is the URL for the Nintendo of America Nintendo Amiibo compatibility chart.

View Source
const ENGLineupURL string = "https://www.nintendo.com/content/noa/en_US/amiibo/line-up/jcr:content/root/responsivegrid/lineup.model.json"

ENGLineupURL is the URL to the Nintendo of America Nintendo Amiibo lineup information.

View Source
const JPNChartSoftwareURL string = "https://www.nintendo.co.jp/hardware/amiibo/chart/data/software.xml"

JPNChartSoftwareURL is the URL for the Nintendo Japan Nintendo Amiibo software chart.

View Source
const JPNChartURL string = "https://www.nintendo.co.jp/hardware/amiibo/chart/data/chart.xml"

JPNChartURL is the URL for the Nintendo Japan Nintendo Amiibo compatibility chart.

View Source
const JPNLineupComingURL string = "https://www.nintendo.co.jp/data/software/xml-system/amiibo-lineup-coming.xml"

JPNLineupComingURL is the URL for the Nintendo Japan Nintendo Amiibo lineup coming chart.

View Source
const JPNLineupURL string = "https://www.nintendo.co.jp/hardware/amiibo/chart/data/lineup.xml"

JPNLineupURL is the URL for the Nintendo Japan Nintendo Amiibo lineup chart.

View Source
const NintendoURL string = "https://nintendo.com"

NintendoURL is the URL to the Nintendo of America website.

View Source
const NintendoURLJPN string = "https://www.nintendo.co.jp"

NintendoURLJPN is the URL to the Nintendo of Japan website.

Variables

This section is empty.

Functions

func WriteENGAmiibo

func WriteENGAmiibo(dir string, filename string, v *ENGAmiibo) (fullpath string, err error)

WriteENGAmiibo writes a ENGAmiibo to disc.

func WriteENGAmiiboMap

func WriteENGAmiiboMap(dir string, filename string, v *ENGAmiiboMap) (fullpath string, err error)

WriteENGAmiiboMap writes a ENGAmiiboMap to disc.

func WriteENGChart

func WriteENGChart(dir string, filename string, v *ENGChart) (fullpath string, err error)

WriteENGChart writes a ENGChart to disc.

func WriteENGChartAmiibo

func WriteENGChartAmiibo(dir string, filename string, v *ENGChartAmiibo) (fullpath string, err error)

WriteENGChartAmiibo writes a ENGChartAmiibo to disc.

func WriteENGChartGame

func WriteENGChartGame(dir string, filename string, v *ENGChartGame) (fullpath string, err error)

WriteENGChartGame writes a ENGChartGame to disc.

func WriteENGChartItem

func WriteENGChartItem(dir string, filename string, v *ENGChartItem) (fullpath string, err error)

WriteENGChartItem writes a ENGChartItem to disc.

func WriteENGGame

func WriteENGGame(dir string, filename string, v *ENGGame) (fullpath string, err error)

WriteENGGame writes a ENGGame to disc.

func WriteENGGameMap

func WriteENGGameMap(dir string, filename string, v *ENGGameMap) (fullpath string, err error)

WriteENGGameMap writes a ENGGameMap to disc.

func WriteENGLineup

func WriteENGLineup(dir string, filename string, v ENGLineup) (fullpath string, err error)

WriteENGLineup writes a ENGLineup to disc.

func WriteENGLineupAmiibo

func WriteENGLineupAmiibo(dir string, filename string, v *ENGLineupAmiibo) (fullpath string, err error)

WriteENGLineupAmiibo writes a ENGLineupAmiibo to disc.

func WriteENGLineupItem

func WriteENGLineupItem(dir string, filename string, v *ENGLineupItem) (fullpath string, err error)

WriteENGLineupItem writes a ENGLineupItem to disc.

func WriteJPNAmiibo

func WriteJPNAmiibo(dir string, filename string, v *JPNAmiibo) (fullpath string, err error)

WriteJPNAmiibo writes a JPNAmiibo to disc.

func WriteJPNAmiiboMap

func WriteJPNAmiiboMap(dir string, filename string, v *JPNAmiiboMap) (fullpath string, err error)

WriteJPNAmiiboMap writes a JPNAmiiboMap to disc.

func WriteJPNAmiiboSoftware

func WriteJPNAmiiboSoftware(dir string, filename string, v *JPNAmiiboSoftware) (fullpath string, err error)

WriteJPNAmiiboSoftware writes a JPNAmiiboSoftware to disc.

func WriteJPNChart

func WriteJPNChart(dir string, filename string, v *JPNChart) (fullpath string, err error)

WriteJPNChart writes a JPNChart to disc.

func WriteJPNChartItem

func WriteJPNChartItem(dir string, filename string, v *JPNChartItem) (fullpath string, err error)

WriteJPNChartItem writes a JPNChartItem to disc.

func WriteJPNChartSoftware

func WriteJPNChartSoftware(dir string, filename string, v *JPNChartSoftware) (fullpath string, err error)

WriteJPNChartSoftware writes a JPNChartSoftware to disc.

func WriteJPNChartSoftwareItem

func WriteJPNChartSoftwareItem(dir string, filename string, v *JPNChartSoftwareItem) (fullpath string, err error)

WriteJPNChartSoftwareItem writes a JPNChartSoftwareItem to disc.

func WriteJPNLineup

func WriteJPNLineup(dir string, filename string, v *JPNLineup) (fullpath string, err error)

WriteJPNLineup writes a JPNLineup to disc.

func WriteJPNLineupComing

func WriteJPNLineupComing(dir string, filename string, v *JPNLineupComing) (fullpath string, err error)

WriteJPNLineupComing writes a JPNLineupComing to disc.

func WriteJPNLineupComingItem

func WriteJPNLineupComingItem(dir string, filename string, v *JPNLineupComingItem) (fullpath string, err error)

WriteJPNLineupComingItem writes a JPNLineupComingItem to disc.

func WriteJPNLineupItem

func WriteJPNLineupItem(dir string, filename string, v *JPNLineupItem) (fullpath string, err error)

WriteJPNLineupItem writes a JPNLineupItem to disc.

func WriteJPNLineupSeriesItem

func WriteJPNLineupSeriesItem(dir string, filename string, v *JPNLineupSeriesItem) (fullpath string, err error)

WriteJPNLineupSeriesItem writes a JPNLineupSeriesItem to disc.

func WriteJPNSoftware

func WriteJPNSoftware(dir string, filename string, v *JPNSoftware) (fullpath string, err error)

WriteJPNSoftware writes a JPNSoftware to disc.

func WriteJPNSoftwareMap

func WriteJPNSoftwareMap(dir string, filename string, v *JPNSoftwareMap) (fullpath string, err error)

WriteJPNSoftwareMap writes a JPNSoftwareMap to disc.

Types

type Amiibo

type Amiibo interface {

	// GetAvailable returns the Nintendo Amiibo product availability status.
	//
	// GetAvailable is calculated by evaluating the Nintendo Amiibo products release date is
	// before the current timestamp.
	GetAvailable() bool

	// GetID returns the Nintendo Amiibo products hash key ID.
	GetID() string

	// GetLanguage returns the Nintendo Amiibo products language identifier.
	GetLanguage() language.Tag

	// GetMD5 returns the Nintendo Amiibo products encoded MD5 hash sequence as well as the generated bytes.
	//
	// GetMD5 returns an additional error if the byte sequence cannot be generated or if the
	// MD5 hash cannot be produced.
	GetMD5() (string, []byte, error)

	// GetName returns the Nintendo Amiibo product name.
	//
	// GetName can contain unicode.
	GetName() string

	// GetNameAlternative returns the Nintendo Amiibo products alternative name.
	//
	// GetNameAlternative can contain unicode.
	GetNameAlternative() string

	// GetPrice returns the Nintendo Amiibo products retail price.
	//
	// GetPrice can contain unicode.
	GetPrice() string

	// GetReleaseDate returns the Nintendo Amiibo products retail release date as a formatted timestamp.
	GetReleaseDate() time.Time

	// GetSeries returns the series the Nintendo Amiibo product is affiliated with.
	//
	// GetSeries can contain unicode.
	GetSeries() string

	// GetURL return the direct URL to the Nintendo Amiibo product page.
	GetURL() string
}

Amiibo is a generic interface for a Nintendo Amiibo product.

Amiibo provides a handler to get all common fields between the ENGAmiibo and JPNAmiibo.

type ENGAmiibo

type ENGAmiibo struct {

	// Affiliation is the series of Nintendo Amiibo products the item is associated with.
	Affiliation string `json:"affiliation"`

	// Available is the Nintendo Amiibo availability status.
	Availiable bool `json:"availiable"`

	// BoxImageURL is the direct URL to the Nintendo Amiibo product box.
	BoxImageURL string `json:"box_image_url"`

	// Description is the verbose description for the Nintendo Amiibo product.
	Description string `json:"description"`

	// DescriptionAlternative is the alternative description for the Nintendo Amiibo product.
	DescriptionAlternative string `json:"description_alternative"`

	// Path is the relative path to the Nintendo Amiibo product details.
	DetailsPath string `json:"details_path"`

	// DetailsURL is the direct URL to the Nintendo Amiibo product page.
	DetailsURL string `json:"details_url"`

	// Epoch is the release date for the Nintendo Amiibo product in seconds.
	Epoch int64 `json:"epoch"`

	// FigureImageURL is the direct URL to the Nintendo Amiibo figurine image.
	FigureImageURL string `json:"figure_image_url"`

	// Franchise is the name of the series the Nintendo Amiibo product is affiliated with.
	Franchise string `json:"franchise"`

	// GameID is the ID associated with the Nintendo software the Nintendo Amiibo product is associated with.
	GameID string `json:"game_id"`

	// Hex is the hexidecimal code associated with the Nintendo Amiibo product.
	Hex string `json:"hex"`

	// ID is the fully qualified ID for the Nintendo Amiibo product given by Nintendo of America.
	ID string `json:"id"`

	// LastModified is the formatted timestamp when the dataset was modified by Nintendo of America.
	LastModified time.Time `json:"last_modified"`

	// Name is the official name of the Nintendo Amiibo product.
	//
	// Name can contain unicode.
	Name string `json:"name"`

	// NameAlternative is the alternative name given to the Nintendo Amiibo product.
	//
	// NameAlternative can contain unicode.
	NameAlternative string `json:"name_alternative"`

	// Path is the relative path to the Nintendo Amiibo product details.
	Path string `json:"path"`

	// Price is the price of the Nintendo Amiibo product in USD.
	//
	// Price can be empty.
	Price string `json:"price"`

	// Producer is the company affiliation of the Nintendo Amiibo product.
	Producer string `json:"producer"`

	// Product is the product classification of the Nintendo Amiibo item.
	Product string `json:"product"`

	// ProductAlternative is the alternative classification for the Nintendo Amiibo product.
	ProductAlternative string `json:"product_alternative"`

	// ProductImageURL is the direct URL to the Nintendo Amiibo product image.
	ProductImageURL string `json:"product_image_url"`

	// ProductPage is the relative nintendo.com URL to the Nintendo Amiibo product page.
	ProductPage string `json:"product_page"`

	// ReleaseDate is the formatted timestamp of the Nintendo Amiibo products release date.
	ReleaseDate time.Time `json:"release_date"`

	// Series is the defined series of products that the Nintendo Amiibo product is group or affiliated with.
	Series string `json:"series"`

	// Title is the title for the Nintendo Amiibo product.
	Title string `json:"title"`

	// TitleAternative is the alternative title for the Nintendo Amiibo product.
	//
	// TitleAlternative can contain unicode.
	TitleAlternative string `json:"title_alternative"`

	// UPC is the universal product code for the Nintendo Amiibo product.
	UPC string `json:"upc"`

	// URL is the direct URL to the Nintendo Amiibo product page.
	URL string `json:"url"`

	// UUID is the UUID for the product given by Nintendo.
	UUID uuid.UUID `json:"uuid"`
}

ENGAmiibo is a formatted ENGChartAmiibo, ENGLineupAmiibo and ENGLineupItem.

func NewENGAmiibo

func NewENGAmiibo(ENGChartAmiibo *ENGChartAmiibo, ENGLineupAmiibo *ENGLineupAmiibo, ENGLineupItem *ENGLineupItem) (v ENGAmiibo, err error)

NewENGAmiibo returns a ENGAmiibo.

func ReadENGAmiibo

func ReadENGAmiibo(dir string, filename string) (v ENGAmiibo, err error)

ReadENGAmiibo reads a ENGAmiibo from disc.

func (*ENGAmiibo) AddENGChartAmiibo

func (e *ENGAmiibo) AddENGChartAmiibo(v *ENGChartAmiibo) (err error)

AddENGChartAmiibo adds the contents of a ENGChartAmiibo to the ENGAmiibo.

func (*ENGAmiibo) AddENGLineupAmiibo

func (e *ENGAmiibo) AddENGLineupAmiibo(v *ENGLineupAmiibo) (err error)

AddENGLineupAmiibo adds the contents of a ENGLineupAmiibo to the ENGAmiibo.

func (*ENGAmiibo) AddENGLineupItem

func (e *ENGAmiibo) AddENGLineupItem(v *ENGLineupItem) (err error)

AddENGLineupItem adds the contents of a ENGLineupItem to the ENGAmiibo.

func (ENGAmiibo) GetAvailable

func (e ENGAmiibo) GetAvailable() bool

GetAvailable returns the ENGAmiibo availability.

func (ENGAmiibo) GetID

func (e ENGAmiibo) GetID() string

GetID returns the ENGAmiibo ID.

func (ENGAmiibo) GetLanguage

func (e ENGAmiibo) GetLanguage() language.Tag

GetLanguage returns the ENGAmiibo language.

func (ENGAmiibo) GetMD5

func (e ENGAmiibo) GetMD5() (MD5 string, b []byte, err error)

GetMD5 returns the ENGAmiibo MD5.

func (ENGAmiibo) GetName

func (e ENGAmiibo) GetName() string

GetName returns the ENGAmiibo name.

func (ENGAmiibo) GetNameAlternative

func (e ENGAmiibo) GetNameAlternative() string

GetNameAlternative returns the ENGAmiibo name alternative.

func (ENGAmiibo) GetPrice

func (e ENGAmiibo) GetPrice() string

GetPrice returns the ENGAmiibo price.

func (ENGAmiibo) GetReleaseDate

func (e ENGAmiibo) GetReleaseDate() time.Time

GetReleaseDate returns the ENGAmiibo release date.

func (ENGAmiibo) GetSeries

func (e ENGAmiibo) GetSeries() string

GetSeries returns the ENGAmiibo series.

func (ENGAmiibo) GetURL

func (e ENGAmiibo) GetURL() string

GetURL returns the ENGAmiibo URL.

type ENGAmiiboMap

type ENGAmiiboMap (map[string]ENGAmiibo)

ENGAmiiboMap is map of ENGAmiibo.

func NewENGAmiiboMap

func NewENGAmiiboMap(ENGChart ENGChart, ENGLineup ENGLineup) (v ENGAmiiboMap, err error)

NewENGAmiiboMap returns a ENGAmiiboMap.

func ReadENGAmiiboMap

func ReadENGAmiiboMap(dir string, filename string) (v ENGAmiiboMap, err error)

ReadENGAmiiboMap reads a ENGAmiiboMap from disc.

func (*ENGAmiiboMap) Add

func (e *ENGAmiiboMap) Add(v *ENGAmiibo) (ok bool)

Add adds a ENGAmiibo to the ENGAmiiboMap.

func (*ENGAmiiboMap) Del

func (e *ENGAmiiboMap) Del(ID string) (ok bool)

Del deletes a ENGAmiibo from the ENGAmiiboMap.

func (*ENGAmiiboMap) Each

func (e *ENGAmiiboMap) Each(f func(string, ENGAmiibo))

Each performs a for-each loop through the ENGAmiiboMap.

func (*ENGAmiiboMap) Get

func (e *ENGAmiiboMap) Get(ID string) (v ENGAmiibo, ok bool)

Get gets an ENGAmiibo from the ENGAmiiboMap.

func (*ENGAmiiboMap) Has

func (e *ENGAmiiboMap) Has(ID string) (ok bool)

Has checks if the ENGAmiiboMap has a ENGAmiibo with the corresponding ID.

type ENGChart

type ENGChart struct {

	// AmiiboList is a collection of Nintendo Amiibo product information.
	AmiiboList []ENGChartAmiibo `json:"amiiboList"`

	// GameList is a collection of Nintendo Amiibo supported games.
	GameList []ENGChartGame `json:"gameList"`

	// Items is a collection of additional Nintendo Amiibo product information.
	Items []ENGChartItem `json:"items"`
}

ENGChart is the unfettered English language Nintendo Amiibo product and game support information.

ENGChart is provided by Nintendo of America.

https://www.nintendo.com/content/noa/en_US/amiibo/compatibility/jcr:content/root/responsivegrid/compatibility_chart.model.json

func GetENGChart

func GetENGChart() (req *http.Request, res *http.Response, v ENGChart, err error)

GetENGChart gets the ENGChart from nintendo.com.

func ReadENGChart

func ReadENGChart(dir string, filename string) (v ENGChart, err error)

ReadENGChart reads a ENGChart from disc.

type ENGChartAmiibo

type ENGChartAmiibo struct {

	// ID is the Nintendo Amiibo UUID.
	ID string `json:"id"`

	// Image is the relative path to the Nintendo Amiibo product image.
	Image string `json:"image"`

	// IsRelatedTo is the series or brand the Nintendo Amiibo product is related to.
	IsRelatedTo string `json:"isRelatedTo"`

	// IsReleased is the availability status of the Nintendo Amiibo product.
	IsReleased string `json:"isReleased"`

	// Name is the unformatted name of the Nintendo Amiibo product.
	Name string `json:"name"`

	// ReleaseDateMask is the YYYY-MM-DD timestamp when the Nintendo Amiibo product is or will be released.
	ReleaseDateMask string `json:"releaseDateMask"`

	// TagID is the ID assigned by Nintendo.
	TagID string `json:"tagid"`

	// Type is the Nintendo Amiibo product type.
	Type string `json:"type"`

	// URL is the relative path to the Nintendo Amiibo product page.
	URL string `json:"url"`
}

ENGChartAmiibo is the unfettered English language Nintendo Amiibo product information.

func ReadENGChartAmiibo

func ReadENGChartAmiibo(dir string, filename string) (v ENGChartAmiibo, err error)

ReadENGChartAmiibo reads a ENGChartAmiibo from disc.

func (ENGChartAmiibo) GetID

func (e ENGChartAmiibo) GetID() string

GetID returns a ID for the ENGChartAmiibo.

type ENGChartGame

type ENGChartGame struct {

	// ID is the Nintendo game UUID.
	ID string `json:"id"`

	// Image is the relative path to the Nintendo game product image.
	Image string `json:"image"`

	// IsReleased is the availability status of the Nintendo game product.
	IsReleased string `json:"isReleased"`

	// Name is the unformatted name of the Nintendo game.
	Name string `json:"name"`

	// Path is the relative path to the Nintendo game product page.
	Path string `json:"path"`

	// ReleaseDateMask is the YYYY-MM-DD timestamp when the Nintendo game is or will be released.
	ReleaseDateMask string `json:"releaseDateMask"`

	// Type is the Nintendo product type.
	Type string `json:"type"`

	// URL is the relative path to the game page that supports a Nintendo Amiibo product.
	URL string `json:"url"`
}

ENGChartGame is the unfettered English language Nintendo Amiibo supported game information.

func ReadENGChartGame

func ReadENGChartGame(dir string, filename string) (v ENGChartGame, err error)

ReadENGChartGame reads a ENGChartGame from disc.

func (ENGChartGame) GetID

func (e ENGChartGame) GetID() string

GetID returns the ID for ENGChartGame.

type ENGChartItem

type ENGChartItem struct {

	// Description is the Nintendo Amiibo item product description.
	Description string `json:"description"`

	// LastModified is the Nintendo Amiibo item product release date in milliseconds.
	LastModified int64 `json:"lastModified"`

	// Path is the relative path to the Nintendo Amiibo item product page.
	Path string `json:"path"`

	// Title is the unformatted name of the Nintendo Amiibo item product.
	Title string `json:"title"`

	// URL is the relative path to the Nintendo Amiibo item page.
	URL string `json:"url"`
}

ENGChartItem is the unfettered English language Nintendo Amiibo additional product information.

func ReadENGChartItem

func ReadENGChartItem(dir string, filename string) (v ENGChartItem, err error)

ReadENGChartItem reads a ENGChartItem from disc.

func (ENGChartItem) GetID

func (e ENGChartItem) GetID() string

GetID returns a ID for the ENGChartItem.

type ENGGame

type ENGGame struct {

	// Available is the Nintendo game availability status.
	Available bool `json:"available"`

	// Description is the verbose description for the Nintendo game product.
	Description string `json:"description"`

	// LastModified is the formatted timestamp when the dataset was modified by Nintendo of America.
	LastModified time.Time `json:"last_modified"`

	// Name is the official name of the Nintendo game product.
	//
	// Name can contain unicode.
	Name string `json:"name"`

	// Path is the relative path to the Nintendo game product details.
	Path string `json:"path"`

	// Product is the product classification of the Nintendo software item.
	Product string `json:"product"`

	// ProductImageURL is the direct URL to the Nintendo software product image.
	ProductImageURL string `json:"product_image_url"`

	// ReleaseDate is the formatted timestamp of the Nintendo software release date.
	ReleaseDate time.Time `json:"release_date"`

	// Title is the title for the Nintendo Amiibo product.
	Title string `json:"title"`

	// URL is the direct URL to the Nintendo Amiibo software page.
	URL string `json:"url"`

	// UUID is the UUID for the product given by Nintendo.
	UUID uuid.UUID `json:"uuid"`
}

ENGGame is a formatted ENGChartGame and ENGChartItem.

func NewENGGame

func NewENGGame(ENGChartGame *ENGChartGame, ENGChartItem *ENGChartItem) (v ENGGame, err error)

NewENGGame returns a ENGGame.

func ReadENGGame

func ReadENGGame(dir string, filename string) (v ENGGame, err error)

ReadENGGame reads a ENGGame from disc.

func (*ENGGame) AddENGChartGame

func (e *ENGGame) AddENGChartGame(v *ENGChartGame) (err error)

AddENGChartGame adds the contents of a ENGChartGame to the ENGGame.

func (*ENGGame) AddENGChartItem

func (e *ENGGame) AddENGChartItem(v *ENGChartItem) (err error)

AddENGChartItem adds the contents of a ENGChartItem to the ENGGame.

func (ENGGame) GetAvailable

func (e ENGGame) GetAvailable() bool

GetAvailable returns the ENGGame availability.

func (ENGGame) GetID

func (e ENGGame) GetID() string

GetID returns the ENGGame ID.

func (ENGGame) GetLanguage

func (e ENGGame) GetLanguage() language.Tag

GetLanguage returns the ENGGame language.

func (ENGGame) GetMD5

func (e ENGGame) GetMD5() (MD5 string, b []byte, err error)

GetMD5 returns the ENGGame MD5.

func (ENGGame) GetName

func (e ENGGame) GetName() string

GetName returns the ENGGame name.

func (ENGGame) GetNameAlternative

func (e ENGGame) GetNameAlternative() string

GetNameAlternative returns the ENGGame name alternative.

func (ENGGame) GetReleaseDate

func (e ENGGame) GetReleaseDate() time.Time

GetReleaseDate returns the ENGGame release date.

func (ENGGame) GetURL

func (e ENGGame) GetURL() string

GetURL returns the ENGGame URL.

type ENGGameMap

type ENGGameMap (map[string]ENGGame)

ENGGameMap is map of ENGGame.

func NewENGGameMap

func NewENGGameMap(ENGChart *ENGChart) (v ENGGameMap, err error)

NewENGGameMap returns a ENGGameMap.

func ReadENGGameMap

func ReadENGGameMap(dir string, filename string) (v ENGGameMap, err error)

ReadENGGameMap reads a ENGGameMap from disc.

func (*ENGGameMap) Add

func (e *ENGGameMap) Add(v *ENGGame) (ok bool)

Add adds a ENGGame to the ENGGameMap.

func (*ENGGameMap) Del

func (e *ENGGameMap) Del(ID string) (ok bool)

Del deletes a ENGGame from the ENGGameMap.

func (*ENGGameMap) Each

func (e *ENGGameMap) Each(f func(string, ENGGame))

Each performs a for-each loop through the ENGGameMap.

func (*ENGGameMap) Get

func (e *ENGGameMap) Get(ID string) (v ENGGame, ok bool)

Get gets an ENGGame from the ENGGameMap.

func (*ENGGameMap) Has

func (e *ENGGameMap) Has(ID string) (ok bool)

Has checks if the ENGGameMap has a ENGGame with the corresponding ID.

type ENGLineup

type ENGLineup struct {

	// AmiiboList is a collection of Nintendo Amiibo products containing their product information.
	AmiiboList []ENGLineupAmiibo `json:"amiiboList"`

	// ComponentPath is the relative path to the Nintendo resource file.
	ComponentPath string `json:"componentPath"`

	// Items is a collection of metadata related to Nintendo Amiibo products.
	Items []ENGLineupItem `json:"items"`
}

ENGLineup is the unfettered Nintendo Amiibo lineup information provided by nintendo.com.

ENGLineup contains the product information for the Nintendo Amiibo product as well as some related metadata.

ENGLineup is provided by Nintendo of America.

https://www.nintendo.com/content/noa/en_US/amiibo/line-up/jcr:content/root/responsivegrid/lineup.model.json

func GetENGLineup

func GetENGLineup() (req *http.Request, res *http.Response, v ENGLineup, err error)

GetENGLineup gets the http.Response from nintendo.com for the lineup Nintendo Amiibo JSON.

func ReadENGLineup

func ReadENGLineup(dir string, filename string) (v ENGLineup, err error)

ReadENGLineup reads a ENGLineup from disc.

type ENGLineupAmiibo

type ENGLineupAmiibo struct {

	// AmiiboName is the name of the Nintendo Amiibo product.
	//
	// AmiiboName can contain special characters that require filtering.
	AmiiboName string `json:"amiiboName"`

	// AmiiboPage is the relative URL to the Nintendo Amiibo product details page.
	//
	// AmiiboPage requires nintendo.com to be prepended to the AmiiboPage.
	AmiiboPage string `json:"amiiboPage"`

	// BoxArtURL is the relative URL to the Nintendo Amiibo box image page.
	//
	// BoxArtURL requires nintendo.com to be prepended to the URL.
	BoxArtURL string `json:"boxArtUrl"`

	// DetailsPath is the relative path to the Nintendo Amiibo product information page.
	DetailsPath string `json:"detailsPath"`

	// DetailsURL is the relative URL to the Nintendo Amiibo product information page.
	//
	// DetailsURL requires nintendo.com to be prepended to the URL.
	DetailsURL string `json:"detailsUrl"`

	// FigureURL is the relative URL to the Nintendo Amiibo product image.
	//
	// FigureURL requires nintendo.com to be prepended to the FigureURL.
	FigureURL string `json:"figureUrl"`

	// Franchise is the Nintendo or third-party product the Nintendo Amiibo product is affiliated with.
	//
	// Franchise is often null.
	Franchise string `json:"franchise"`

	// GameCode is the ID for the Nintendo game that the Nintendo Amiibo product is affiliated with.
	GameCode string `json:"gameCode"`

	// HexCode is the hexidecimal code for the Nintendo Amiibo product.
	HexCode string `json:"hexCode"`

	// OverviewDescription is the verbose Nintendo Amiibo product summary.
	//
	// OverviewDescription contains HTML tags and requires filtering.
	OverviewDescription string `json:"overviewDescription"`

	// Price is the price of the Nintendo Amiibo product in USD.
	//
	// Price need to be converted to a float.
	Price string `json:"price"`

	// PresentedBy is the namespace of the affiliated partner for the Nintendo Amiibo product.
	PresentedBy string `json:"presentedBy"`

	// ReleaseDateMask is the DD-MM-YYYY timestamp for the Nintendo Amiibo product release date.
	ReleaseDateMask string `json:"releaseDateMask"`

	// Series is the Nintendo product series the Nintendo Amiibo product is affiliated with.
	Series string `json:"series"`

	// Slug is the formatted namespace of the Nintendo Amiibo product.
	Slug string `json:"slug"`

	// Type is the Nintendo Amiibo product classification type.
	Type string `json:"type"`

	// UnixTimestamp is the Nintendo Amiibo product release date in milliseconds.
	UnixTimestamp int64 `json:"unixTimestamp"`

	// UPC is the universal product code for the Nintendo Amiibo product.
	UPC string `json:"upc"`
}

ENGLineupAmiibo is the unfettered Nintendo Amiibo product information from nintendo.com.

ENGLineupAmiibo contains the English language product information for a specific Nintendo Amiibo.

func ReadENGLineupAmiibo

func ReadENGLineupAmiibo(dir string, filename string) (v ENGLineupAmiibo, err error)

ReadENGLineupAmiibo reads a ENGLineupAmiibo from disc.

func (ENGLineupAmiibo) GetID

func (e ENGLineupAmiibo) GetID() string

GetID returns the ENGLineupAmiibo ID.

type ENGLineupItem

type ENGLineupItem struct {

	// Description is the verbose Nintendo Amiibo product summary.
	//
	// Description is often a null field.
	Description string `json:"description"`

	// LastModified is the Nintendo Amiibo product release date in milliseconds.
	LastModified int64 `json:"lastModified"`

	// Path is the relative path to the Nintendo Amiibo product information page according to the nintendo.com CDN.
	Path string `json:"path"`

	// Title is the name of the Nintendo Amiibo product.
	//
	// Title can contain special characters that require filtering.
	Title string `json:"title"`

	// URL is the relative path URL to the Nintendo Amiibo product information page.
	//
	// URL requires nintendo.com to be prepended to the URL.
	URL string `json:"url"`
}

ENGLineupItem is the unfettered Nintendo Amiibo product additional information from nintendo.com.

ENGLineupItem contains additional information for a Nintendo Amiibo product.

func ReadENGLineupItem

func ReadENGLineupItem(dir string, filename string) (v ENGLineupItem, err error)

ReadENGLineupItem reads a ENGLineupItem from disc.

func (ENGLineupItem) GetID

func (e ENGLineupItem) GetID() string

GetID returns the ENGLineupItem ID.

type JPNAmiibo

type JPNAmiibo struct {
	Chart bool `json:"chart"`

	// ID is the fully qualified ID for the Nintendo Amiibo product given by Nintendo Japan.
	ID string `json:"id"`

	// Large indicates the whether the Nintendo Amiibo product is considered a large scale item.
	Large bool `json:"large"`

	// Limited indicates the whether the Nintendo Amiibo product is a limited release.
	Limited bool `json:"limited"`

	// Name is the official name of the Nintendo Amiibo product.
	//
	// Name contains Japanese Hiragana.
	Name string `json:"name"`

	// NameAlternative is the alternative name given to the Nintendo Amiibo product.
	//
	// NameAlternative contains Japanese Hiragana.
	NameAlternative string `json:"name_alternative"`

	// New indicates the whether the Nintendo Amiibo product is a new release.
	New bool `json:"new"`

	// Price is the price of the Nintendo Amiibo product in JPY.
	//
	// Price can be empty.
	Price string `json:"price"`

	Priority int64 `json:"priority"`

	// ReleaseDate is the formatted timestamp of the Nintendo Amiibo products release date.
	ReleaseDate time.Time `json:"release_date"`

	// ReleaseDateAlternative is the Japanese formatted Nintendo Amiibo product release date.
	ReleaseDateAlternative time.Time `json:"release_data_alternative"`

	// Series is the defined series of products that the Nintendo Amiibo product is group or affiliated with.
	Series string `json:"series"`

	// Software is a collection of Nintendo software products the Nintendo Amiibo is compatible with.
	Software JPNAmiiboSoftwareMap `json:"software"`

	// URL is the direct URL to the Nintendo Amiibo product page.
	URL string `json:"url"`
}

JPNAmiibo is a formatted JPNChartItem and JPNLineupItem.

func NewJPNAmiibo

func NewJPNAmiibo(JPNChartItem *JPNChartItem, JPNLineupItem *JPNLineupItem) (v JPNAmiibo, err error)

NewJPNAmiibo returns a new NewJPNAmiibo.

func ReadJPNAmiibo

func ReadJPNAmiibo(dir string, filename string) (v JPNAmiibo, err error)

ReadJPNAmiibo reads a JPNAmiibo from disc.

func (*JPNAmiibo) AddJPNChartItem

func (j *JPNAmiibo) AddJPNChartItem(v *JPNChartItem) (err error)

AddJPNChartItem adds a JPNChartItem to the JPNAmiibo.

func (*JPNAmiibo) AddJPNLineupItem

func (j *JPNAmiibo) AddJPNLineupItem(v *JPNLineupItem) (err error)

AddJPNLineupItem adds a JPNLineupItem to the JPNAmiibo.

func (JPNAmiibo) GetAvailable

func (j JPNAmiibo) GetAvailable() bool

GetAvailable returns the JPNAmiibo availability.

func (JPNAmiibo) GetID

func (j JPNAmiibo) GetID() string

GetID returns the JPNAmiibo ID.

func (JPNAmiibo) GetLanguage

func (j JPNAmiibo) GetLanguage() language.Tag

GetLanguage returns the JPNAmiibo language.

func (JPNAmiibo) GetMD5

func (j JPNAmiibo) GetMD5() (MD5 string, b []byte, err error)

GetMD5 returns the JPNAmiibo MD5.

func (JPNAmiibo) GetName

func (j JPNAmiibo) GetName() string

GetName returns the JPNAmiibo name.

func (JPNAmiibo) GetNameAlternative

func (j JPNAmiibo) GetNameAlternative() string

GetNameAlternative returns the JPNAmiibo name alternative.

func (JPNAmiibo) GetPrice

func (j JPNAmiibo) GetPrice() string

GetPrice returns the JPNAmiibo price.

func (JPNAmiibo) GetReleaseDate

func (j JPNAmiibo) GetReleaseDate() time.Time

GetReleaseDate returns the JPNAmiibo release date.

func (JPNAmiibo) GetSeries

func (j JPNAmiibo) GetSeries() string

GetSeries returns the JPNAmiibo series.

func (JPNAmiibo) GetURL

func (j JPNAmiibo) GetURL() string

GetURL returns the JPNAmiibo URL

type JPNAmiiboComing

type JPNAmiiboComing struct {
	Description            string
	DetailsPath            string
	DetailsURL             string
	Label                  string
	Name                   string
	NameAlternative        string
	Price                  string
	ReleaseDate            time.Time
	ReleaseDateAlternative string
	Series                 string
	Title                  string
	URL                    string
}

JPNAmiiboComing is a formatted JPNLineupComingItem.

JPNAmiiboComing is currently considered a work in progress and may change as new fields are discovered.

func (*JPNAmiiboComing) AddJPNLineupComingItem

func (j *JPNAmiiboComing) AddJPNLineupComingItem(v *JPNLineupComingItem) (err error)

AddJPNLineupComingItem adds a JPNLineupComingItem to the JPNAmiiboComing.

type JPNAmiiboMap

type JPNAmiiboMap (map[string]JPNAmiibo)

JPNAmiiboMap is a map of JPNAmiibo.

func NewJPNAmiiboMap

func NewJPNAmiiboMap(JPNChart *JPNChart, JPNLineup *JPNLineup) (v JPNAmiiboMap, err error)

NewJPNAmiiboMap returns a new JPNAmiiboMap.

func ReadJPNAmiiboMap

func ReadJPNAmiiboMap(dir string, filename string) (v JPNAmiiboMap, err error)

ReadJPNAmiiboMap reads a JPNAmiiboMap from disc.

func (*JPNAmiiboMap) Add

func (j *JPNAmiiboMap) Add(v *JPNAmiibo) (ok bool)

Add adds a JPNAmiibo to the JPNAmiiboMap.

func (*JPNAmiiboMap) Del

func (j *JPNAmiiboMap) Del(ID string) (ok bool)

Del deletes a JPNAmiibo from the JPNAmiiboMap.

func (*JPNAmiiboMap) Each

func (j *JPNAmiiboMap) Each(f func(string, JPNAmiibo))

Each performs a for-each loop through the ENGAmiiboMap.

func (*JPNAmiiboMap) Get

func (j *JPNAmiiboMap) Get(ID string) (v JPNAmiibo, ok bool)

Get gets an JPNAmiibo from the JPNAmiiboMap.

func (*JPNAmiiboMap) Has

func (j *JPNAmiiboMap) Has(ID string) (ok bool)

Has checks if the JPNAmiiboMap has a JPNAmiibo with the corresponding ID.

type JPNAmiiboSoftware

type JPNAmiiboSoftware struct {
	// Description is the verbose description for the Nintendo software product.
	Description string `json:"description"`
	// Digital indicates the whether the Nintendo software product is a digital only release.
	Digital bool `json:"digital"`
	// ID is the fully qualified ID for the Nintendo software product given by Nintendo Japan.
	ID string `json:"id"`
	// Name is the official name of the Nintendo software product.
	//
	// Name contains Japanese Hiragana.
	Name string `json:"name"`
	// URL is the direct URL to the Nintendo software product page.
	URL string `json:"url"`
}

JPNAmiiboSoftware is a formatted JPNChartItemSoftware.

func NewJPNAmiiboSoftware

func NewJPNAmiiboSoftware(JPNChartItemSoftware *JPNChartItemSoftware) (v JPNAmiiboSoftware, err error)

NewJPNAmiiboSoftware returns a new JPNAmiiboSoftware

func ReadJPNAmiiboSoftware

func ReadJPNAmiiboSoftware(dir string, filename string) (v JPNAmiiboSoftware, err error)

ReadJPNAmiiboSoftware reads a JPNAmiiboSoftware from disc.

func (*JPNAmiiboSoftware) AddJPNChartItemSoftware

func (j *JPNAmiiboSoftware) AddJPNChartItemSoftware(v *JPNChartItemSoftware) (err error)

AddJPNChartItemSoftware adds a JPNChartItemSoftware to the JPNAmiiboSoftware

func (JPNAmiiboSoftware) GetID

func (j JPNAmiiboSoftware) GetID() string

GetID returns the JPNAmiiboSoftware ID.

type JPNAmiiboSoftwareMap

type JPNAmiiboSoftwareMap (map[string]JPNAmiiboSoftware)

JPNAmiiboSoftwareMap is a map of JPNAmiiboSoftware.

func (*JPNAmiiboSoftwareMap) Add

Add adds a JPNAmiiboSoftware to the JPNAmiiboSoftwareMap.

type JPNChart

type JPNChart struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"items"`

	// Items is a collection of Nintendo Amiibo product information.
	Items []JPNChartItem `xml:"item"`
}

JPNChart is the unfettered Japanese language Nintendo Amiibo product and game support information.

JPNChart is provided by Nintendo Japan.

https://www.nintendo.co.jp/hardware/amiibo/chart/data/chart.xml

func GetJPNChart

func GetJPNChart() (req *http.Request, res *http.Response, v JPNChart, err error)

GetJPNChart gets the JPNChart from nintendo.co.jp.

func ReadJPNChart

func ReadJPNChart(dir string, filename string) (v JPNChart, err error)

ReadJPNChart reads a JPNChart from disc.

type JPNChartItem

type JPNChartItem struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"item"`

	// Code is the ID code for the Nintendo product.
	Code string `xml:"code"`

	// Name is the name of the Nintendo product in Japanese Hiragana.
	Name string `xml:"name"`

	// Series is the Japanese Hiragana for the Nintendo product that the Nintendo Amiibo product is affiliated with.
	//
	// Series will need to be translated from Japanese to English.
	Series string `xml:"series"`

	// Softwares is a collection of metadata that the Nintendo Amiibo product integrates with.
	Softwares []JPNChartItemSoftware `xml:"softwares>software"`
}

JPNChartItem is the unfettered Japanese language Nintendo Amiibo product information.

func ReadJPNChartItem

func ReadJPNChartItem(dir string, filename string) (v JPNChartItem, err error)

ReadJPNChartItem reads a JPNChartItem from disc.

func (JPNChartItem) GetID

func (j JPNChartItem) GetID() string

GetID returns the JPCharItem ID.

type JPNChartItemSoftware

type JPNChartItemSoftware struct {

	// Code is the ID code for the Nintendo product.
	Code string `xml:"code"`

	// Name is the name of the Nintendo product in Japanese Hiragana.
	Name string `xml:"name"`

	// More is the verbose description for the Nintendo Amiibo chart item.
	More string `xml:"more"`

	// Pickup is a provided property with an unclear purpose.
	Pickup int64 `xml:"pickup"`

	// ReadWrite is a provided property with an unclear purpose.
	ReadWrite string `xml:"readwrite"`
}

JPNChartItemSoftware is the unfettered Japanese language Nintendo software support for a Nintendo Amiibo product.

type JPNChartSoftware

type JPNChartSoftware struct {
	XMLName xml.Name `xml:"items"`

	Items []JPNChartSoftwareItem `xml:"item"`
}

JPNChartSoftware is the unfettered Japanese language Nintendo Amiibo software information.

func GetJPNChartSoftware

func GetJPNChartSoftware() (req *http.Request, res *http.Response, v JPNChartSoftware, err error)

GetJPNChartSoftware gets the JPNChartSoftware from nintendo.co.jp.

func ReadJPNChartSoftware

func ReadJPNChartSoftware(dir string, filename string) (v JPNChartSoftware, err error)

ReadJPNChartSoftware reads a JPNChartSoftware from disc.

type JPNChartSoftwareItem

type JPNChartSoftwareItem struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"item"`

	// Blank is the direct URL to the Nintendo software information.
	Blank string `xml:"blank"`

	// Chart is a integer representation of a boolean.
	//
	// Chart relates to the occurrence of the Nintendo Amiibo product in the chart XML.
	Chart int `xml:"chart"`

	// Chartseries is the Japanese Hiragana for the Nintendo hardware system that the software is supported for.
	//
	// Chartseries will need to be translated from Japanese to English.
	Chartseries string `xml:"chartseries"`

	// Code is the ID code for the Nintendo product.
	Code string `xml:"code"`

	// Date is the YYYYMMDD expression of the Nintendo Amiibo product release date.
	Date string `xml:"date"`

	// DisplayDate is the Japanese Hiragana expression of the Nintedo Amiibo product release date.
	//
	// DisplayDate currently (2019年3月7日発売) has a typo on the nintendo.co.jp and exists
	// as dispalydate.
	DisplayDate string `xml:"dispalydate"`

	Icon int `xml:"icon"`

	// Info is the verbose description of the Nintendo software product in Japanese Hiragana.
	Info string `xml:"info"`

	// Name is the name of the Nintendo product in Japanese Hiragana.
	Name string `xml:"name"`

	// NameAlternative is the alternative name given to the Nintendo Amiibo product.
	//
	// NameAlternative contains Japanese Hiragana.
	NameKana string `xml:"nameKana"`

	// New is a integer representation of a boolean.
	//
	// New relates to the newness of the Nintendo software product.
	New int `xml:"new"`

	// Price is the price of the Nintendo Amiibo product in Japanese Yen.
	Price string `xml:"price"`

	// Priority is the numerical rank of the Nintendo Amiibo product.
	Priority string `xml:"priority"`

	// Series is the Japanese Hiragana for the Nintendo hardware system that the software is supported for.
	//
	// Series will need to be translated from Japanese to English.
	Series string `xml:"series"`

	// SoftOption is the Japanese Hiragana for the Nintendo hardware system that the software is supported for.
	//
	// SoftOption will need to be translated from Japanese to English.
	SoftOption string `xml:"softoption"`

	// Subname is the alternative description for the Nintendo software product.
	Subname string `xml:"subname"`
}

JPNChartSoftwareItem is the unfettered Japanese language Nintendo Amiibo software information.

func ReadJPNChartSoftwareItem

func ReadJPNChartSoftwareItem(dir string, filename string) (v JPNChartSoftwareItem, err error)

ReadJPNChartSoftwareItem reads a JPNChartSoftwareItem from disc.

func (JPNChartSoftwareItem) GetID

func (j JPNChartSoftwareItem) GetID() string

GetID returns the JPNChartSoftwareItem ID.

type JPNLineup

type JPNLineup struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"items"`

	// Item is a collection of Nintendo Amiibo products containing their product information in Japanese.
	Items []JPNLineupItem `xml:"item"`

	// SeriesItem is a collection of Nintendo Amiibo product auxiliary information.
	SeriesItems []JPNLineupSeriesItem `xml:"series_item"`
}

JPNLineup is the unfettered Japanese language Nintendo Amiibo product and game support information.

JPNLineup is provided by Nintendo of America.

https://www.nintendo.co.jp/hardware/amiibo/chart/data/lineup.xml

func GetJPNLineup

func GetJPNLineup() (req *http.Request, res *http.Response, v JPNLineup, err error)

GetJPNLineup gets the http.Response from nintendo.co.jp for the lineup Nintendo Amiibo XML.

func ReadJPNLineup

func ReadJPNLineup(dir string, filename string) (v JPNLineup, err error)

ReadJPNLineup reads a JPNLineup from disc.

type JPNLineupComing

type JPNLineupComing struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"data"`

	// Items is a collection of Nintendo Amiibo product information.
	Items []JPNLineupComingItem `xml:"items>item"`
}

JPNLineupComing is the unfettered upcoming Nintendo Amiibo product information provided by nintendo.co.jp.

func GetJPNLineupComing

func GetJPNLineupComing() (req *http.Request, res *http.Response, v JPNLineupComing, err error)

GetJPNLineupComing gets the http.Response from nintendo.co.jp for the lineup Nintendo Amiibo XML.

func ReadJPNLineupComing

func ReadJPNLineupComing(dir string, filename string) (v JPNLineupComing, err error)

ReadJPNLineupComing reads a JPNLineupComing from disc.

type JPNLineupComingItem

type JPNLineupComingItem struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"item"`

	// AmiiboLabel is the label for the Nintendo Amiibo product.
	AmiiboLabel string `xml:"amiibo_label"`

	// AmiiboLink is the URL for the Nintendo Amiibo product.
	AmiiboLink string `xml:"amiibo_link"`

	// AmiiboSeries is the Japanese Hiragana for the Nintendo product the Amiibo is affiliated with.
	AmiiboSeries string `xml:"amiibo_series"`

	// D is the YYYY-MM-DD datestamp for the Nintendo Amiibo product.
	D string `xml:"d"`

	// Link is the URL to the Nintendo Amiibo product.
	Link string `xml:"link"`

	// LinkTarget is the relative URL to the Nintendo Amiibo product.
	LinkTarget string `xml:"link_target"`

	// Memo is the verbose title for the Nintendo Amiibo product.
	Memo string `xml:"memo"`

	// Price is the price of the Nintendo Amiibo in Japanese Hiragana.
	Price string `xml:"price"`

	// ReleaseDateStr is the datestamp for the Nintendo Amiibo product release date in Japanese Hiragana.
	ReleaseDateStr string `xml:"release_date_str"`

	// ThumbVariation is the alternative namespace for the Nintendo Amiibo product.
	ThumbVariation string `xml:"thumb_variation"`

	// Title is the Japanese title in either Hiragana or Kanji for Nintendo Amiibo product.
	Title string `xml:"title"`

	// TitleRuby is the Japanese Hiragana for the Nintendo Amiibo product.
	TitleRuby string `xml:"title_ruby"`
}

JPNLineupComingItem is the unfettered upcoming Nintendo Amiibo product information provided by nintendo.co.jp.

func ReadJPNLineupComingItem

func ReadJPNLineupComingItem(dir string, filename string) (v JPNLineupComingItem, err error)

ReadJPNLineupComingItem reads a JPNLineupComingItem from disc.

func (JPNLineupComingItem) GetID

func (j JPNLineupComingItem) GetID() string

GetID returns the JPNLineupComingItem ID.

type JPNLineupItem

type JPNLineupItem struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"item"`

	// BigSize is a integer representation of a boolean.
	//
	// BigSize relates to the scale of the Nintendo Amiibo product.
	BigSize int `xml:"bigsize"`

	// Chart is a integer representation of a boolean.
	//
	// Chart relates to the occurrence of the Nintendo Amiibo product in the chart XML.
	Chart int64 `xml:"chart"`

	// Code is the English ID for the Nintendo Amiibo product from the Japanese CDN.
	Code string `xml:"code"`

	// Date is the YYYYMMDD expression of the Nintendo Amiibo product release date.
	Date string `xml:"date"`

	// DisplayDate is the Japanese Hiragana expression of the Nintedo Amiibo product release date.
	//
	// DisplayDate currently (5/07/2020 (DD-MM-YYYY)) has a typo on the nintendo.co.jp and exists
	// as dispalydate.
	DisplayDate string `xml:"displayDate"`

	// Limited is a integer representation of a boolean.
	//
	// Limited relates to the rareness of the Nintendo Amiibo product.
	Limited int `xml:"limited"`

	// Name is the name of the Nintendo product in Japanese Hiragana.
	Name string `xml:"name"`

	// NameKana is the name of the Nintendo Amiibo product in Japanese Hiragana.
	NameKana string `xml:"nameKana"`

	// New is a integer representation of a boolean.
	//
	// New relates to the newness of the Nintendo Amiibo product.
	New int `xml:"new"`

	// Price is the price of the Nintendo Amiibo product in Japanese Yen.
	Price string `xml:"price"`

	// Priority is the numerical rank of the Nintendo Amiibo product.
	Priority int64 `xml:"priority"`

	// Series is the Japanese Hiragana for the Nintendo product that the Nintendo Amiibo product is affiliated with.
	//
	// Series will need to be translated from Japanese to English.
	Series string `xml:"series"`
}

JPNLineupItem is the unfettered Nintendo Amiibo product information from nintendo.co.jp.

JPNLineupItem is provided in Japanese Hiragana.

func ReadJPNLineupItem

func ReadJPNLineupItem(dir string, filename string) (v JPNLineupItem, err error)

ReadJPNLineupItem reads a JPNLineupItem from disc.

func (JPNLineupItem) GetID

func (j JPNLineupItem) GetID() string

GetID returns the JPNLineItem ID.

type JPNLineupSeriesItem

type JPNLineupSeriesItem struct {

	// XMLName is the xml node.
	XMLName xml.Name `xml:"series_item"`

	// BGColor is the hexidecimal code for the Nintendo Amiibo product.
	BGColor string `xml:"bgcolor"`

	// Color is the hexidecimal code for the Nintendo Amiibo product.
	Color string `xml:"color"`

	// Name is the name of the Nintendo product in Japanese Hiragana.
	Name string `xml:"name"`
}

JPNLineupSeriesItem is the unfettered Nintendo Amiibo product additional information from nintendo.co.jp.

JPNLineupSeriesItem is provided in Japanese Hiragana.

func ReadJPNLineupSeriesItem

func ReadJPNLineupSeriesItem(dir string, filename string) (v JPNLineupSeriesItem, err error)

ReadJPNLineupSeriesItem reads a JPNLineupSeriesItem from disc.

type JPNSoftware

type JPNSoftware struct {

	// ID is the fully qualified ID for the Nintendo software product given by Nintendo Japan.
	ID string `json:"id"`

	// Name is the official name of the Nintendo software product.
	//
	// Name contains Japanese Hiragana.
	Name string `json:"name"`

	// NameAlternative is the alternative name given to the Nintendo software product.
	//
	// NameAlternative contains Japanese Hiragana.
	NameAlternative string `json:"name_alternative"`

	// Platform is the Nintendo hardware platform the software is available on.
	Platform string `json:"platform"`

	// Price is the price of the Nintendo software product in JPY.
	//
	// Price can be empty.
	Price string `json:"price"`

	Priority string `json:"priority"`

	// ReleaseDate is the formatted timestamp of the Nintendo software products release date.
	ReleaseDate time.Time `json:"release_date"`

	// URL is the direct URL to the Nintendo software product page.
	URL string `json:"url"`
}

JPNSoftware is a formatted JPNChartSoftwareItem.

func ReadJPNSoftware

func ReadJPNSoftware(dir string, filename string) (v JPNSoftware, err error)

ReadJPNSoftware reads a JPNSoftware from disc.

func (*JPNSoftware) AddJPNChartSoftwareItem

func (j *JPNSoftware) AddJPNChartSoftwareItem(v *JPNChartSoftwareItem) (err error)

AddJPNChartSoftwareItem adds a JPNChartSoftwareItem to the JPNSoftware.

func (JPNSoftware) GetAvailable

func (j JPNSoftware) GetAvailable() bool

GetAvailable returns the JPNSoftware availability.

func (JPNSoftware) GetID

func (j JPNSoftware) GetID() string

GetID returns the JPNSoftware ID.

func (JPNSoftware) GetLanguage

func (j JPNSoftware) GetLanguage() language.Tag

GetLanguage returns the JPNSoftware language.

func (JPNSoftware) GetMD5

func (j JPNSoftware) GetMD5() (MD5 string, b []byte, err error)

GetMD5 returns the JPNSoftware MD5.

func (JPNSoftware) GetName

func (j JPNSoftware) GetName() string

GetName returns the JPNSoftware name.

func (JPNSoftware) GetNameAlternative

func (j JPNSoftware) GetNameAlternative() string

GetNameAlternative returns the JPNSoftware name alternative.

func (JPNSoftware) GetReleaseDate

func (j JPNSoftware) GetReleaseDate() time.Time

GetReleaseDate returns the JPNSoftware release date.

func (JPNSoftware) GetURL

func (j JPNSoftware) GetURL() string

GetURL returns the JPNSoftware URL.

type JPNSoftwareMap

type JPNSoftwareMap (map[string]JPNSoftware)

JPNSoftwareMap is a map of JPNSoftware.

func NewJPNSoftwareMap

func NewJPNSoftwareMap(JPNChartSoftware *JPNChartSoftware) (v JPNSoftwareMap, err error)

NewJPNSoftwareMap returns a new JPNSoftwareMap.

func ReadJPNSoftwareMap

func ReadJPNSoftwareMap(dir string, filename string) (v JPNSoftwareMap, err error)

ReadJPNSoftwareMap reads a JPNSoftwareMap from disc.

func (*JPNSoftwareMap) Add

func (j *JPNSoftwareMap) Add(v *JPNSoftware) (ok bool)

Add adds a JPNSoftware to the JPNSoftwareMap.

func (*JPNSoftwareMap) Del

func (j *JPNSoftwareMap) Del(ID string) (ok bool)

Del deletes a JPNSoftware from the JPNSoftwareMap.

func (*JPNSoftwareMap) Each

func (j *JPNSoftwareMap) Each(f func(string, JPNSoftware))

Each performs a for-each loop through the JPNSoftwareMap.

func (*JPNSoftwareMap) Get

func (j *JPNSoftwareMap) Get(ID string) (v JPNSoftware, ok bool)

Get gets an JPNSoftware from the JPNSoftwareMap.

func (*JPNSoftwareMap) Has

func (j *JPNSoftwareMap) Has(ID string) (ok bool)

Has checks if the JPNSoftwareMap has a JPNSoftware with the corresponding ID.

type Software

type Software interface {
	GetAvailable() bool
	GetID() string
	GetLanguage() language.Tag
	GetMD5() (string, []byte, error)
	GetName() string
	GetNameAlternative() string
	GetReleaseDate() time.Time
	GetURL() string
}

Software is a generic interface for an Nintendo software product.

Software provides a handler to get all common fields between the ENGGame and JPNSoftware.

Jump to

Keyboard shortcuts

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