fortniteapi

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 7 Imported by: 0

README

Go wrapper for Fortnite-API.com

GitHub issues Discord

This library offers a complete wrapper around the endpoints of fortnite-api.com.

Installation

go get -u github.com/MocA-Love/fortniteapi

Example:

package main

import (
    "github.com/MocA-Love/fortniteapi"
    "fmt"
)

func main() {
    api := fortniteapi.New() // .NewWithToken("YourToken") if you want to use Token.

    brNews, err := api.NewsBR(fortniteapi.LanguageEN)
    if err != nil {
        panic(err)
    }
    fmt.Println(brNews.Data.Image)
}

Documentation:

TODO

Contribute

Every type of contribution is appreciated!

License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AES

type AES struct {
	Status int32 `json:"status"`
	Data   struct {
		Build       string           `json:"build"`
		MainKey     string           `json:"mainKey"`
		DynamicKeys []AESDynamicKeys `json:"dynamicKeys"`
		Updated     time.Time        `json:"updated"`
	} `json:"data"`
}

AES is used for v2/aes

type AESDynamicKeys

type AESDynamicKeys struct {
	PakFilename string `json:"pakFilename"`
	PakGUID     string `json:"pakGuid"`
	Key         string `json:"key"`
}

AESDynamicKeys references AES.Data.DynamicKeys structs

type AccountType

type AccountType string
const (
	AccountTypeEpic     AccountType = "epic"
	AccountTypePSN      AccountType = "psn"
	AccountTypeXboxLive AccountType = "xbl"
)

type BRMap

type BRMap struct {
	Status int32 `json:"status"`
	Data   struct {
		Images struct {
			Blank string `json:"blank"`
			POIs  string `json:"pois"`
		} `json:"images"`
		POIs []BRMapPOIs `json:"pois"`
	} `json:"data"`
}

BRMap is used for v1/map

type BRMapPOIs

type BRMapPOIs struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Location struct {
		X float32 `json:"x"`
		Y float32 `json:"y"`
		Z float32 `json:"z"`
	} `json:"location"`
}

BRMapPOIs references BRMap.Data.POIs structs

type BRShop

type BRShop struct {
	Status int `json:"status"`
	Data   struct {
		Hash            string        `json:"hash"`
		Date            time.Time     `json:"date"`
		Featured        BRShopContent `json:"featured"`
		Daily           BRShopContent `json:"daily"`
		SpecialFeatured BRShopContent `json:"specialFeatured"`
		SpecialDaily    BRShopContent `json:"specialDaily"`
		Votes           BRShopContent `json:"votes"`
		VoteWinners     BRShopContent `json:"voteWinners"`
	} `json:"data"`
}

BRShop is used for v2/shop/br

type BRShopCombined

type BRShopCombined struct {
	Status int `json:"status"`
	Data   struct {
		Hash        string        `json:"hash"`
		Date        time.Time     `json:"date"`
		Featured    BRShopContent `json:"featured"`
		Daily       BRShopContent `json:"daily"`
		Votes       BRShopContent `json:"votes"`
		VoteWinners BRShopContent `json:"voteWinners"`
	} `json:"data"`
}

BRShopCombined is used for v2/shop/br/combined

type BRShopContent

type BRShopContent struct {
	Name    string                 `json:"name"`
	Entries []BRShopContentEntries `json:"entries"`
}

BRShopContent is used for BRShop & BRShopCombined sections

type BRShopContentEntries

type BRShopContentEntries struct {
	RegularPrice        int32                       `json:"regularPrice"`
	FinalPrice          int32                       `json:"finalPrice"`
	Bundle              BRShopContentEntriesBundle  `json:"bundle"`
	Banner              BRShopContentEntriesBanner  `json:"banner"`
	Giftable            bool                        `json:"giftable"`
	Refundable          bool                        `json:"refundable"`
	SortPriority        int                         `json:"sortPriority"`
	Categories          []string                    `json:"categories"`
	SectionID           string                      `json:"sectionId"`
	DevName             string                      `json:"devName"`
	OfferID             string                      `json:"offerId"`
	DisplayAssetPath    string                      `json:"displayAssetPath"`
	NewDisplayAssetPath string                      `json:"newDisplayAssetPath"`
	Items               []BRShopContentEntriesItems `json:"items"`
}

BRShopContentEntries references BRShopContent.Entries structs

type BRShopContentEntriesBanner

