varasto: github.com/function61/varasto/pkg/igdbapi Index | Files

package igdbapi

import "github.com/function61/varasto/pkg/igdbapi"

IGDB (Internet Game Database) API

Index

Package Files

externalidextractor.go igdb.go types.go

Constants

const (
    WebsiteOfficial  = 1
    WebsiteWikia     = 2
    WebsiteWikipedia = 3
    WebsiteFacebook  = 4
    WebsiteTwitter   = 5
    WebsiteTwitch    = 6
    WebsiteInstagram = 8
    WebsiteYoutube   = 9
    WebsiteIphone    = 10
    WebsiteIpad      = 11
    WebsiteAndroid   = 12
    WebsiteSteam     = 13
    WebsiteReddit    = 14
    WebsiteItch      = 15
    WebsiteEpicgames = 16
    WebsiteGog       = 17
)

https://api-docs.igdb.com/#website-enums

type Client Uses

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

func New Uses

func New(apiKey string) *Client

func (*Client) ExternalIdsByGameId Uses

func (c *Client) ExternalIdsByGameId(ctx context.Context, id string) (*ExternalIds, error)

this game's ID is: - "com.frogmind.badland" on Google Play - "269670" on Steam - etc.

func (*Client) GameById Uses

func (c *Client) GameById(ctx context.Context, id string) (*Game, error)

func (*Client) GameCoverUrls Uses

func (c *Client) GameCoverUrls(ctx context.Context, id string) ([]string, error)

func (*Client) GameScreenshotUrls Uses

func (c *Client) GameScreenshotUrls(ctx context.Context, id string) ([]string, error)

func (*Client) GameYoutubeVideoIds Uses

func (c *Client) GameYoutubeVideoIds(ctx context.Context, id string) ([]string, error)

func (*Client) SearchGames Uses

func (c *Client) SearchGames(ctx context.Context, name string) ([]Game, error)

func (*Client) WebsitesByGameId Uses

func (c *Client) WebsitesByGameId(ctx context.Context, id string) ([]Website, error)

type ExternalIds Uses

type ExternalIds struct {
    Official             *string // official website, "homepage"
    SteamId              *string
    GogSlug              *string
    EnglishWikipediaSlug *string
    RedditSlug           *string
    GooglePlayAppId      *string
    AppleAppStoreAppId   *string
}

type Game Uses

type Game struct {
    ID               int       `json:"id"`
    Name             string    `json:"name"`
    Summary          string    `json:"summary"`
    FirstReleaseDate *UnixTime `json:"first_release_date"`
    Url              string    `json:"url"`
}

type UnixTime Uses

type UnixTime time.Time

func (UnixTime) MarshalJSON Uses

func (t UnixTime) MarshalJSON() ([]byte, error)

func (*UnixTime) UnmarshalJSON Uses

func (t *UnixTime) UnmarshalJSON(s []byte) (err error)

type Website Uses

type Website struct {
    Category int    `json:"category"`
    Url      string `json:"url"`
}

Package igdbapi imports 7 packages (graph) and is imported by 2 packages. Updated 2020-07-23. Refresh now. Tools for package owners.