-
Notifications
You must be signed in to change notification settings - Fork 2
/
traits.go
21 lines (19 loc) · 804 Bytes
/
traits.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package gw2api
// Trait contains trait info
type Trait struct {
ID int `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Description string `json:"description"`
Specialization int `json:"specialization"`
Tier int `json:"tier"`
Slot string `json:"slot"`
Facts []*Fact `json:"facts"`
TraitedFacts []*FactTraited `json:"traited_facts"`
Skills []*Skill `json:"skills"` // NOTE: Only id, name, description, icon, facts and traited_facts are provided
}
// Traits returns the requested traits
func (s *Session) Traits(ids ...int) (rsp []*Trait, err error) {
err = s.get(concatStrings("/v2/traits", genArgs(ids...)), &rsp)
return
}