type BRShopContentEntriesBanner struct {
	Value        string `json:"value"`
	BackendValue string `json:"backendValue"`
}

BRShopContentEntriesBanner references BRShopContentEntries.Banner structs

type BRShopContentEntriesBundle

type BRShopContentEntriesBundle struct {
	Name  string `json:"name"`
	Info  string `json:"info"`
	Image string `json:"image"`
}

BRShopContentEntriesBundle references BRShopContentEntries.Bundle structs

type BRShopContentEntriesItems

type BRShopContentEntriesItems struct {
	ID               string                  `json:"id"`
	Name             string                  `json:"name"`
	Description      string                  `json:"description"`
	Type             BRShopItemsType         `json:"type"`
	Rarity           BRShopItemsRarity       `json:"rarity"`
	Series           BRShopItemsSeries       `json:"series"`
	Set              BRShopItemsSet          `json:"set"`
	Introduction     BRShopItemsIntroduction `json:"introduction"`
	Images           BRShopItemsImages       `json:"images"`
	Variants         []BRShopItemsVariants   `json:"variants"`
	GameplayTags     []string                `json:"gameplayTags"`
	ShowcaseVideo    string                  `json:"showcaseVideo"`
	DisplayAssetPath string                  `json:"displayAssetPath"`
	DefinitionPath   string                  `json:"definitionPath"`
	Path             string                  `json:"path"`
	Added            time.Time               `json:"added"`
	ShopHistory      []time.Time             `json:"shopHistory"`
}

BRShopContentEntriesItems references BRShopContentEntries.Items structs

type BRShopItemsImages

type BRShopItemsImages struct {
	SmallIcon string            `json:"smallIcon"`
	Icon      string            `json:"icon"`
	Featured  string            `json:"featured"`
	Other     map[string]string `json:"other"`
}

BRShopItemsImages references BRShopContentEntriesItems.Images structs

type BRShopItemsIntroduction

type BRShopItemsIntroduction struct {
	Chapter      string `json:"chapter"`
	Season       string `json:"season"`
	Text         string `json:"text"`
	BackendValue int32  `json:"backendValue"`
}

BRShopItemsIntroduction references BRShopContentEntriesItems.Introduction structs

type BRShopItemsRarity

type BRShopItemsRarity struct {
	Value        string `json:"value"`
	DisplayValue string `json:"displayValue"`
	BackendValue string `json:"backendValue"`
}

BRShopItemsRarity references BRShopContentEntriesItems.Rarity structs

type BRShopItemsSeries

type BRShopItemsSeries struct {
	Value        string `json:"value"`
	Image        string `json:"image"`
	BackendValue string `json:"backendValue"`
}

BRShopItemsSeries references BRShopContentEntriesItems.Series structs

type BRShopItemsSet

type BRShopItemsSet struct {
	Value        string `json:"value"`
	Text         string `json:"text"`
	BackendValue string `json:"backendValue"`
}

BRShopItemsSet references BRShopContentEntriesItems.Set structs

type BRShopItemsType

type BRShopItemsType struct {
	Value        string `json:"value"`
	DisplayValue string `json:"displayValue"`
	BackendValue string `json:"backendValue"`
}

BRShopItemsType references BRShopContentEntriesItems.Type structs

type BRShopItemsVariants

type BRShopItemsVariants struct {
	Channel string                       `json:"channel"`
	Type    string                       `json:"type"`
	Options []BRShopItemsVariantsOptions `json:"options"`
}

BRShopItemsVariants references BRShopContentEntriesItems.Variants structs

type BRShopItemsVariantsOptions

type BRShopItemsVariantsOptions struct {
	Tag   string `json:"tag"`
	Name  string `json:"name"`
	Image string `json:"image"`
}

BRShopItemsVariantsOptions references BRShopItemsVariants.Options structs

type BRStatsInfo

type BRStatsInfo struct {
	Overall BRStatsInfoOverall `json:"overall"`
	Solo    BRStatsInfoSolo    `json:"solo"`
	Duo     BRStatsInfoDuo     `json:"duo"`
	Trio    BRStatsInfoTrio    `json:"trio"`
	Squad   BRStatsInfoSquad   `json:"squad"`
	LTM     BRStatsInfoLTM     `json:"ltm"`
}

BRStatsInfo is used for BRStatsV2Stats

type BRStatsInfoDuo

