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 BuildTemplate
- type Character
- type CharacterCore
- type CharacterEquipment
- type CharacterExtras
- 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) GetAccount() (account Account, err error)
- func (s *Session) GetAccountAchievements(ids ...int) (accountAchievements []*AccountAchievement, err error)
- func (s *Session) GetAccountBuildStorage(ids ...int) (buildstorage []*BuildTemplate, err error)
- func (s *Session) GetAccountDailyCrafting(ids ...int) (items []*AccountDailyCraftingItem, err error)
- func (s *Session) GetAccountDungeons() (paths []string, err error)
- func (s *Session) GetAccountDyes() (dyes []int, err error)
- func (s *Session) GetAccountFinishers() (finishers []*AccountFinisher, err error)
- func (s *Session) GetAccountGliders() (gliders []int, err error)
- func (s *Session) GetAccountHomeCats() (cats []*AccountHomeCat, err error)
- func (s *Session) GetAccountHomeNodes() (nodes []string, err error)
- func (s *Session) GetAccountLuck() (luck AccountLuck, err error)
- func (s *Session) GetAccountMailCarriers() (carriers []int, err error)
- func (s *Session) GetAccountMapChests() (chests []string, err error)
- func (s *Session) GetAccountMasteries() (masteries []*AccountMastery, err error)
- func (s *Session) GetAccountMasteryPoints() (masteryPoints AccountMasteryPoints, err error)
- func (s *Session) GetAccountMaterials() (materials []*Material, err error)
- func (s *Session) GetAccountMinis() (minis []int, err error)
- func (s *Session) GetAccountMountSkins() (skins []int, err error)
- func (s *Session) GetAccountMountTypes() (types []int, err error)
- func (s *Session) GetAccountNovelties() (novelties []int, err error)
- func (s *Session) GetAccountOutfits() (outfits []int, err error)
- func (s *Session) GetAccountPvPHeroes() (heroes []int, err error)
- func (s *Session) GetAccountRaids() (bosses []string, err error)
- func (s *Session) GetAccountRecipes() (recipes []int, err error)
- func (s *Session) GetAccountSharedInventory() (items []*ItemStack, err error)
- func (s *Session) GetAccountSkins() (skins []int, err error)
- func (s *Session) GetAccountTitles() (titles []int, err error)
- func (s *Session) GetAccountWallet() (wallet []*Currency, err error)
- func (s *Session) GetAccountWorldbosses() (bosses []string, err error)
- func (s *Session) GetAchievementCategories(ids ...int) (categories []*AchievementCategory, err error)
- func (s *Session) GetAchievementGroups(ids ...string) (groups []*AchievementGroup, err error)
- func (s *Session) GetAchievements(ids ...int) (achievements []*Achievement, err error)
- func (s *Session) GetCharacterBackstory(character string) (backstory []string, err error)
- func (s *Session) GetCharacterCore(character string) (core CharacterCore, err error)
- func (s *Session) GetCharacterCrafting(character string) (crafting []*DisciplineProgress, err error)
- func (s *Session) GetCharacterEquipment(character string) (equipment []*CharacterEquipment, err error)
- func (s *Session) GetCharacterHeropoints(character string) (heropoints []string, err error)
- func (s *Session) GetCharacterInventory(character string) (inventory []*InventoryBag, err error)
- func (s *Session) GetCharacterRecipes(character string) (recipes []int, err error)
- func (s *Session) GetCharacterSab(character string) (sab SuperAdventureBox, err error)
- func (s *Session) GetCharacterSkills(character string) (skills CharacterSkills, err error)
- func (s *Session) GetCharacterSpecializations(character string) (specializations CharacterSpecializations, err error)
- func (s *Session) GetCharacterTraining(character string) (training []*TrainingTree, err error)
- func (s *Session) GetCharacters() (chars []string, err error)
- func (s *Session) GetCommerceDelivery() (delivery CommerceDelivery, err error)
- func (s *Session) GetCommerceExchangeCoins(quantity int) (exchange CommerceCoinGemExchange, err error)
- func (s *Session) GetCommerceExchangeGems(quantity int) (exchange CommerceCoinGemExchange, err error)
- func (s *Session) GetCommerceListings(ids ...int) (items []*CommerceListing, err error)
- func (s *Session) GetCommerceTransactionsCurrent() (transactions []*CommerceTransaction, err error)
- func (s *Session) GetCommerceTransactionsHistory() (transactions []*CommerceTransaction, err error)
- func (s *Session) GetDailyAchievements() (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) GetPvPAmulets(ids ...int) (amulets *[]Item, err error)
- func (s *Session) GetPvPGames() (games *[]PvPGame, err error)
- func (s *Session) GetPvPRanks(ids ...int) (ranks []*PvPRank, err error)
- func (s *Session) GetPvPSeasonLeaderboards(id string) (leaderboards *map[string][]*PvPLeaderboardAccount, err error)
- func (s *Session) GetPvPSeasons(ids ...string) (seasons []*PvPSeason, err error)
- func (s *Session) GetPvPStandings() (standings *PvPStandings, err error)
- func (s *Session) GetPvPStats() (stats *PvPStats, err error)
- func (s *Session) GetTokenInfo() (tokeninfo TokenInfo, err error)
- func (s *Session) GetTomorrowDailyAchievements() (daily map[string][]*DailyAchievement, err error)
- func (s *Session) GetWvWAbilities(ids ...int) (abilities []*WvWAbility, err error)
- func (s *Session) GetWvWMatchByWorldID(id int) (match *WvWMatch, err error)
- func (s *Session) GetWvWMatches(ids ...string) (matches []*WvWMatch, err error)
- func (s *Session) GetWvWObjectives(ids ...string) (objectives []*WvWObjective, err error)
- func (s *Session) GetWvWRanks(ids ...int) (ranks []*WvWRank, err error)
- func (s *Session) GetWvWUpgrades(ids ...int) (upgrades []*WvWUpgrade, err error)
- func (s *Session) WithAccessToken(token string) *Session
- func (s *Session) WithEndpointAPI(endpointAPI string) *Session
- func (s *Session) WithLanguage(lang string) *Session
- type Skills
- type Specialization
- type SuperAdventureBox
- type TokenInfo
- type TrainingTree
- type WvWAbility
- type WvWMatch
- type WvWObjective
- type WvWRank
- type WvWUpgrade
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("not found") ErrInvalidAccessToken = errors.New("Invalid access token") )
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 includes 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 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 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 avaliable 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 avaliable 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 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 int `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:"duratino"`
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) GetAccount ¶
GetAccount returns the owner account of the apikey provided
func (*Session) GetAccountAchievements ¶
func (s *Session) GetAccountAchievements(ids ...int) (accountAchievements []*AccountAchievement, err error)
GetAccountAchievements returns the accounts achievement status for the given ids
func (*Session) GetAccountBuildStorage ¶
func (s *Session) GetAccountBuildStorage(ids ...int) (buildstorage []*BuildTemplate, err error)
GetAccountBuildStorage returns all builds stored in the accounts build storage
func (*Session) GetAccountDailyCrafting ¶
func (s *Session) GetAccountDailyCrafting(ids ...int) (items []*AccountDailyCraftingItem, err error)
GetAccountDailyCrafting returns the accounts daily crafted items
func (*Session) GetAccountDungeons ¶
GetAccountDungeons returns the dungeons paths completed since daily reset
func (*Session) GetAccountDyes ¶
GetAccountDyes returns all dye unlocks
func (*Session) GetAccountFinishers ¶
func (s *Session) GetAccountFinishers() (finishers []*AccountFinisher, err error)
GetAccountFinishers returns all finisher unlocks
func (*Session) GetAccountGliders ¶
GetAccountGliders returns all glider unlocks
func (*Session) GetAccountHomeCats ¶
func (s *Session) GetAccountHomeCats() (cats []*AccountHomeCat, err error)
GetAccountHomeCats returns all home cat unlocks
func (*Session) GetAccountHomeNodes ¶
GetAccountHomeNodes returns all home node unlocks
func (*Session) GetAccountLuck ¶
func (s *Session) GetAccountLuck() (luck AccountLuck, err error)
GetAccountLuck returns the accounts luck
func (*Session) GetAccountMailCarriers ¶ added in v0.1.3
GetAccountMailCarriers the accounts unlocked mailcarriers
func (*Session) GetAccountMapChests ¶
GetAccountMapChests returns all Hero's choice chests unlocked since daily reset
func (*Session) GetAccountMasteries ¶
func (s *Session) GetAccountMasteries() (masteries []*AccountMastery, err error)
GetAccountMasteries returns all masteries and their levels unlocked
func (*Session) GetAccountMasteryPoints ¶
func (s *Session) GetAccountMasteryPoints() (masteryPoints AccountMasteryPoints, err error)
GetAccountMasteryPoints returns the mastery points for each region
func (*Session) GetAccountMaterials ¶
GetAccountMaterials returns the accounts materials stored
func (*Session) GetAccountMinis ¶ added in v0.1.3
GetAccountMinis returns the accounts mini unlocks
func (*Session) GetAccountMountSkins ¶ added in v0.1.3
GetAccountMountSkins returns the accounts mountskin unlocks
func (*Session) GetAccountMountTypes ¶ added in v0.1.3
GetAccountMountTypes returns the accounts mount unlocks
func (*Session) GetAccountNovelties ¶ added in v0.1.3
GetAccountNovelties returns the accounts novelties unlocks
func (*Session) GetAccountOutfits ¶ added in v0.1.3
GetAccountOutfits returns the accounts outfit unlocks
func (*Session) GetAccountPvPHeroes ¶ added in v0.1.3
GetAccountPvPHeroes returns the accounts pvp hero unlocks
func (*Session) GetAccountRaids ¶ added in v0.1.3
GetAccountRaids returns the completed raid encounters since the weekly raid reset
func (*Session) GetAccountRecipes ¶ added in v0.1.3
GetAccountRecipes returns information about recipes that are unlocked for an account
func (*Session) GetAccountSharedInventory ¶
GetAccountSharedInventory returns the items stored in the shared inventory slots
func (*Session) GetAccountSkins ¶ added in v0.1.3
GetAccountSkins returns the unlocked skins of the account
func (*Session) GetAccountTitles ¶ added in v0.1.3
GetAccountTitles returns information about titles that are unlocked for an account
func (*Session) GetAccountWallet ¶ added in v0.1.3
GetAccountWallet returns the currencies of the account
func (*Session) GetAccountWorldbosses ¶ added in v0.1.3
GetAccountWorldbosses returns information about which world bosses have been killed by the account since daily reset
func (*Session) GetAchievementCategories ¶ added in v0.1.4
func (s *Session) GetAchievementCategories(ids ...int) (categories []*AchievementCategory, err error)
GetAchievementCategories returns all achievement categories
func (*Session) GetAchievementGroups ¶ added in v0.1.4
func (s *Session) GetAchievementGroups(ids ...string) (groups []*AchievementGroup, err error)
GetAchievementGroups returns all achievement groups
func (*Session) GetAchievements ¶ added in v0.1.4
func (s *Session) GetAchievements(ids ...int) (achievements []*Achievement, err error)
GetAchievements returns an game achievement
func (*Session) GetCharacterBackstory ¶ added in v0.1.3
GetCharacterBackstory returns the characters initial story decisions
func (*Session) GetCharacterCore ¶ added in v0.1.3
func (s *Session) GetCharacterCore(character string) (core CharacterCore, err error)
GetCharacterCore returns the characters core information
func (*Session) GetCharacterCrafting ¶ added in v0.1.3
func (s *Session) GetCharacterCrafting(character string) (crafting []*DisciplineProgress, err error)
GetCharacterCrafting returns the characters crafting disciplines
func (*Session) GetCharacterEquipment ¶ added in v0.1.3
func (s *Session) GetCharacterEquipment(character string) (equipment []*CharacterEquipment, err error)
GetCharacterEquipment returns the character equipment items
func (*Session) GetCharacterHeropoints ¶ added in v0.1.3
GetCharacterHeropoints returns the characters unlocked hero challenges
func (*Session) GetCharacterInventory ¶ added in v0.1.3
func (s *Session) GetCharacterInventory(character string) (inventory []*InventoryBag, err error)
GetCharacterInventory returns the characters inventory bags and its contents
func (*Session) GetCharacterRecipes ¶ added in v0.1.3
GetCharacterRecipes returns the characters unlocked recipes
func (*Session) GetCharacterSab ¶ added in v0.1.3
func (s *Session) GetCharacterSab(character string) (sab SuperAdventureBox, err error)
GetCharacterSab returns the characters super adventure box progress
func (*Session) GetCharacterSkills ¶ added in v0.1.3
func (s *Session) GetCharacterSkills(character string) (skills CharacterSkills, err error)
GetCharacterSkills returns the characters equipped skills
func (*Session) GetCharacterSpecializations ¶ added in v0.1.3
func (s *Session) GetCharacterSpecializations(character string) (specializations CharacterSpecializations, err error)
GetCharacterSpecializations returns the characters equipped specializations
func (*Session) GetCharacterTraining ¶ added in v0.1.3
func (s *Session) GetCharacterTraining(character string) (training []*TrainingTree, err error)
GetCharacterTraining returns the characters training progress
func (*Session) GetCharacters ¶ added in v0.1.3
GetCharacters returns all character names
func (*Session) GetCommerceDelivery ¶ added in v0.1.4
func (s *Session) GetCommerceDelivery() (delivery CommerceDelivery, err error)
GetCommerceDelivery returns coins and items avaiable for pickup for the account
func (*Session) GetCommerceExchangeCoins ¶ added in v0.1.4
func (s *Session) GetCommerceExchangeCoins(quantity int) (exchange CommerceCoinGemExchange, err error)
GetCommerceExchangeCoins returns how many gems you get for the provided amount of coins
func (*Session) GetCommerceExchangeGems ¶ added in v0.1.4
func (s *Session) GetCommerceExchangeGems(quantity int) (exchange CommerceCoinGemExchange, err error)
GetCommerceExchangeGems returns how many coins you get for the provided amount of gems
func (*Session) GetCommerceListings ¶ added in v0.1.4
func (s *Session) GetCommerceListings(ids ...int) (items []*CommerceListing, err error)
GetCommerceListings returns all buy and sell orders for the items
func (*Session) GetCommerceTransactionsCurrent ¶ added in v0.1.4
func (s *Session) GetCommerceTransactionsCurrent() (transactions []*CommerceTransaction, err error)
GetCommerceTransactionsCurrent returns the accounts current transactions
func (*Session) GetCommerceTransactionsHistory ¶ added in v0.1.4
func (s *Session) GetCommerceTransactionsHistory() (transactions []*CommerceTransaction, err error)
GetCommerceTransactionsHistory returns the accounts transaction history
func (*Session) GetDailyAchievements ¶ added in v0.1.4
func (s *Session) GetDailyAchievements() (daily map[string][]*DailyAchievement, err error)
GetDailyAchievements 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) GetPvPAmulets ¶ added in v0.1.4
GetPvPAmulets return pvp amulets
func (*Session) GetPvPGames ¶ added in v0.1.4
GetPvPGames returns the last 10 played matches
func (*Session) GetPvPRanks ¶ added in v0.1.4
GetPvPRanks returns pvp ranks
func (*Session) GetPvPSeasonLeaderboards ¶ added in v0.1.4
func (s *Session) GetPvPSeasonLeaderboards(id string) (leaderboards *map[string][]*PvPLeaderboardAccount, err error)
GetPvPSeasonLeaderboards returns the leaderboards for a pvp season. Only one id can be given. It returns a map for all regions: eu, na
func (*Session) GetPvPSeasons ¶ added in v0.1.4
GetPvPSeasons returns pvp seasons
func (*Session) GetPvPStandings ¶ added in v0.1.4
func (s *Session) GetPvPStandings() (standings *PvPStandings, err error)
GetPvPStandings returns the current seasons account and best ranking
func (*Session) GetPvPStats ¶ added in v0.1.4
GetPvPStats returns the accounts pvp stats
func (*Session) GetTokenInfo ¶
GetTokenInfo returns general information about the provided token
func (*Session) GetTomorrowDailyAchievements ¶ added in v0.1.4
func (s *Session) GetTomorrowDailyAchievements() (daily map[string][]*DailyAchievement, err error)
GetTomorrowDailyAchievements works the same as GetDailyAchievements. It returns the daily achievements for tomorrow
func (*Session) GetWvWAbilities ¶ added in v0.1.3
func (s *Session) GetWvWAbilities(ids ...int) (abilities []*WvWAbility, err error)
GetWvWAbilities returns trainable wvw abilities
func (*Session) GetWvWMatchByWorldID ¶ added in v0.1.4
GetWvWMatchByWorldID returns the match based on the participating world
func (*Session) GetWvWMatches ¶ added in v0.1.3
GetWvWMatches returns currently active matches
func (*Session) GetWvWObjectives ¶ added in v0.1.3
func (s *Session) GetWvWObjectives(ids ...string) (objectives []*WvWObjective, err error)
GetWvWObjectives returns wvw objectives
func (*Session) GetWvWRanks ¶ added in v0.1.3
GetWvWRanks returns wvw ranks
func (*Session) GetWvWUpgrades ¶ added in v0.1.3
func (s *Session) GetWvWUpgrades(ids ...int) (upgrades []*WvWUpgrade, err error)
GetWvWUpgrades returns wvw objectives upgrades
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
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 SuperAdventureBox ¶ added in v0.1.3
type SuperAdventureBox 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"`
}
SuperAdventureBox contains the character's super adventure box progression
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 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