Documentation
¶
Index ¶
- Variables
- type Account
- type AccountAchievement
- type AccountBankItem
- type AccountDailyCraftingItem
- type AccountFinisher
- type AccountHomeCat
- type AccountLuck
- type AccountMastery
- type AccountMasteryPoints
- type Achievement
- type AchievementCategory
- type AchievementGroup
- type Attributes
- type BackStoryAnswer
- type BackStoryQuestion
- type BuildTemplate
- type Character
- type CharacterCore
- type CharacterEquipment
- type CharacterExtras
- type CharacterSab
- type CharacterSkills
- type CharacterSpecializations
- type CommerceCoinGemExchange
- type CommerceDelivery
- type CommerceListing
- type CommercePrice
- type CommerceTransaction
- type Currency
- type DailyAchievement
- type DisciplineProgress
- type Error
- type Guild
- type GuildLogEntry
- type GuildMember
- type GuildPermission
- type GuildRank
- type GuildStashContainer
- type GuildTeam
- type GuildTreasurySlot
- type GuildUpgrade
- type InventoryBag
- type Item
- type ItemStack
- type Itemstat
- type Material
- type PvPGame
- type PvPLeaderboardAccount
- type PvPRank
- type PvPSeason
- type PvPStandings
- type PvPStats
- type PvPWinLossStats
- type Session
- func (s *Session) Account() (account Account, err error)
- func (s *Session) AccountAchievements(ids ...int) (accountAchievements []*AccountAchievement, err error)
- func (s *Session) AccountBuildStorage(ids ...int) (buildstorage []*BuildTemplate, err error)
- func (s *Session) AccountDailyCrafting(ids ...int) (items []*AccountDailyCraftingItem, err error)
- func (s *Session) AccountDungeons() (paths []string, err error)
- func (s *Session) AccountDyes() (dyes []int, err error)
- func (s *Session) AccountFinishers() (finishers []*AccountFinisher, err error)
- func (s *Session) AccountGliders() (gliders []int, err error)
- func (s *Session) AccountHomeCats() (cats []*AccountHomeCat, err error)
- func (s *Session) AccountHomeNodes() (nodes []string, err error)
- func (s *Session) AccountLuck() (luck AccountLuck, err error)
- func (s *Session) AccountMailCarriers() (carriers []int, err error)
- func (s *Session) AccountMapChests() (chests []string, err error)
- func (s *Session) AccountMasteries() (masteries []*AccountMastery, err error)
- func (s *Session) AccountMasteryPoints() (masteryPoints AccountMasteryPoints, err error)
- func (s *Session) AccountMaterials() (materials []*Material, err error)
- func (s *Session) AccountMinis() (minis []int, err error)
- func (s *Session) AccountMountSkins() (skins []int, err error)
- func (s *Session) AccountMountTypes() (types []int, err error)
- func (s *Session) AccountNovelties() (novelties []int, err error)
- func (s *Session) AccountOutfits() (outfits []int, err error)
- func (s *Session) AccountPvPHeroes() (heroes []int, err error)
- func (s *Session) AccountRaids() (bosses []string, err error)
- func (s *Session) AccountRecipes() (recipes []int, err error)
- func (s *Session) AccountSharedInventory() (items []*ItemStack, err error)
- func (s *Session) AccountSkins() (skins []int, err error)
- func (s *Session) AccountTitles() (titles []int, err error)
- func (s *Session) AccountWallet() (wallet []*Currency, err error)
- func (s *Session) AccountWorldbosses() (bosses []string, err error)
- func (s *Session) AchievementCategories(ids ...int) (categories []*AchievementCategory, err error)
- func (s *Session) AchievementGroups(ids ...string) (groups []*AchievementGroup, err error)
- func (s *Session) Achievements(ids ...int) (achievements []*Achievement, err error)
- func (s *Session) BackStoryAnswers(ids ...string) (st []*BackStoryAnswer, err error)
- func (s *Session) BackStoryQuestions(ids ...int) (st []*BackStoryQuestion, err error)
- func (s *Session) CharacterBackstory(character string) (backstory []string, err error)
- func (s *Session) CharacterCore(character string) (core CharacterCore, err error)
- func (s *Session) CharacterCrafting(character string) (crafting []*DisciplineProgress, err error)
- func (s *Session) CharacterEquipment(character string) (equipment []*CharacterEquipment, err error)
- func (s *Session) CharacterHeropoints(character string) (heropoints []string, err error)
- func (s *Session) CharacterInventory(character string) (inventory []*InventoryBag, err error)
- func (s *Session) CharacterRecipes(character string) (recipes []int, err error)
- func (s *Session) CharacterSab(character string) (st *CharacterSab, err error)
- func (s *Session) CharacterSkills(character string) (skills CharacterSkills, err error)
- func (s *Session) CharacterSpecializations(character string) (specializations CharacterSpecializations, err error)
- func (s *Session) CharacterTraining(character string) (training []*TrainingTree, err error)
- func (s *Session) Characters() (chars []string, err error)
- func (s *Session) CommerceDelivery() (delivery CommerceDelivery, err error)
- func (s *Session) CommerceExchangeCoins(quantity int) (exchange CommerceCoinGemExchange, err error)
- func (s *Session) CommerceExchangeGems(quantity int) (exchange CommerceCoinGemExchange, err error)
- func (s *Session) CommerceListings(ids ...int) (items []*CommerceListing, err error)
- func (s *Session) CommercePrices(ids ...int) (st []*CommercePrice, err error)
- func (s *Session) CommerceTransactionsCurrent() (transactions []*CommerceTransaction, err error)
- func (s *Session) CommerceTransactionsHistory() (transactions []*CommerceTransaction, err error)
- func (s *Session) DailyAchievements() (daily map[string][]*DailyAchievement, err error)
- func (s *Session) GetGuild(guild string, auth bool) (guildd Guild, err error)
- func (s *Session) GetGuildHallUpgrades(ids ...int) (upgrades []*GuildUpgrade, err error)
- func (s *Session) GetGuildLog(guild string) (log []*GuildLogEntry, err error)
- func (s *Session) GetGuildMembers(guild string) (members []*GuildMember, err error)
- func (s *Session) GetGuildPermissions(ids ...string) (permissions []*GuildPermission, err error)
- func (s *Session) GetGuildRanks(guild string) (ranks []*GuildRank, err error)
- func (s *Session) GetGuildSearch(guild string) (results []string, err error)
- func (s *Session) GetGuildStash(guild string) (stash []*GuildStashContainer, err error)
- func (s *Session) GetGuildTeams(guild string) (teams []*GuildTeam, err error)
- func (s *Session) GetGuildTreasury(guild string) (treasury []*GuildTreasurySlot, err error)
- func (s *Session) GetGuildUpgrades(guild string) (upgrades []int, err error)
- func (s *Session) GetItemStats(ids ...int) (itemstats []*Itemstat, err error)
- func (s *Session) GetWorld(ids ...int) (worlds []*World, err error)
- func (s *Session) PvPAmulets(ids ...int) (amulets *[]Item, err error)
- func (s *Session) PvPGames(ids ...string) (games *[]PvPGame, err error)
- func (s *Session) PvPRanks(ids ...int) (ranks []*PvPRank, err error)
- func (s *Session) PvPSeasonLeaderboards(id, region string) (leaderboards []*PvPLeaderboardAccount, err error)
- func (s *Session) PvPSeasons(ids ...string) (seasons []*PvPSeason, err error)
- func (s *Session) PvPStandings() (standings *PvPStandings, err error)
- func (s *Session) PvPStats() (stats *PvPStats, err error)
- func (s *Session) Tile(continent, floor, zoom, x, y int) (image.Image, error)
- func (s *Session) Tokeninfo() (tokeninfo TokenInfo, err error)
- func (s *Session) TomorrowDailyAchievements() (daily map[string][]*DailyAchievement, err error)
- func (s *Session) WithAccessToken(token string) *Session
- func (s *Session) WithEndpointAPI(endpointAPI string) *Session
- func (s *Session) WithLanguage(lang string) *Session
- func (s *Session) WvWAbilities(ids ...int) (abilities []*WvWAbility, err error)
- func (s *Session) WvWMatchByWorldID(id int) (match *WvWMatch, err error)
- func (s *Session) WvWMatches(ids ...string) (matches []*WvWMatch, err error)
- func (s *Session) WvWObjectives(ids ...string) (objectives []*WvWObjective, err error)
- func (s *Session) WvWRanks(ids ...int) (ranks []*WvWRank, err error)
- func (s *Session) WvWUpgrades(ids ...int) (upgrades []*WvWUpgrade, err error)
- type Skills
- type Specialization
- type TokenInfo
- type TrainingTree
- type World
- type WvWAbility
- type WvWMatch
- type WvWObjective
- type WvWRank
- type WvWUpgrade
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("not found") ErrNoAccessToken = errors.New("No access token provided") ErrInvalidAccessToken = errors.New("Invalid access token") ErrCannotUseAll = errors.New("unable to use 'all' keyword for this API") )
Error constants
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID string `json:"id"`
Name string `json:"name"`
Age time.Duration `json:"age"`
World int `json:"world"`
Guilds []string `json:"guilds"`
GuildLeader []string `json:"guild_leader"`
Created time.Time `json:"created"`
Access []string `json:"access"`
Commander bool `json:"commander"`
FractalLevel int `json:"fractal_level"`
DailyAP int `json:"daily_ap"`
MonthlyAP int `json:"monthly_ap"`
WvWRank int `json:"wvw_rank"`
}
Account contains general information
type AccountAchievement ¶
type AccountAchievement struct {
ID int `json:"id"`
Current int `json:"current"`
Max int `json:"max"`
Done bool `json:"done"`
}
AccountAchievement contains the unlock status for an achievement
type AccountBankItem ¶
type AccountBankItem struct {
ID int `json:"id"`
Count int `json:"count"`
Skin int `json:"skin"`
Upgrades []int `json:"upgrades"`
UpgradeSlotIndices []int `json:"upgrade_slot_indices"`
Dyes []int `json:"dyes"`
Binding string `json:"binding"`
Stats struct {
ID int `json:"id"`
Attributes struct {
} `json:"attributes"`
} `json:"stats"`
}
AccountBankItem is an item from the account bank
type AccountDailyCraftingItem ¶
type AccountDailyCraftingItem struct {
ID string `json:"id"`
}
AccountDailyCraftingItem is an object crafted daily
type AccountFinisher ¶
type AccountFinisher struct {
ID int `json:"id"`
Permanent bool `json:"permanent"`
Quantity int `json:"qantity"`
}
AccountFinisher is an finisher unluck for an account
type AccountHomeCat ¶
AccountHomeCat is a home cat node
type AccountLuck ¶
AccountLuck is the accounts consumed luck
type AccountMastery ¶
AccountMastery contains the unlocked mastery level
type AccountMasteryPoints ¶
type AccountMasteryPoints struct {
Totals []struct {
Region string `json:"region"` // The mastery region
Spent int `json:"spent"` // Amount of masteries of this region spent in mastery tracks
Earned int `json:"earned"` // Amount of masteries of this region earned for the account
} `json:"totals"`
Unlocked []int `json:"unlocked"` // Array of mastery ids
}
AccountMasteryPoints contains the accounts mastery points for each region
type Achievement ¶ added in v0.1.4
type Achievement struct {
ID int `json:"id"`
Icon string `json:"icon"`
Name string `json:"name"`
Description string `json:"description"`
Requirement string `json:"requirement"`
LockedText string `json:"locked_text"`
Type string `json:"type"`
Flags []string `json:"flags"`
Tiers []struct {
Count int `json:"count"`
Points int `json:"points"`
} `json:"tiers"`
Prerequisites []int `json:"prerequisites"`
Rewards []struct {
Type string `json:"type"`
} `json:"rewards"`
Bits []struct {
Type string `json:"type"`
ID int `json:"id"`
Text string `json:"text"`
} `json:"bits"`
PointCap int `json:"point_cap"`
}
Achievement is a game achievement
type AchievementCategory ¶ added in v0.1.4
type AchievementCategory struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Order int `json:"order"`
Icon string `json:"icon"`
Achievements []int `json:"achievement"`
}
AchievementCategory is an achievement category
type AchievementGroup ¶ added in v0.1.4
type AchievementGroup struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Order int `json:"order"`
Categories []int `json:"categories"`
}
AchievementGroup is an achievement group
type Attributes ¶ added in v0.1.4
Attributes contains the attributes of an item. The key is the name, the value the number of attribute points
type BackStoryAnswer ¶ added in v0.2.0
type BackStoryAnswer struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Journal string `json:"journal"`
Question int `json:"question"`
Professions []string `json:"professions"`
Races []string `json:"races"`
}
BackStoryAnswer contains information about the inital story choices during character creation
type BackStoryQuestion ¶ added in v0.2.0
type BackStoryQuestion struct {
ID int `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Answers []string `json:"answers"`
Order int `json:"order"`
Races []string `json:"races"`
Professions []string `json:"professions"`
}
BackStoryQuestion contains a game backstory question
type BuildTemplate ¶
type BuildTemplate struct {
Name string `json:"name"`
Profession string `json:"profession"`
Specializations []struct {
ID int `json:"id"`
Traits []int `json:"traits"`
} `json:"specializations"`
Skills struct {
Heal int `json:"heal"`
Utilities []int `json:"utilities"`
Elite int `json:"elite"`
} `json:"skills"`
AquaticSkills struct {
Heal int `json:"heal"`
Utilities []int `json:"utilities"`
Elite int `json:"elite"`
} `json:"aquatic_skills"`
}
BuildTemplate is a template in the accounts storage
type Character ¶ added in v0.1.3
type Character struct {
CharacterCore
Backstory []string `json:"backstory"`
CharacterExtras
Specializations []*Character
CharacterSkills
CharacterEquipment
Crafting []*DisciplineProgress `json:"crafting"`
Recipes []int `json:"recipes"`
Bags []*InventoryBag `json:"bags"`
Training []*TrainingTree `json:"training"`
}
Character contains all the listed items from subrequests
type CharacterCore ¶ added in v0.1.3
type CharacterCore struct {
Name string `json:"name"`
Race string `json:"race"`
Gender string `json:"gender"`
Profession string `json:"profession"`
Level int `json:"level"`
Guild string `json:"guild"`
Age int `jsonb:"age"`
Created string `json:"created"`
Deaths int `json:"deaths"`
Title int `json:"title"`
}
CharacterCore contains general character information
type CharacterEquipment ¶ added in v0.1.3
type CharacterEquipment struct {
ID int `json:"id"`
Slot string `json:"slot"`
Infusions []int `json:"infusions"`
Upgrades []int `json:"upgrades"`
Skin int `json:"skin"`
Stats Itemstat `json:"stats"`
Binding string `json:"binding"`
Charges int `json:"charges"`
BoundTo string `json:"bound_to"`
Dyes []int `json:"dyes"`
}
CharacterEquipment defines an equipment item carried by an character
type CharacterExtras ¶ added in v0.1.3
type CharacterExtras struct {
WvWAbilities []struct {
ID int `json:"id"`
Rank int `json:"rank"`
} `json:"wvw_abilities"`
EquipmentPvP struct {
Amulet int `json:"amulet"`
Rune int `json:"rune"`
Sigils []int `json:"sigils"`
} `json:"equipment_pvp"`
Flags []string `json:"flag"`
}
CharacterExtras contains special data contained in the general request
type CharacterSab ¶ added in v0.2.0
type CharacterSab struct {
Zones []struct {
ID int `json:"id"`
Mode string `json:"mode"`
World int `json:"world"`
Zone int `json:"zone"`
} `json:"zones"`
Unlocks []struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"unlocks"`
Songs []struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"songs"`
}
CharacterSab contains the character's super adventure box progression
type CharacterSkills ¶ added in v0.1.3
type CharacterSkills struct {
PvE Skills `json:"pve"`
PvP Skills `json:"pvp"`
WvW Skills `json:"wvw"`
}
CharacterSkills contains the skills for all gamemodes
type CharacterSpecializations ¶ added in v0.1.3
type CharacterSpecializations struct {
PvE []*Specialization `json:"pve"`
PvP []*Specialization `json:"pvp"`
WvW []*Specialization `json:"wvw"`
}
CharacterSpecializations contains the specializations for all gamemodes
type CommerceCoinGemExchange ¶ added in v0.1.4
type CommerceCoinGemExchange struct {
CoinsPerGem int `json:"coins_per_gem"`
Quantity int `json:"quantity"`
}
CommerceCoinGemExchange contains information about exchanging gems to coins and vice versa
type CommerceDelivery ¶ added in v0.1.4
type CommerceDelivery struct {
Coins int `json:"coins"`
Items []struct {
ID int `json:"id"`
Count int `json:"count"`
} `json:"items"`
}
CommerceDelivery contains the coins and items available for pickup
type CommerceListing ¶ added in v0.1.4
type CommerceListing struct {
ID int `json:"id"`
Buys []struct {
Listings int `json:"listings"`
UnitPrice int `json:"unit_price"`
Quantity int `json:"quantity"`
} `json:"buys"`
Sells []struct {
Listings int `json:"listings"`
UnitPrice int `json:"unit_price"`
Quantity int `json:"quantity"`
} `json:"sells"`
}
CommerceListing contains an items buy and sell orders
type CommercePrice ¶ added in v0.1.4
type CommercePrice struct {
ID int `json:"id"` // The item id
Whitelisted bool `json:"whitelisted"` // Whether free to play accounts may purchase/sell this item
Buys struct {
Quantity int `json:"quantity"`
UnitPrice int `json:"unit_price"`
} `json:"buys"`
Sells struct {
Quantity int `json:"quantity"`
UnitPrice int `json:"unit_price"`
} `json:"sells"`
}
CommercePrice contains the currently highest buy price and lowest sell price
type CommerceTransaction ¶ added in v0.1.4
type CommerceTransaction struct {
ID int `json:"id"`
ItemID int `json:"item_id"`
Price int `json:"price"`
Quantity int `json:"quantity"`
Created string `json:"created"`
Purchased string `json:"purchased"` // Only available from history
}
CommerceTransaction is an item waiting for exchanging or exchanged in the trading post
type DailyAchievement ¶ added in v0.1.4
type DailyAchievement struct {
ID int `json:"id"`
Level struct {
Min int `json:"min"`
Max int `json:"max"`
} `json:"level"`
RequiredAccess []string `json:"required_access"`
}
DailyAchievement is a daiy achievement
type DisciplineProgress ¶ added in v0.1.3
type DisciplineProgress struct {
Discipline string `json:"discipline"`
Rating int `json:"rating"`
Active bool `json:"active"`
}
DisciplineProgress defines a crafting discipline and the characters progress
type Guild ¶ added in v0.1.3
type Guild struct {
Level int `json:"level"`
MOTD string `json:"motd"`
Influence int `json:"influence"`
Aetherium int `json:"aetherium"`
Favor int `json:"favor"`
MemberCount int `json:"member_count"`
MemberCapacity int `json:"member_capacity"`
ID string `json:"id"`
Name string `json:"name"`
Tag string `json:"tag"`
Emblem struct {
Background struct {
ID int `json:"id"`
Colors []int `json:"colors"`
} `json:"background"`
Foreground struct {
ID int `json:"id"`
Colors []int `json:"colors"`
} `json:"foreground"`
} `json:"emblem"`
Flags []string `json:"flags"`
}
Guild contains the core information about a guild
type GuildLogEntry ¶ added in v0.1.3
type GuildLogEntry struct {
ID int `json:"id"`
Time string `json:"time"`
User string `json:"user"`
Type string `json:"type"`
InvitedBy string `json:"invited_by"` // When Type is "invited"
KickedBy string `json:"kicked_by"` // When Type is "kick"
ChangedBy string `json:"changed_by"` // When Type is "rank_change"
OldRank string `json:"old_rank"` // When Type is "rank_change"
NewRank string `json:"new_rank"` // When Type is "rank_change"
ItemID int `json:"item_id"` // When Type is "treasury" or "stash"
Count int `json:"count"` // When Type is "treasury" or "stash"
Operation string `json:"operation"` // When Type is "stash"
Coins int `json:"coins"` // When Type is "stash"
MOTD string `json:"motd"` // When Type is "motd"
Action string `json:"action"` // When Type is "upgrade"
UpgradeID int `json:"upgrade_id"` // When Type is "upgrade"
RecipeID int `json:"recipe_id"` // When Type is "upgrade", optional
}
GuildLogEntry is an entry in the guild log
type GuildMember ¶ added in v0.1.3
type GuildMember struct {
Name string `json:"name"`
Rank string `json:"rank"`
Joined string `json:"joined"`
}
GuildMember is a guild member
type GuildPermission ¶ added in v0.1.3
type GuildPermission struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}
GuildPermission is a assignable guild permission
type GuildRank ¶ added in v0.1.3
type GuildRank struct {
ID string `json:"id"`
Order int `json:"order"`
Permissions []string `json:"permissions"`
Icon string `json:"icon"`
}
GuildRank is a guild rank
type GuildStashContainer ¶ added in v0.1.3
type GuildStashContainer struct {
UpgradeID int `json:"upgrade_id"`
Size int `json:"size"`
Coins int `json:"coins"`
Note string `json:"note"`
Iventory []struct {
ID int `json:"id"`
Count int `json:"count"`
} `json:"inventory"`
}
GuildStashContainer is a section of the guild stash holding items
type GuildTeam ¶ added in v0.1.3
type GuildTeam struct {
ID int `json:"id"`
Members []struct {
Name string `json:"name"`
Role string `json:"role"`
} `json:"members"`
Name string `json:"name"`
Aggregate PvPWinLossStats `json:"aggregate"`
Ladders PvPWinLossStats `json:"ladders"`
Games []*PvPGame `json:"games"` // Profession field is omitted
Seasons []struct {
ID string `json:"id"`
Wins int `json:"wins"`
Losses int `json:"losses"`
Rating int `json:"rating"`
} `json:"seasons"`
}
GuildTeam contains information about a guild pvp team
type GuildTreasurySlot ¶ added in v0.1.3
type GuildTreasurySlot struct {
ItemID int `json:"item_id"`
Count int `json:"count"`
NeededBy []struct {
UpgradeID int `json:"upgrade_id"`
Count int `json:"count"`
} `json:"needed_by"`
}
GuildTreasurySlot is a slot for items needed for guild ugrades
type GuildUpgrade ¶ added in v0.1.3
type GuildUpgrade struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
BagMaxItems int `json:"bag_max_items"` // When Type is "BankBag"
BagMaxCoins int `json:"bag_max_coins"` // When Type us "BankBag"
Icon string `json:"icon"`
BuildTime int `json:"build_time"`
RequiredLevel int `json:"required_level"`
Experience int `json:"experience"`
Prerequisites []int `json:"prerequisites"`
Costs []struct {
Type string `json:"type"`
Name string `json:"name"`
Count int `json:"count"`
ItemID int `json:"item_id"`
} `json:"costs"`
}
GuildUpgrade contains information about upgrades for guild halls
type InventoryBag ¶ added in v0.1.3
type InventoryBag struct {
ID int `json:"id"`
Size int `json:"size"`
Inventory []ItemStack `json:"inventory"`
}
InventoryBag is a bag placed in the inventory bag slots. It also contains the items inside
type Item ¶ added in v0.1.4
type Item struct {
ID int `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Attributes *Attributes `json:"attributes"`
}
Item is an game item
type ItemStack ¶ added in v0.1.1
type ItemStack struct {
ID string `json:"id"`
Count int `json:"count"`
Charges int `json:"charges"`
Skin int `json:"skin"`
Upgrades []int `json:"upgrades"`
Infusions []int `json:"infusions"`
Binding string `json:"binding"`
BoundTo string `json:"bound_to"`
}
ItemStack is the data contained in requests that return stored items, e.g. bank or shared inventory
type Itemstat ¶ added in v0.1.3
type Itemstat struct {
ID int `json:"id"`
Name string `json:"name"`
Attributes []struct {
Attribute string `json:"attribute"`
Multiplier float64 `json:"multiplier"`
Value int `json:"value"`
} `json:"attributes"`
}
Itemstat contains the stattype and attributes of an item
type Material ¶
type Material struct {
ID int `json:"id"`
Category int `json:"category"`
Binding string `json:"binding"`
Count int `json:"count"`
}
A Material is an item stored in the players vault/material storage
type PvPGame ¶ added in v0.1.3
type PvPGame struct {
ID string `json:"id"`
MapID int `json:"map_id"`
Started string `json:"started"`
Ended string `json:"ended"`
Result string `json:"result"`
Team string `json:"team"`
Scores struct {
Red int `json:"red"`
Blue int `json:"blue"`
} `json:"scores"`
RatingType string `json:"rating_type"`
RatingChange int `json:"rating_change"`
Season string `json:"season,omitempty"`
}
PvPGame contains information about played pvp games
type PvPLeaderboardAccount ¶ added in v0.1.4
type PvPLeaderboardAccount struct {
Name string `json:"name"`
Rank int `json:"rank"`
ID string `json:"id"`
Team string `json:"team,omitempty"` // Only for guild leaderboards
TeamID int `json:"team_id,omitempty"` // Only for guild leaderboards
Date string `json:"date"`
Scores []struct {
ID string `json:"id"`
Value int `json:"value"`
} `json:"scores"`
}
PvPLeaderboardAccount is an account displayed on the pvp leaderboards
type PvPRank ¶ added in v0.1.4
type PvPRank struct {
ID int `json:"id"`
FinisherID int `json:"finisher_id"`
Name string `json:"name"`
Icon string `json:"icon"`
MinRank int `json:"min_rank"`
MaxRank int `json:"max_rank"`
Levels []struct {
MinRank int `json:"min_rank"`
MaxRank int `json:"max_rank"`
Points int `json:"points"`
} `json:"levels"`
}
PvPRank is a pvp rank
type PvPSeason ¶ added in v0.1.4
type PvPSeason struct {
ID string `json:"id"`
Name string `json:"name"`
Start string `json:"start"`
End string `json:"end"`
Active bool `json:"active"`
Divisions []struct {
Name string `json:"name"`
Flags []string `json:"flags"`
LargeIcon string `json:"large_icon"`
SmallIcon string `json:"small_icon"`
PipIcon string `json:"pip_icon"`
Tiers []struct {
Points int `json:"points"`
} `json:"tiers"`
} `json:"divisions"`
Leaderboards struct {
Ladder struct {
Settings struct {
Name string `json:"name"`
Duration int `json:"duration"`
Scoring string `json:"scoring"`
Tiers []struct {
Range []int `json:"range"`
}
} `json:"settings"`
Scorings []struct {
ID string `json:"id"`
Type string `json:"type"`
Description string `json:"description"`
Name string `json:"name"`
Ordering string `json:"ordering"`
} `json:"scoring"`
} `json:"ladder"`
} `json:"leaderboards"`
}
PvPSeason is a pvp season
type PvPStandings ¶ added in v0.1.4
type PvPStandings struct {
Current []struct {
TotalPoints int `json:"total_points"`
Division int `json:"division"`
Tier int `json:"tier"`
Points int `json:"points"`
Repeats int `json:"repeats"`
Rating int `json:"rating"`
Decay int `json:"decay"`
} `json:"current"`
Best []struct {
TotalPoints int `json:"total_points"`
Division int `json:"division"`
Tier int `json:"tier"`
Points int `json:"points"`
Repeats int `json:"repeats"`
} `json:"best"`
SeasonID string `json:"season_id"`
}
PvPStandings contains information about the account season ranking and the best sesion rankings
type PvPStats ¶ added in v0.1.3
type PvPStats struct {
PvPRank int `json:"pvp_rank"`
PvPRankPoints int `json:"pvp_rank_points"`
PvPRankRollovers int `json:"pvp_rank_rollovers"`
Aggregate PvPWinLossStats `json:"aggregate"`
Professions map[string]PvPWinLossStats `json:"professions"`
Ladders map[string]PvPWinLossStats `json:"ladders"`
}
PvPStats contains the accounts pvp stats
type PvPWinLossStats ¶ added in v0.1.3
type PvPWinLossStats struct {
Wins int `json:"wins"`
Losses int `json:"losses"`
Desertions int `json:"desertions"`
Byes int `json:"byes"`
Forfeits int `json:"forfeits"`
}
PvPWinLossStats contains the wins and losses
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is used to make requests to the gw2api. It also handles authentication.
func (*Session) AccountAchievements ¶ added in v0.2.0
func (s *Session) AccountAchievements(ids ...int) (accountAchievements []*AccountAchievement, err error)
AccountAchievements returns the accounts achievement status for the given ids
func (*Session) AccountBuildStorage ¶ added in v0.2.0
func (s *Session) AccountBuildStorage(ids ...int) (buildstorage []*BuildTemplate, err error)
AccountBuildStorage returns all builds stored in the accounts build storage
func (*Session) AccountDailyCrafting ¶ added in v0.2.0
func (s *Session) AccountDailyCrafting(ids ...int) (items []*AccountDailyCraftingItem, err error)
AccountDailyCrafting returns the accounts daily crafted items
func (*Session) AccountDungeons ¶ added in v0.2.0
AccountDungeons returns the dungeons paths completed since daily reset
func (*Session) AccountDyes ¶ added in v0.2.0
AccountDyes returns all dye unlocks
func (*Session) AccountFinishers ¶ added in v0.2.0
func (s *Session) AccountFinishers() (finishers []*AccountFinisher, err error)
AccountFinishers returns all finisher unlocks
func (*Session) AccountGliders ¶ added in v0.2.0
AccountGliders returns all glider unlocks
func (*Session) AccountHomeCats ¶ added in v0.2.0
func (s *Session) AccountHomeCats() (cats []*AccountHomeCat, err error)
AccountHomeCats returns all home cat unlocks
func (*Session) AccountHomeNodes ¶ added in v0.2.0
AccountHomeNodes returns all home node unlocks
func (*Session) AccountLuck ¶ added in v0.2.0
func (s *Session) AccountLuck() (luck AccountLuck, err error)
AccountLuck returns the accounts luck
func (*Session) AccountMailCarriers ¶ added in v0.2.0
AccountMailCarriers the accounts unlocked mailcarriers
func (*Session) AccountMapChests ¶ added in v0.2.0
AccountMapChests returns all Hero's choice chests unlocked since daily reset
func (*Session) AccountMasteries ¶ added in v0.2.0
func (s *Session) AccountMasteries() (masteries []*AccountMastery, err error)
AccountMasteries returns all masteries and their levels unlocked
func (*Session) AccountMasteryPoints ¶ added in v0.2.0
func (s *Session) AccountMasteryPoints() (masteryPoints AccountMasteryPoints, err error)
AccountMasteryPoints returns the mastery points for each region
func (*Session) AccountMaterials ¶ added in v0.2.0
AccountMaterials returns the accounts materials stored
func (*Session) AccountMinis ¶ added in v0.2.0
AccountMinis returns the accounts mini unlocks
func (*Session) AccountMountSkins ¶ added in v0.2.0
AccountMountSkins returns the accounts mountskin unlocks
func (*Session) AccountMountTypes ¶ added in v0.2.0
AccountMountTypes returns the accounts mount unlocks
func (*Session) AccountNovelties ¶ added in v0.2.0
AccountNovelties returns the accounts novelties unlocks
func (*Session) AccountOutfits ¶ added in v0.2.0
AccountOutfits returns the accounts outfit unlocks
func (*Session) AccountPvPHeroes ¶ added in v0.2.0
AccountPvPHeroes returns the accounts pvp hero unlocks
func (*Session) AccountRaids ¶ added in v0.2.0
AccountRaids returns the completed raid encounters since the weekly raid reset
func (*Session) AccountRecipes ¶ added in v0.2.0
AccountRecipes returns information about recipes that are unlocked for an account
func (*Session) AccountSharedInventory ¶ added in v0.2.0
AccountSharedInventory returns the items stored in the shared inventory slots
func (*Session) AccountSkins ¶ added in v0.2.0
AccountSkins returns the unlocked skins of the account
func (*Session) AccountTitles ¶ added in v0.2.0
AccountTitles returns information about titles that are unlocked for an account
func (*Session) AccountWallet ¶ added in v0.2.0
AccountWallet returns the currencies of the account
func (*Session) AccountWorldbosses ¶ added in v0.2.0
AccountWorldbosses returns information about which world bosses have been killed by the account since daily reset
func (*Session) AchievementCategories ¶ added in v0.2.0
func (s *Session) AchievementCategories(ids ...int) (categories []*AchievementCategory, err error)
AchievementCategories returns all achievement categories
func (*Session) AchievementGroups ¶ added in v0.2.0
func (s *Session) AchievementGroups(ids ...string) (groups []*AchievementGroup, err error)
AchievementGroups returns all achievement groups
func (*Session) Achievements ¶ added in v0.2.0
func (s *Session) Achievements(ids ...int) (achievements []*Achievement, err error)
Achievements returns an game achievement
func (*Session) BackStoryAnswers ¶ added in v0.2.0
func (s *Session) BackStoryAnswers(ids ...string) (st []*BackStoryAnswer, err error)
BackStoryAnswers returns the backstory answers
func (*Session) BackStoryQuestions ¶ added in v0.2.0
func (s *Session) BackStoryQuestions(ids ...int) (st []*BackStoryQuestion, err error)
BackStoryQuestions returns the requested backstory questions
func (*Session) CharacterBackstory ¶ added in v0.2.0
CharacterBackstory returns the characters initial story decisions
func (*Session) CharacterCore ¶ added in v0.2.0
func (s *Session) CharacterCore(character string) (core CharacterCore, err error)
CharacterCore returns the characters core information
func (*Session) CharacterCrafting ¶ added in v0.2.0
func (s *Session) CharacterCrafting(character string) (crafting []*DisciplineProgress, err error)
CharacterCrafting returns the characters crafting disciplines
func (*Session) CharacterEquipment ¶ added in v0.2.0
func (s *Session) CharacterEquipment(character string) (equipment []*CharacterEquipment, err error)
CharacterEquipment returns the character equipment items
func (*Session) CharacterHeropoints ¶ added in v0.2.0
CharacterHeropoints returns the characters unlocked hero challenges
func (*Session) CharacterInventory ¶ added in v0.2.0
func (s *Session) CharacterInventory(character string) (inventory []*InventoryBag, err error)
CharacterInventory returns the characters inventory bags and its contents
func (*Session) CharacterRecipes ¶ added in v0.2.0
CharacterRecipes returns the characters unlocked recipes
func (*Session) CharacterSab ¶ added in v0.2.0
func (s *Session) CharacterSab(character string) (st *CharacterSab, err error)
CharacterSab returns the characters super adventure box progress
func (*Session) CharacterSkills ¶ added in v0.2.0
func (s *Session) CharacterSkills(character string) (skills CharacterSkills, err error)
CharacterSkills returns the characters equipped skills
func (*Session) CharacterSpecializations ¶ added in v0.2.0
func (s *Session) CharacterSpecializations(character string) (specializations CharacterSpecializations, err error)
CharacterSpecializations returns the characters equipped specializations
func (*Session) CharacterTraining ¶ added in v0.2.0
func (s *Session) CharacterTraining(character string) (training []*TrainingTree, err error)
CharacterTraining returns the characters training progress
func (*Session) Characters ¶ added in v0.2.0
Characters returns all character names
func (*Session) CommerceDelivery ¶ added in v0.2.0
func (s *Session) CommerceDelivery() (delivery CommerceDelivery, err error)
CommerceDelivery returns coins and items available for pickup for the account
func (*Session) CommerceExchangeCoins ¶ added in v0.2.0
func (s *Session) CommerceExchangeCoins(quantity int) (exchange CommerceCoinGemExchange, err error)
CommerceExchangeCoins returns how many gems you get for the provided amount of coins
func (*Session) CommerceExchangeGems ¶ added in v0.2.0
func (s *Session) CommerceExchangeGems(quantity int) (exchange CommerceCoinGemExchange, err error)
CommerceExchangeGems returns how many coins you get for the provided amount of gems
func (*Session) CommerceListings ¶ added in v0.2.0
func (s *Session) CommerceListings(ids ...int) (items []*CommerceListing, err error)
CommerceListings returns all buy and sell orders for the items
func (*Session) CommercePrices ¶ added in v0.2.0
func (s *Session) CommercePrices(ids ...int) (st []*CommercePrice, err error)
CommercePrices returns the current tp prices for the requested ids
func (*Session) CommerceTransactionsCurrent ¶ added in v0.2.0
func (s *Session) CommerceTransactionsCurrent() (transactions []*CommerceTransaction, err error)
CommerceTransactionsCurrent returns the accounts current transactions
func (*Session) CommerceTransactionsHistory ¶ added in v0.2.0
func (s *Session) CommerceTransactionsHistory() (transactions []*CommerceTransaction, err error)
CommerceTransactionsHistory returns the accounts transaction history
func (*Session) DailyAchievements ¶ added in v0.2.0
func (s *Session) DailyAchievements() (daily map[string][]*DailyAchievement, err error)
DailyAchievements returns a map of daily achievements. Each map key stands for a different section, e.g. pve, wvw, fractals, ...
func (*Session) GetGuildHallUpgrades ¶ added in v0.1.3
func (s *Session) GetGuildHallUpgrades(ids ...int) (upgrades []*GuildUpgrade, err error)
GetGuildHallUpgrades returns unlockable upgrades for the guild hall. Note: This method is call GetGuildHallUpgrades as GetGuildUpgrades returns the guilds unlocked upgrades
func (*Session) GetGuildLog ¶ added in v0.1.3
func (s *Session) GetGuildLog(guild string) (log []*GuildLogEntry, err error)
GetGuildLog returns the guild log events
func (*Session) GetGuildMembers ¶ added in v0.1.3
func (s *Session) GetGuildMembers(guild string) (members []*GuildMember, err error)
GetGuildMembers returns all guild members
func (*Session) GetGuildPermissions ¶ added in v0.1.3
func (s *Session) GetGuildPermissions(ids ...string) (permissions []*GuildPermission, err error)
GetGuildPermissions returns the assignable guild permissions
func (*Session) GetGuildRanks ¶ added in v0.1.3
GetGuildRanks returns all guild ranks
func (*Session) GetGuildSearch ¶ added in v0.1.3
GetGuildSearch searches for guilds based on the given name. It returns an array of guild ids
func (*Session) GetGuildStash ¶ added in v0.1.3
func (s *Session) GetGuildStash(guild string) (stash []*GuildStashContainer, err error)
GetGuildStash returns all items in the guild stash
func (*Session) GetGuildTeams ¶ added in v0.1.3
GetGuildTeams returns all guild teams
func (*Session) GetGuildTreasury ¶ added in v0.1.3
func (s *Session) GetGuildTreasury(guild string) (treasury []*GuildTreasurySlot, err error)
GetGuildTreasury returns all items in the guild treasury
func (*Session) GetGuildUpgrades ¶ added in v0.1.3
GetGuildUpgrades returns all unlocked guild upgrades
func (*Session) GetItemStats ¶ added in v0.2.0
GetItemStats returns a list of itemstats
func (*Session) PvPAmulets ¶ added in v0.2.0
PvPAmulets return pvp amulets
func (*Session) PvPSeasonLeaderboards ¶ added in v0.2.0
func (s *Session) PvPSeasonLeaderboards(id, region string) (leaderboards []*PvPLeaderboardAccount, err error)
PvPSeasonLeaderboards returns the leaderboards for a pvp season. Only one id can be given. Valid regions are na or eu
func (*Session) PvPSeasons ¶ added in v0.2.0
PvPSeasons returns pvp seasons
func (*Session) PvPStandings ¶ added in v0.2.0
func (s *Session) PvPStandings() (standings *PvPStandings, err error)
PvPStandings returns the current seasons account and best ranking
func (*Session) Tile ¶ added in v0.2.0
Tile fetches a tile from the tile service The request is randomly send to one of the entries in the tileService slice
func (*Session) Tokeninfo ¶ added in v0.2.0
Tokeninfo returns general information about the provided token
func (*Session) TomorrowDailyAchievements ¶ added in v0.2.0
func (s *Session) TomorrowDailyAchievements() (daily map[string][]*DailyAchievement, err error)
TomorrowDailyAchievements works the same as DailyAchievements. It returns the daily achievements for tomorrow
func (*Session) WithAccessToken ¶
WithAccessToken sets an accesstoken for a session
func (*Session) WithEndpointAPI ¶
WithEndpointAPI sets the API endpoint
func (*Session) WithLanguage ¶
WithLanguage sets the sessions language
func (*Session) WvWAbilities ¶ added in v0.2.0
func (s *Session) WvWAbilities(ids ...int) (abilities []*WvWAbility, err error)
WvWAbilities returns trainable wvw abilities
func (*Session) WvWMatchByWorldID ¶ added in v0.2.0
WvWMatchByWorldID returns the match based on the participating world
func (*Session) WvWMatches ¶ added in v0.2.0
WvWMatches returns currently active matches
func (*Session) WvWObjectives ¶ added in v0.2.0
func (s *Session) WvWObjectives(ids ...string) (objectives []*WvWObjective, err error)
WvWObjectives returns wvw objectives
func (*Session) WvWUpgrades ¶ added in v0.2.0
func (s *Session) WvWUpgrades(ids ...int) (upgrades []*WvWUpgrade, err error)
WvWUpgrades returns wvw objectives upgrades
type Skills ¶ added in v0.1.3
type Skills struct {
Heal int `json:"heal"`
Utilities []int `json:"utilities"`
Elite int `json:"elite"`
Legends int `json:"legends"`
}
Skills defines a set of character skills
type Specialization ¶ added in v0.1.3
Specialization defines a specialization and its trait choices
type TokenInfo ¶
type TokenInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Permissions []string `json:"permissions"`
}
TokenInfo contains general token information, such as the permissions
type TrainingTree ¶ added in v0.1.3
TrainingTree defines a training tree for both skills and traits as displayed in the game
type World ¶ added in v0.1.5
type World struct {
ID int `json:"id"`
Name string `json:"name"`
Population string `json:"population"`
}
World is a game world
type WvWAbility ¶ added in v0.1.3
type WvWAbility struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Icon string `json:"icon"`
Ranks []struct {
Cost int `json:"cost"`
Effect string `json:"effect"`
}
}
WvWAbility is a trainable ability in wvw
type WvWMatch ¶ added in v0.1.3
type WvWMatch struct {
ID string `json:"id"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Scores map[string]int `json:"scores"`
Worlds map[string]int `json:"worlds"`
AllWorlds map[string][]int `json:"all_worlds"`
Deaths map[string]int `json:"deaths"`
Kills map[string]int `json:"kills"`
VictoryPoints map[string]int `json:"victory_points"`
Skirmishes []struct {
ID int `json:"id"`
Scores map[string]int `json:"scores"`
MapScores []struct {
Type string `json:"type"`
Scores map[string]int `json:"scores"`
} `json:"map_scores"`
} `json:"skirmishes"`
Maps []struct {
ID int `json:"id"`
Type string `json:"type"`
Scores map[string]int `json:"scores"`
Bonuses []struct {
Type string `json:"type"`
Owner string `json:"owner"`
} `json:"bonuses"`
Objectives []struct {
ID string `json:"id"`
Type string `json:"type"`
Owner string `json:"owner"`
LastFlipped string `json:"last_flipped"`
ClaimedBy string `json:"claimed_by"`
ClaimedAt string `json:"claimed_at"`
PointsTick int `json:"points_tick"`
PointsCapture int `json:"points_capture"`
YaksDelivered int `json:"yaks_delivered"`
GuildUpgrades []int `json:"guild_upgrades"`
} `json:"objectives"`
Deaths map[string]int `json:"deaths"`
Kills map[string]int `json:"kills"`
} `json:"maps"`
}
WvWMatch is a match in wvw. All map values will have the key strings red, green and blue
type WvWObjective ¶ added in v0.1.3
type WvWObjective struct {
ID string `json:"id"`
Name string `json:"name"`
SectorID int `json:"sector_id"`
Type string `json:"type"`
MapType string `json:"map_type"`
MapID int `json:"map_id"`
UpgradeID int `json:"upgrade_id"`
Coord []float64 `json:"coord"`
LabelCoord []float64 `json:"label_coord"`
Marker string `json:"marker"`
ChatLink string `json:"chat_link"`
}
WvWObjective is a capturable structure in wvw
type WvWRank ¶ added in v0.1.3
type WvWRank struct {
ID int `json:"id"`
Title string `json:"title"`
MinRank int `json:"min_rank"`
}
WvWRank is a rank as seen by enemy players
type WvWUpgrade ¶ added in v0.1.3
type WvWUpgrade struct {
ID int `json:"id"`
Tiers []struct {
Name string `json:"name"`
YaksRequired int `json:"yaks_required"`
Upgrades []struct {
Name string `json:"name"`
Description string `json:"description"`
Icon string `json:"icon"`
} `json:"upgrades"`
} `json:"tiers"`
}
WvWUpgrade is an automatic objective upgrade