type BRStatsInfoDuo struct {
	Score           int64     `json:"score"`
	ScorePerMin     float64   `json:"scorePerMin"`
	ScorePerMatch   float64   `json:"scorePerMatch"`
	Wins            int64     `json:"wins"`
	Top5            int64     `json:"top5"`
	Top12           int64     `json:"top12"`
	Kills           int64     `json:"kills"`
	KillsPerMin     float64   `json:"killsPerMin"`
	KillsPerMatch   float64   `json:"killsPerMatch"`
	Deaths          int64     `json:"deaths"`
	KD              float64   `json:"kd"`
	Matches         int64     `json:"matches"`
	WinRate         float64   `json:"winRate"`
	MinutesPlayed   int64     `json:"minutesPlayed"`
	PlayersOutlived int64     `json:"playersOutlived"`
	LastModified    time.Time `json:"lastModified"`
}

BRStatsInfoDuo references BRStatsInfo.Duo structs

type BRStatsInfoLTM

type BRStatsInfoLTM struct {
	Score           int64     `json:"score"`
	ScorePerMin     float64   `json:"scorePerMin"`
	ScorePerMatch   float64   `json:"scorePerMatch"`
	Wins            int64     `json:"wins"`
	Kills           int64     `json:"kills"`
	KillsPerMin     float64   `json:"killsPerMin"`
	KillsPerMatch   float64   `json:"killsPerMatch"`
	Deaths          int64     `json:"deaths"`
	KD              float64   `json:"kd"`
	Matches         int64     `json:"matches"`
	WinRate         float64   `json:"winRate"`
	MinutesPlayed   int64     `json:"minutesPlayed"`
	PlayersOutlived int64     `json:"playersOutlived"`
	LastModified    time.Time `json:"lastModified"`
}

BRStatsInfoLTM references BRStatsInfo.LTM structs

type BRStatsInfoOverall

type BRStatsInfoOverall struct {
	Score           int64     `json:"score"`
	ScorePerMin     float64   `json:"scorePerMin"`
	ScorePerMatch   float64   `json:"scorePerMatch"`
	Wins            int64     `json:"wins"`
	Top3            int64     `json:"top3"`
	Top5            int64     `json:"top5"`
	Top6            int64     `json:"top6"`
	Top10           int64     `json:"top10"`
	Top12           int64     `json:"top12"`
	Top25           int64     `json:"top25"`
	Kills           int64     `json:"kills"`
	KillsPerMin     float64   `json:"killsPerMin"`
	KillsPerMatch   float64   `json:"killsPerMatch"`
	Deaths          int64     `json:"deaths"`
	KD              float64   `json:"kd"`
	Matches         int64     `json:"matches"`
	WinRate         float64   `json:"winRate"`
	MinutesPlayed   int64     `json:"minutesPlayed"`
	PlayersOutlived int64     `json:"playersOutlived"`
	LastModified    time.Time `json:"lastModified"`
}

BRStatsInfoOverall references BRStatsInfo.Overall structs

type BRStatsInfoSolo

type BRStatsInfoSolo struct {
	Score           int64     `json:"score"`
	ScorePerMin     float64   `json:"scorePerMin"`
	ScorePerMatch   float64   `json:"scorePerMatch"`
	Wins            int64     `json:"wins"`
	Top10           int64     `json:"top10"`
	Top25           int64     `json:"top25"`
	Kills           int64     `json:"kills"`
	KillsPerMin     float64   `json:"killsPerMin"`
	KillsPerMatch   float64   `json:"killsPerMatch"`
	Deaths          int64     `json:"deaths"`
	KD              float64   `json:"kd"`
	Matches         int64     `json:"matches"`
	WinRate         float64   `json:"winRate"`
	MinutesPlayed   int64     `json:"minutesPlayed"`
	PlayersOutlived int64     `json:"playersOutlived"`
	LastModified    time.Time `json:"lastModified"`
}

BRStatsInfoSolo references BRStatsInfo.Solo structs

type BRStatsInfoSquad

type BRStatsInfoSquad struct {
	Score           int64     `json:"score"`
	ScorePerMin     float64   `json:"scorePerMin"`
	ScorePerMatch   float64   `json:"scorePerMatch"`
	Wins            int64     `json:"wins"`
	Top3            int64     `json:"top3"`
	Top6            int64     `json:"top6"`
	Kills           int64     `json:"kills"`
	KillsPerMin     float64   `json:"killsPerMin"`
	KillsPerMatch   float64   `json:"killsPerMatch"`
	Deaths          int64     `json:"deaths"`
	KD              float64   `json:"kd"`
	Matches         int64     `json:"matches"`
	WinRate         float64   `json:"winRate"`
	MinutesPlayed   int64     `json:"minutesPlayed"`
	PlayersOutlived int64     `json:"playersOutlived"`
	LastModified    time.Time `json:"lastModified"`
}

BRStatsInfoSquad references BRStatsInfo.Squad structs

type BRStatsInfoTrio

type BRStatsInfoTrio struct {
	Score           int64     `json:"score"`
	ScorePerMin     float64   `json:"scorePerMin"`
	ScorePerMatch   float64   `json:"scorePerMatch"`
	Wins            int64     `json:"wins"`
	Top3            int64     `json:"top3"`
	Top6            int64     `json:"top6"`
	Kills           int64     `json:"kills"`
	KillsPerMin     float64   `json:"killsPerMin"`
	KillsPerMatch   float64   `json:"killsPerMatch"`
	Deaths          int64     `json:"deaths"`
	KD              float64   `json:"kd"`
	Matches         int64     `json:"matches"`
	WinRate         float64   `json:"winRate"`
	MinutesPlayed   int64     `json:"minutesPlayed"`
	PlayersOutlived int64     `json:"playersOutlived"`
	LastModified    time.Time `json:"lastModified"`
}

BRStatsInfoTrio references BRStatsInfo.Trio structs

type BRStatsV2

type BRStatsV2 struct {
	Status int32 `json:"status"`
	Data   struct {
		Account    BRStatsV2Account    `json:"account"`
		BattlePass BRStatsV2BattlePass `json:"battlePass"`
		Image      string              `json:"image"`
		Stats      BRStatsV2Stats      `json:"stats"`
	} `json:"data"`
}

BRStatsV2 is used for v1/stats/br/v2

type BRStatsV2Account

type BRStatsV2Account struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

BRStatsV2Account references BRStatsV2.Data.Account structs

type BRStatsV2BattlePass

type BRStatsV2BattlePass struct {
	Level    int32 `json:"level"`
	Progress int32 `json:"progress"`
}

BRStatsV2BattlePass references BRStatsV2.Data.BattlePass structs

type BRStatsV2ByID

type BRStatsV2ByID BRStatsV2

BRStatsV2ByID is used for v1/stats/br/v2/{accountId}

type BRStatsV2Stats

type BRStatsV2Stats struct {
	All           BRStatsInfo `json:"all"`
	KeyboardMouse BRStatsInfo `json:"keyboardMouse"`
	Gamepad       BRStatsInfo `json:"gamepad"`
	Touch         BRStatsInfo `json:"touch"`
}

BRStatsV2Stats references BRStatsV2.Data.Stats structs

type BannerColors

type BannerColors struct {
	Status int32              `json:"status"`
	Data   []BannerColorsData `json:"data"`
}

BannerColors is used for v1/banners/colors

type BannerColorsData

type BannerColorsData struct {
	ID               string `json:"id"`
	Color            string `json:"color"`
	Category         string `json:"category"`
	SubCategoryGroup int32  `json:"subCategoryGroup"`
}

BannerColorsData references BannerColors.Data structs

type Banners

type Banners struct {
	Status int32         `json:"status"`
	Data   []BannersData `json:"data"`
}

Banners is used for v1/banners

type BannersData

type BannersData struct {
	ID              string `json:"id"`
	DevName         string `json:"devName"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	Category        string `json:"category"`
	FullUsageRights bool   `json:"fullUsageRights"`
	Images          struct {
		SmallIcon string `json:"smallIcon"`
		Icon      string `json:"icon"`
	} `json:"images"`
}

BannersData references BannersData.Data structs

type CosmeticSearchParams

type CosmeticSearchParams struct {
	Language,
	SearchLanguage Language
	MatchMethod MatchMethod
	Id,
	Name,
	Description,
	Typ,
	DisplayType,
	BackendType,
	Rarity,
	DisplayRarity,
	BackendRarity string
	HasSeries bool
	Series,
	BackendSeries string
	HasSet bool
	Set,
	SetText,
	BackendSet string
	HasIntroduction bool
	IntroductionChapter,
	IntroductionSeason string
	HasFeaturedImage bool
	HasVariants,
	HasGameplayTags bool
	GameplayTag string
	Added,
	AddedSince time.Time
	UnseenFor      int
	LastAppearance time.Time
}

type CosmeticsByID

type CosmeticsByID struct {
	Status int32             `json:"status"`
	Data   CosmeticsItemData `json:"data"`
}

CosmeticsByID is used for v2/cosmetics/br/{cosmetic-id}

type CosmeticsItemData

type CosmeticsItemData struct {
	ID               string                  `json:"id"`
	Name             string                  `json:"name"`
	Description      string                  `json:"description"`
	Type             BRShopItemsType         `json:"type"`
	Rarity           BRShopItemsRarity       `json:"rarity"`
	Series           BRShopItemsSeries       `json:"series"`
	Set              BRShopItemsSet          `json:"set"`
	Introduction     BRShopItemsIntroduction `json:"introduction"`
	Images           BRShopItemsImages       `json:"images"`
	Variants         []BRShopItemsVariants   `json:"variants"`
	GameplayTags     []string                `json:"gameplayTags"`
	ShowcaseVideo    string                  `json:"showcaseVideo"`
	DisplayAssetPath string                  `json:"displayAssetPath"`
	DefinitionPath   string                  `json:"definitionPath"`
	Path             string                  `json:"path"`
	Added            time.Time               `json:"added"`
	ShopHistory      []time.Time             `json:"shopHistory"`
}

CosmeticsItemData is used for CosmeticsList & NewCosmetics

type CosmeticsList

type CosmeticsList struct {
	Status int32               `json:"status"`
	Data   []CosmeticsItemData `json:"data"`
}

CosmeticsList is used for v2/cosmetics/br

type CosmeticsSearch

type CosmeticsSearch CosmeticsByID

CosmeticsSearch is used for v2/cosmetics/br/search

type CosmeticsSearchAll

type CosmeticsSearchAll CosmeticsList

CosmeticsSearchAll is used for v2/cosmetics/br/search/all

type CosmeticsSearchByIDs

type CosmeticsSearchByIDs CosmeticsList

CosmeticsSearchByIDs is used for v2/cosmetics/br/search/ids

type CreatorCode

type CreatorCode struct {
	Status int32           `json:"status"`
	Data   CreatorCodeData `json:"data"`
}

CreatorCode is used for v2/creatorcode

type CreatorCodeData

type CreatorCodeData struct {
	Code    string `json:"code"`
	Account struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"account"`
	Status   string `json:"status"`
	Verified bool   `json:"verified"`
}

CreatorCodeData references Data of CreatorCode & CreatorCodeSearchAll structs

type CreatorCodeSearch

type CreatorCodeSearch CreatorCode

CreatorCodeSearch is used for v2/creatorcode/search

type CreatorCodeSearchAll

type CreatorCodeSearchAll struct {
	Status int32             `json:"status"`
	Data   []CreatorCodeData `json:"data"`
}

CreatorCodeSearchAll is used for v2/creatorcode/search/all

type FortniteAPI

type FortniteAPI struct {
	Token string
}

the main struct that holds a token(optional)

func New

func New() *FortniteAPI

New creates a new instance of FortniteAPI without a token

func NewWithToken

func NewWithToken(token string) *FortniteAPI

NewWithToken creates a new instance of FortniteAPI with a token

func (*FortniteAPI) AES

func (f *FortniteAPI) AES(keyFormat KeyFormat) (*AES, error)

AES returns the current aes key

func (*FortniteAPI) BRMap

func (f *FortniteAPI) BRMap(language Language) (*BRMap, error)

BRMap returns v\data & images of the BR map & POIs

func (*FortniteAPI) BRShop

func (f *FortniteAPI) BRShop(language Language) (*BRShop, error)

BRShop returns data of the current battle royale shop

func (*FortniteAPI) BRShopCombined

func (f *FortniteAPI) BRShopCombined(language Language) (*BRShopCombined, error)

BRShopCombined returns data of the current battle royale shop (combined)

func (*FortniteAPI) BRStats

func (f *FortniteAPI) BRStats(name string, accountType AccountType, timeWindow TimeWindow, image ImageType) (*BRStatsV2, error)

BRStats returns stats of the requested player account

func (*FortniteAPI) BRStatsByAccountID

func (f *FortniteAPI) BRStatsByAccountID(accountID string, timeWindow TimeWindow, image ImageType) (*BRStatsV2ByID, error)

BRStatsByAccountID returns stats of the requested player account by its accountId

func (*FortniteAPI) BannerColors

func (f *FortniteAPI) BannerColors(language Language) (*BannerColors, error)

BannerColors returns an array of all banner colors

func (*FortniteAPI) Banners

func (f *FortniteAPI) Banners(language Language) (*Banners, error)

Banners returns an array of all banners

func (*FortniteAPI) CosmeticsByID

func (f *FortniteAPI) CosmeticsByID(cosmeticID string, language Language) (*CosmeticsByID, error)

CosmeticsByID returns data of the requested battle royale cosmetic-id

func (*FortniteAPI) CosmeticsList

func (f *FortniteAPI) CosmeticsList(language Language) (*CosmeticsList, error)

CosmeticsList returns an array of all battle royale cosmetics

func (*FortniteAPI) CosmeticsSearch

func (f *FortniteAPI) CosmeticsSearch(params CosmeticSearchParams) (*CosmeticsSearch, error)

CosmeticsSearch returns data of the first battle royale cosmetic which matches the search parameter(s)

func (*FortniteAPI) CosmeticsSearchAll

func (f *FortniteAPI) CosmeticsSearchAll(params CosmeticSearchParams) (*CosmeticsSearchAll, error)

CosmeticsSearchAll returns an array of all battle royale cosmetics which match the search parameter(s)

func (*FortniteAPI) CosmeticsSearchByID

func (f *FortniteAPI) CosmeticsSearchByID(language Language, ID string) (*CosmeticsSearchByIDs, error)

CosmeticsSearchByID returns an array of the requested battle royale cosmetic ids

func (*FortniteAPI) CreatorCodeSearch

func (f *FortniteAPI) CreatorCodeSearch(name string) (*CreatorCodeSearch, error)

CreatorCodeSearch returns data of the first creator code matching the name

func (*FortniteAPI) CreatorCodeSearchAll

func (f *FortniteAPI) CreatorCodeSearchAll(name string) (*CreatorCodeSearchAll, error)

CreatorCodeSearchAll returns an array of creator code data matching the name

func (*FortniteAPI) NewCosmetics

func (f *FortniteAPI) NewCosmetics(language Language) (*NewCosmetics, error)

NewCosmetics returns data of the latest added battle royale cosmetics

func (*FortniteAPI) News

func (f *FortniteAPI) News(language Language) (*News, error)

News returns data of the current battle royale, save the world & creative news

func (*FortniteAPI) NewsBR

func (f *FortniteAPI) NewsBR(language Language) (*NewsBR, error)

NewsBR returns data of the current battle royale news

func (*FortniteAPI) NewsCreative

func (f *FortniteAPI) NewsCreative(language Language) (*NewsCreative, error)

NewsCreative returns data of the current creative news

func (*FortniteAPI) NewsSTW

func (f *FortniteAPI) NewsSTW(language Language) (*NewsSTW, error)

NewsSTW returns data of the current save the world news

func (*FortniteAPI) PlaylistByID

func (f *FortniteAPI) PlaylistByID(playlistID string, language Language) (*PlaylistByID, error)

PlaylistByID returns data of the requested playlist-id

func (*FortniteAPI) Playlists

func (f *FortniteAPI) Playlists(language Language) (*Playlists, error)

Playlists returns an array of all playlists

type ImageType

type ImageType string
const (
	ImageAll           ImageType = "all"
	ImageKeyboardMouse ImageType = "keyboardMouse"
	ImageGamepad       ImageType = "gamepad"
	ImageTouch         ImageType = "touch "
	ImageNone          ImageType = "none"
)

type KeyFormat

type KeyFormat string
const (
	KeyFormatHEX    KeyFormat = "hex"
	KeyFormatBase64 KeyFormat = "base64"
)

type Language

type Language string
const (
	LanguageAR     Language = "ar"
	LanguageDE     Language = "de"
	LanguageEN     Language = "en"
	LanguageES     Language = "es"
	LanguageES419  Language = "es-419"
	LanguageFR     Language = "fr"
	LanguageIT     Language = "it"
	LanguageJA     Language = "ja"
	LanguageKO     Language = "ko"
	LanguagePL     Language = "pl"
	LanguagePTBR   Language = "pt-BR"
	LanguageRU     Language = "ru"
	LanguageTR     Language = "tr"
	LanguageZH     Language = "zh-CN"
	LanguageZHHant Language = "zh-Hant"
)

type MatchMethod

type MatchMethod string
const (
	MatchMethodFull     MatchMethod = "full"
	MatchMethodContains MatchMethod = "contains"
	MatchMethodStarts   MatchMethod = "starts"
	MatchMethodEnds     MatchMethod = "ends"
)

type NewCosmetics

type NewCosmetics struct {
	Status int32 `json:"status"`
	Data   struct {
		Build         string              `json:"build"`
		PreviousBuild string              `json:"previousBuild"`
		Hash          string              `json:"hash"`
		Date          time.Time           `json:"date"`
		LastAddition  time.Time           `json:"lastAddition"`
		Items         []CosmeticsItemData `json:"items"`
	} `json:"data"`
}

NewCosmetics is used for v2/cosmetics/br/new

type News

type News struct {
	Status int32 `json:"status"`
	Data   struct {
		Br       NewsData `json:"br"`
		Stw      NewsData `json:"stw"`
		Creative NewsData `json:"creative"`
	} `json:"data"`
}

News is used for v2/news

type NewsBR

type NewsBR NewsContent

NewsBR is used for v2/news/br

type NewsContent

type NewsContent struct {
	Status int32    `json:"status"`
	Data   NewsData `json:"data"`
}

NewsContent is used for NewsBR & NewsSTW & NewsCreative structs

type NewsCreative

type NewsCreative NewsContent

NewsCreative is used for v2/news/creative

type NewsData

type NewsData struct {
	Hash     string             `json:"hash"`
	Date     time.Time          `json:"date"`
	Image    string             `json:"image"`
	Motds    []NewsDataMotds    `json:"motds"`
	Messages []NewsDataMessages `json:"messages"`
}

NewsData is used for News & NewsContent structs

type NewsDataMessages

type NewsDataMessages struct {
	Title   string `json:"title"`
	Body    string `json:"body"`
	Image   string `json:"image"`
	Adspace string `json:"adspace"`
}

NewsDataMessages references NewsData.Messages structs

type NewsDataMotds

type NewsDataMotds struct {
	ID              string `json:"id"`
	Title           string `json:"title"`
	TabTitle        string `json:"tabTitle"`
	Body            string `json:"body"`
	Image           string `json:"image"`
	TileImage       string `json:"tileImage"`
	SortingPriority int32  `json:"sortingPriority"`
	Hidden          bool   `json:"hidden"`
}

NewsDataMotds references NewsData.Motds structs

type NewsSTW

type NewsSTW NewsContent

NewsSTW is used for v2/news/stw

type PlaylistByID

type PlaylistByID struct {
	Status int32        `json:"status"`
	Data   PlaylistData `json:"data"`
}

PlaylistByID is used for v1/playlists/{playlist-id}

type PlaylistData

type PlaylistData struct {
	ID                       string `json:"id"`
	Name                     string `json:"name"`
	SubName                  string `json:"subName"`
	Description              string `json:"description"`
	GameType                 string `json:"gameType"`
	RatingType               string `json:"ratingType"`
	MinPlayers               int32  `json:"minPlayers"`
	MaxPlayers               int32  `json:"maxPlayers"`
	MaxTeams                 int32  `json:"maxTeams"`
	MaxTeamSize              int32  `json:"maxTeamSize"`
	MaxSquads                int32  `json:"maxSquads"`
	MaxSquadSize             int32  `json:"maxSquadSize"`
	IsDefault                bool   `json:"isDefault"`
	IsTournament             bool   `json:"isTournament"`
	IsLimitedTimeMode        bool   `json:"isLimitedTimeMode"`
	IsLargeTeamGame          bool   `json:"isLargeTeamGame"`
	AccumulateToProfileStats bool   `json:"accumulateToProfileStats"`
	Images                   struct {
		Showcase    string `json:"Showcase"`
		MissionIcon string `json:"MissionIcon"`
	} `json:"images"`
	GameplayTags []string  `json:"gameplayTags"`
	Path         string    `json:"path"`
	Added        time.Time `json:"added"`
}

PlaylistData is used for Playlists & PlaylistByID

type Playlists

type Playlists struct {
	Status int32          `json:"status"`
	Data   []PlaylistData `json:"data"`
}

Playlists is used for v1/playlists

type TimeWindow

type TimeWindow string
const (
	TimeWindowSeason   TimeWindow = "season"
	TimeWindowLifetime TimeWindow = "lifetime"
)

Directories

Path Synopsis
_examples
aes command
allinone command
news command

Jump to

Keyboard shortcuts

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