Documentation
¶
Index ¶
- Constants
- Variables
- func CountItem(itemName, accessToken string) (*skillserver.EchoResponse, error)
- func CreateLoadoutForCurrentCharacter(accessToken, name string, shouldOverwrite bool) (*skillserver.EchoResponse, error)
- func EquipMaxLightGear(accessToken string) (*skillserver.EchoResponse, error)
- func EquipNamedLoadout(accessToken, name string) (*skillserver.EchoResponse, error)
- func GetCurrentCrucibleRanking(token string) (*skillserver.EchoResponse, error)
- func GetLoadoutNames(accessToken string) (*skillserver.EchoResponse, error)
- func InitEnv(apiKey, warmindKey string)
- func PopulateBucketHashLookup() error
- func PopulateEngramHashes() error
- func PopulateItemMetadata() error
- func RandomizeLoadout(accessToken string) (*skillserver.EchoResponse, error)
- func TransferItem(itemName, accessToken, sourceClass, destinationClass string, count int) (*skillserver.EchoResponse, error)
- func UnloadEngrams(accessToken string) (*skillserver.EchoResponse, error)
- type APIRequest
- func NewCurrentAccountRequest() *APIRequest
- func NewGetCharactersRequest(membershipType int, membershipID string) *APIRequest
- func NewGetCurrentEquipmentRequest(membershipType int, membershipID string) *APIRequest
- func NewGetProgressionsRequest(membershipType int, membershipID string) *APIRequest
- func NewPostEquipItem(body map[string]interface{}, isMultipleItems bool) *APIRequest
- func NewPostTransferItemRequest(body map[string]interface{}) *APIRequest
- func NewUserProfileRequest(membershipType int, membershipID string) *APIRequest
- type BaseProgression
- type BaseResponse
- type BungieNetUser
- type Character
- type CharacterList
- type CharacterMap
- type CharacterMappedItemListData
- type CharacterProgression
- type CharacterProgressionResponse
- type Client
- type ClientPool
- type CurrentUserMemberships
- type CurrentUserMembershipsResponse
- type DestinyMembership
- type DestinyProgression
- type Equipment
- type EquipmentBucket
- type FactionProgression
- type GetProfileResponse
- type Item
- type ItemFilter
- type ItemInstance
- type ItemList
- type ItemListData
- type ItemMetadata
- type LastPlayedSort
- type LightSort
- type Loadout
- type MilestoneProgression
- type PersistedItem
- type PersistedLoadout
- type Profile
- type ProfileMsg
- type StatusResponse
- type SubclassHash
Constants ¶
const ( //GetCurrentAccountEndpoint = "http://localhost:8000/account.json" //ItemsEndpointFormat = "http://localhost:8000/%d/%s/items.json" //TransferItemEndpointURL = "http://localhost:8000/d1/Platform/Destiny/TransferItem/" //EquipItemEndpointURL = "http://localhost:8000/d1/Platform/Destiny/EquipItem/" GetCurrentAccountEndpoint = "https://www.bungie.net/Platform/User/GetCurrentBungieAccount/" GetMembershipsForCurrentUserEndpoint = "https://www.bungie.net/Platform/User/GetMembershipsForCurrentUser/" GetProfileEndpointFormat = "https://www.bungie.net/platform/Destiny2/%d/Profile/%s/" TransferItemEndpointURL = "https://www.bungie.net/Platform/Destiny2/Actions/Items/TransferItem/" EquipSingleItemEndpointURL = "https://www.bungie.net/Platform/Destiny2/Actions/Items/EquipItem/" EquipMultiItemsEndpointURL = "https://www.bungie.net/Platform/Destiny2/Actions/Items/EquipItems/" )
Constant API endpoints
const ( ProfilesComponent = "100" VendorReceiptsComponent = "101" ProfileInventoriesComponent = "102" ProfileCurrenciesComponent = "103" CharactersComponent = "200" CharacterInventoriesComponent = "201" CharacterProgressionsComponent = "202" CharacterRenderDataComponent = "203" CharacterActivitiesComponent = "204" CharacterEquipmentComponent = "205" ItemInstancesComponent = "300" ItemObjectivesComponent = "301" ItemPerksComponent = "302" ItemRenderDataComponent = "303" ItemStatsComponent = "304" ItemSocketsComponent = "305" ItemTalentGridsComponent = "306" ItemCommonDataComponent = "307" ItemPlugStatesComponent = "308" VendorsComponent = "400" VendorCategoriesComponent = "401" VendorSalesComponent = "402" KiosksComponent = "500" )
Component constant values that are needed for certain Bungie API requests that specify which collections of values should be returned in the response.
const ( UnknownTier = 0 CurrencyTier = 1 BasicTier = 2 CommonTier = 3 RareTier = 4 SuperiorTier = 5 ExoticTier = 6 )
Destiny.TierType
const ( CanTransfer = 0 ItemIsEquipped = 1 NotTransferrable = 2 NoRoomInDestination = 4 )
Destiny.TansferStatuses
const ( UnknownLoc = 0 InventoryLoc = 1 VaultLoc = 2 VendorLoc = 3 PostmasterLoc = 4 )
Destiny.ItemLocation
const ( WARLOCK = 2271682572 TITAN = 3655393761 HUNTER = 671679327 )
Hash values for different class types 'classHash' JSON key
const ( TitanClassType = 0 HunterClassType = 1 WarlockEnum = 2 UnknownClassType = 3 )
Class Enum value passed in some of the Destiny API responses
const ( AWOKEN = 2803282938 HUMAN = 3887404748 EXO = 898834093 )
Hash values for Race types 'raceHash' JSON key
const ( MALE = 3111576190 FEMALE = 2204441813 )
Hash values for Gender 'genderHash' JSON key
const ( MaleEnum = 0 FemaleEnum = 1 UnknownGenderEnum = 2 )
Gender Enum values used in some of the Bungie API responses
const ( XBOX = uint(1) PSN = uint(2) BLIZZARD = uint(4) DEMON = uint(10) )
BungieMembershipType constant values
const (
MaxItemsPerBucket = 10
)
Random constant game data
const ( // TransferDelay will be the artificial between transfer requests to try and avoid throttling TransferDelay = 750 * time.Millisecond )
Variables ¶
var BucketHashLookup map[EquipmentBucket]uint
BucketHashLookup maps all of the equipment bucket constants to their corresponding bucket hashes as defined in the Bungie API.
var EquipmentBucketLookup map[uint]EquipmentBucket
EquipmentBucketLookup maps the bucket hash values defined in the Bungie API to the bucket equipment constants.
Functions ¶
func CountItem ¶
func CountItem(itemName, accessToken string) (*skillserver.EchoResponse, error)
CountItem will count the number of the specified item and return an EchoResponse that can be serialized and sent back to the Alexa skill.
func CreateLoadoutForCurrentCharacter ¶ added in v1.2.0
func CreateLoadoutForCurrentCharacter(accessToken, name string, shouldOverwrite bool) (*skillserver.EchoResponse, error)
CreateLoadoutForCurrentCharacter will create a new PersistedLoadout based on the items equipped to the user's current character and save them to the persistent storage.
func EquipMaxLightGear ¶ added in v0.3.0
func EquipMaxLightGear(accessToken string) (*skillserver.EchoResponse, error)
EquipMaxLightGear will equip all items that are required to have the maximum light on a character
func EquipNamedLoadout ¶ added in v1.2.0
func EquipNamedLoadout(accessToken, name string) (*skillserver.EchoResponse, error)
EquipNamedLoadout will read the loadout with the specified name from the persistent store and then equip it on the user's current character.
func GetCurrentCrucibleRanking ¶ added in v1.9.3
func GetCurrentCrucibleRanking(token string) (*skillserver.EchoResponse, error)
GetCurrentCrucibleRanking will look up the current Glory and Valor rankings for the current user and summarize it including the name of the rank and the points required to hit the next rank (if they aren't at the top most rank).
func GetLoadoutNames ¶ added in v1.8.1
func GetLoadoutNames(accessToken string) (*skillserver.EchoResponse, error)
GetLoadoutNames will request all of the loadout names from the database and return the list of names to the user.
func InitEnv ¶ added in v1.1.0
func InitEnv(apiKey, warmindKey string)
InitEnv provides a package level initialization point for any work that is environment specific
func PopulateBucketHashLookup ¶ added in v0.3.0
func PopulateBucketHashLookup() error
PopulateBucketHashLookup will fill the map that will be used to lookup bucket type hashes which will be used to determine which type of equipment a specific Item represents. From the DestinyInventoryBucketDefinition table in the manifest.
func PopulateEngramHashes ¶ added in v0.3.0
func PopulateEngramHashes() error
PopulateEngramHashes will intialize the map holding all item_hash values that represent engram types.
func PopulateItemMetadata ¶ added in v0.3.0
func PopulateItemMetadata() error
PopulateItemMetadata is responsible for loading all of the metadata fields that need to be loaded into memory for common inventory related operations.
func RandomizeLoadout ¶ added in v1.8.1
func RandomizeLoadout(accessToken string) (*skillserver.EchoResponse, error)
RandomizeLoadout will determine random items to be equipped on the current character. It is possible to ask for only weapons to be random or for weapons & armor to be random.
func TransferItem ¶
func TransferItem(itemName, accessToken, sourceClass, destinationClass string, count int) (*skillserver.EchoResponse, error)
TransferItem is responsible for calling the necessary Bungie.net APIs to transfer the specified item to the specified character. The quantity is optional as well as the source class. If no quantity is specified, all of the specific items will be transfered to the particular character.
func UnloadEngrams ¶ added in v0.3.0
func UnloadEngrams(accessToken string) (*skillserver.EchoResponse, error)
UnloadEngrams is responsible for transferring all engrams off of a character and
Types ¶
type APIRequest ¶ added in v1.3.0
type APIRequest struct { HTTPMethod string Endpoint string Components []string Body map[string]interface{} }
APIRequest is a generic request object that can be sent to a bungie.Client and the client will automatically handle setting up the request body, url parameters, and full url (including endpoint).
func NewCurrentAccountRequest ¶ added in v1.3.0
func NewCurrentAccountRequest() *APIRequest
NewCurrentAccountRequest is a helper function for creating a request object to get the memberships for a specific user.
func NewGetCharactersRequest ¶ added in v1.3.0
func NewGetCharactersRequest(membershipType int, membershipID string) *APIRequest
NewGetCharactersRequest is a helper function for getting the characters for a specific user
func NewGetCurrentEquipmentRequest ¶ added in v1.3.0
func NewGetCurrentEquipmentRequest(membershipType int, membershipID string) *APIRequest
NewGetCurrentEquipmentRequest is a helper function for creating a request that can be used to load the equipment for all characters for the given membership and platform.
func NewGetProgressionsRequest ¶ added in v1.9.3
func NewGetProgressionsRequest(membershipType int, membershipID string) *APIRequest
NewGetProgressionsRequest will be an APIRequest initialized with the correct values to request the character progression data from the Bungie.net API.
func NewPostEquipItem ¶ added in v1.3.0
func NewPostEquipItem(body map[string]interface{}, isMultipleItems bool) *APIRequest
NewPostEquipItem is a helper function for creating a new request to send an API request to equip an item.
func NewPostTransferItemRequest ¶ added in v1.3.0
func NewPostTransferItemRequest(body map[string]interface{}) *APIRequest
NewPostTransferItemRequest is a helper function for creating a new request to send an API request to transfer one or more items.
func NewUserProfileRequest ¶ added in v1.3.0
func NewUserProfileRequest(membershipType int, membershipID string) *APIRequest
NewUserProfileRequest is a helper function for creating a new request that can be used to load all profile data for a specific user on the specified platform and given membership.
type BaseProgression ¶ added in v1.9.3
type BaseProgression struct { ProgressionHash int `json:"progressionHash"` DailyProgress int `json:"dailyProgress"` DailyLimit int `json:"dailyLimit"` WeeklyProgress int `json:"weeklyProgress"` WeeklyLimit int `json:"weeklyLimit"` CurrentProgress int `json:"currentProgress"` Level int `json:"level"` LevelCap int `json:"levelCap"` StepIndex int `json:"stepIndex"` ProgressToNextLevel int `json:"progressToNextLevel"` NextLevelAt int `json:"nextLevelAt"` }
BaseProgression contains data relevant to all of the different progression types
func (*BaseProgression) String ¶ added in v1.9.3
func (b *BaseProgression) String() string
type BaseResponse ¶
type BaseResponse struct { ErrorCode int `json:"ErrorCode"` ThrottleSeconds int `json:"ThrottleSeconds"` ErrorStatus string `json:"ErrorStatus"` Message string `json:"Message"` MessageData interface{} `json:"MessageData"` }
BaseResponse represents the data returned as part of all of the Bungie API requests.
func (*BaseResponse) ErrCode ¶ added in v1.3.0
func (b *BaseResponse) ErrCode() int
ErrCode returns the err code field from a Bungie response
func (*BaseResponse) ErrStatus ¶ added in v1.3.0
func (b *BaseResponse) ErrStatus() string
ErrStatus returns the status string provided in the Bungie response
func (*BaseResponse) String ¶ added in v1.8.1
func (b *BaseResponse) String() string
type BungieNetUser ¶ added in v1.3.0
type BungieNetUser struct {
MembershipID string `json:"membershipId"`
}
BungieNetUser holds fields relating to a specific Bungie membership
type Character ¶
type Character struct { //https://bungie-net.github.io/multi/schema_Destiny-Entities-Characters-DestinyCharacterComponent.html#schema_Destiny-Entities-Characters-DestinyCharacterComponent MembershipID string `json:"membershipId"` MembershipType int `json:"membershipType"` CharacterID string `json:"characterId"` DateLastPlayed time.Time `json:"dateLastPlayed"` EmblemBackgroundPath string `json:"emblemBackgroundPath"` RaceHash uint `json:"raceHash"` ClassHash uint `json:"classHash"` ClassType int `json:"classType"` Light int `json:"light"` LevelProgression *struct { Level int `json:"level"` } `json:"levelProgression"` }
Character will represent a single in-game character as well as platform membership data, emblems, last played date, and character class and race.
type CharacterList ¶ added in v0.3.0
type CharacterList []*Character
CharacterList represents a slice of Character pointers.
type CharacterMap ¶ added in v1.0.0
CharacterMap will be a map that contains Character values with characterID keys.
type CharacterMappedItemListData ¶ added in v1.1.0
type CharacterMappedItemListData struct { Data map[string]*struct { Items ItemList `json:"items"` } `json:"data"` }
CharacterMappedItemListData contains the lists of item data mapped by the character ID to which they are associated.
type CharacterProgression ¶ added in v1.9.3
type CharacterProgression struct { Progressions map[string]*DestinyProgression `json:"progressions"` Factions map[string]*FactionProgression `json:"factions"` Milestones map[string]*MilestoneProgression `json:"milestones"` }
CharacterProgression contains data for different progressions tied to a specific character
type CharacterProgressionResponse ¶ added in v1.9.3
type CharacterProgressionResponse struct { *BaseResponse Response *struct { CharacterProgressions *struct { Data map[string]*CharacterProgression `json:"data"` } `json:"characterProgressions"` } `json:"Response"` }
CharacterProgressionResponse is the JSON response representation of the character progression data from the GetProfile endpoint.
type Client ¶
Client is a type that contains all information needed to make requests to the Bungie API.
func NewCustomAddrClient ¶ added in v1.0.0
NewCustomAddrClient will create a new Bungie Client instance with the provided local IP address.
func (*Client) AddAuthHeadersToRequest ¶ added in v1.0.0
AddAuthHeadersToRequest will handle adding the authentication headers from the current client to the specified Request.
func (*Client) AddAuthValues ¶ added in v1.0.0
AddAuthValues will add the specified access token and api key to the provided client
func (*Client) Execute ¶ added in v1.3.0
func (c *Client) Execute(request *APIRequest, response StatusResponse) error
Execute is a generic request execution method that will send the passed request on to the Bungie API using the configured client. The response is then deserialized into the response object provided.
func (*Client) GetCurrentAccount ¶
func (c *Client) GetCurrentAccount() (*CurrentUserMemberships, error)
GetCurrentAccount will request the user info for the current user based on the OAuth token provided as part of the request.
type ClientPool ¶ added in v1.0.0
type ClientPool struct { Clients []*Client // contains filtered or unexported fields }
ClientPool is a simple client buffer that will provided round robin access to a collection of Clients.
var Clients *ClientPool
Clients stores a list of bungie.Client instances that can be used to make HTTP requests to the Bungie API
func NewClientPool ¶ added in v1.0.0
func NewClientPool() *ClientPool
NewClientPool is a convenience initializer to create a new collection of Clients.
func (*ClientPool) Get ¶ added in v1.0.0
func (pool *ClientPool) Get() *Client
Get will return a pointer to the next Client that should be used.
type CurrentUserMemberships ¶ added in v1.3.0
type CurrentUserMemberships struct { BungieNetUser *BungieNetUser DestinyMembership *DestinyMembership }
CurrentUserMemberships will hold the current user's Bungie.net membership data as well as the Destiny membership data for their most recently played character.
type CurrentUserMembershipsResponse ¶ added in v1.0.0
type CurrentUserMembershipsResponse struct { *BaseResponse Response *struct { DestinyMemberships []*DestinyMembership `json:"destinyMemberships"` BungieNetUser *BungieNetUser `json:"bungieNetUser"` } `json:"Response"` }
CurrentUserMembershipsResponse contains information about the membership data for the currently authorized user. The request for this information will use the access_token to determine the current user https://bungie-net.github.io/multi/operation_get_User-GetMembershipDataForCurrentUser.html#operation_get_User-GetMembershipDataForCurrentUser
type DestinyMembership ¶ added in v1.3.0
type DestinyMembership struct { DisplayName string `json:"displayName"` MembershipType int `json:"membershipType"` MembershipID string `json:"membershipId"` }
DestinyMembership holds information about a specific Destiny membership
type DestinyProgression ¶ added in v1.9.3
type DestinyProgression struct {
*BaseProgression
}
DestinyProgression contains data about progression through different Destiny related achievements
func (*DestinyProgression) String ¶ added in v1.9.3
func (p *DestinyProgression) String() string
type Equipment ¶ added in v1.9.3
type Equipment map[EquipmentBucket]ItemList
Equipment is very similar to the Loadout type but contains all items in an equipment bucket instead of just the currently equipped item
type EquipmentBucket ¶ added in v0.3.0
type EquipmentBucket uint
EquipmentBucket is the type of the key for the bucket type hash lookup
const ( Kinetic EquipmentBucket Energy Power Ghost Helmet Gauntlets Chest Legs ClassArmor Artifact Subclass )
Equipment bucket type definitions
func (EquipmentBucket) String ¶ added in v0.3.0
func (bucket EquipmentBucket) String() string
type FactionProgression ¶ added in v1.9.3
type FactionProgression struct { *BaseProgression FactionHash int `json:"factionHash"` FactionVendorIndex int `json:"factionVendorIndex"` }
FactionProgression wraps data related to the progression through levels related to the different factions
func (*FactionProgression) String ¶ added in v1.9.3
func (p *FactionProgression) String() string
type GetProfileResponse ¶ added in v1.0.0
type GetProfileResponse struct { *BaseResponse Response *struct { CharacterInventories *CharacterMappedItemListData `json:"characterInventories"` CharacterEquipment *CharacterMappedItemListData `json:"characterEquipment"` ProfileInventory *ItemListData `json:"profileInventory"` ProfileCurrencies *ItemListData `json:"profileCurrencies"` ItemComponents *struct { Instances *struct { Data map[string]*ItemInstance `json:"data"` } `json:"instances"` } `json:"itemComponents"` Profile *struct { //https://bungie-net.github.io/multi/schema_Destiny-Entities-Profiles-DestinyProfileComponent.html#schema_Destiny-Entities-Profiles-DestinyProfileComponent Data *struct { UserInfo *struct { MembershipType int `json:"membershipType"` MembershipID string `json:"membershipId"` DisplayName string `json:"displayName"` } `json:"userInfo"` } `json:"data"` } `json:"profile"` Characters *struct { Data CharacterMap `json:"data"` } `json:"Characters"` } `json:"Response"` }
GetProfileResponse is the response from the GetProfile endpoint. This data contains information about the characeters, inventories, profile inventory, and equipped loadouts. https://bungie-net.github.io/multi/operation_get_Destiny2-GetProfile.html#operation_get_Destiny2-GetProfile
type Item ¶
type Item struct { // DestinyItemComponent https://bungie-net.github.io/multi/schema_Destiny-Entities-Items-DestinyItemComponent.html#schema_Destiny-Entities-Items-DestinyItemComponent ItemHash uint `json:"itemHash"` InstanceID string `json:"itemInstanceId"` BucketHash uint `json:"bucketHash"` Lockable bool `json:"lockable"` BindStatus int `json:"bindStatus"` State int `json:"state"` Location int `json:"location"` TransferStatus int `json:"transferStatus"` Quantity int `json:"quantity"` *ItemInstance *Character }
Item represents a single inventory item returned usually by the GetProfile endpoint
func (*Item) IsInVault ¶ added in v1.1.0
IsInVault will determine if the item is in the vault or not. True if it is; False if it is not.
type ItemFilter ¶ added in v0.3.0
ItemFilter is a type that will be used as a paramter to a filter function. The parameter will be a function pointer. The function pointed to will need to return true if the element meets some criteria and false otherwise. If the result of this filter is false, then the item will be removed.
type ItemInstance ¶ added in v1.0.0
type ItemInstance struct { //https://bungie-net.github.io/multi/schema_Destiny-Entities-Items-DestinyItemInstanceComponent.html#schema_Destiny-Entities-Items-DestinyItemInstanceComponent IsEquipped bool `json:"isEquipped"` CanEquip bool `json:"canEquip"` Quality int `json:"quality"` CannotEquipReason int `json:"cannotEquipReason"` DamageType int EquipRequiredLevel int `json:"equipRequiredLevel"` PrimaryStat *struct { //https://bungie-net.github.io/multi/schema_Destiny-DestinyStat.html#schema_Destiny-DestinyStat StatHash uint `json:"statHash"` Value int `json:"value"` MaximumValue int `json:"maximumValue"` ItemLevel int `json:"itemLevel"` } `json:"primaryStat"` }
ItemInstance will hold information about a specific instance of an instanced item, this can include item stats, perks, etc. as well as equipped status and things like that.
type ItemList ¶ added in v0.3.0
type ItemList []*Item
ItemList is just a wrapper around a slice of Item pointers. This will make it possible to write a filter method that is called on a slice of Items.
func (ItemList) FilterItemsBubble ¶ added in v1.8.1
func (items ItemList) FilterItemsBubble(filter ItemFilter, arg interface{}) ItemList
FilterItemsBubble will use the "bubble" approach to filter items in the provided list using the provided filter method and argument.
func (ItemList) FilterItemsMultipleBubble ¶ added in v1.8.1
func (items ItemList) FilterItemsMultipleBubble(filters ...ItemFilter) ItemList
FilterItemsMultipleBubble will use the bubble approach and provided filters to filter the items in the item given item list.
type ItemListData ¶ added in v1.1.0
type ItemListData struct { Data *struct { Items ItemList `json:"items"` } `json:"data"` }
ItemListData contains the list of Items in the format returned by the Bungie.net API
type ItemMetadata ¶ added in v0.3.0
ItemMetadata is responsible for holding data from the manifest in-memory that is used often when interacting wth different character's inventories. These values are used so much that it would be a big waste of time to query the manifest data from the DB for every use.
type LastPlayedSort ¶ added in v0.3.0
type LastPlayedSort CharacterList
LastPlayedSort specifies a specific type for CharacterList that can be sorted by the date the character was last played.
func (LastPlayedSort) Len ¶ added in v0.3.0
func (characters LastPlayedSort) Len() int
func (LastPlayedSort) Less ¶ added in v0.3.0
func (characters LastPlayedSort) Less(i, j int) bool
func (LastPlayedSort) Swap ¶ added in v0.3.0
func (characters LastPlayedSort) Swap(i, j int)
type LightSort ¶ added in v0.3.0
type LightSort ItemList
LightSort specifies a specific type for ItemList that can be sorted by Light value of each item.
type Loadout ¶ added in v0.3.0
type Loadout map[EquipmentBucket]*Item
Loadout will hold all currently equipped items indexed by the equipment bucket for which they are equipped.
type MilestoneProgression ¶ added in v1.9.3
type MilestoneProgression struct { MilestoneHash int `json:"milestoneHash"` // NOTE: Not sure how much information from here could be provided. Seems // like it could be more information than could be useful // AvailableQuests [] StartDate time.Time `json:"startDate"` EndDate time.Time `json:"endDate"` }
MilestoneProgression contains data about progress through different milestones
type PersistedItem ¶ added in v1.2.0
type PersistedItem struct { ItemHash uint `json:"itemHash"` InstanceID string `json:"itemInstanceId"` BucketHash uint `json:"bucketHash"` }
PersistedItem represents the data from a specific Item entry that should be persisted. Not all of the Item data should be stored as most of it could/will change by the time it is read back from persistent storage
type PersistedLoadout ¶ added in v1.2.0
type PersistedLoadout map[EquipmentBucket]*PersistedItem
PersistedLoadout stores all of the PersistedItem entries that should be saved for a particular loadout.
type Profile ¶ added in v1.0.0
type Profile struct { MembershipType int MembershipID string BungieNetMembershipID string DateLastPlayed time.Time DisplayName string Characters CharacterList AllItems ItemList // A map between the character ID and the Loadout currently equipped on that character Loadouts map[string]Loadout Equipments map[string]Equipment }
Profile contains all information about a specific Destiny membership, including character and inventory information.
type ProfileMsg ¶ added in v1.0.0
type ProfileMsg struct { *Profile // contains filtered or unexported fields }
ProfileMsg is a wrapper around a Profile struct that should be used exclusively for sending a Profile over a channel, or at least in cases where an error also needs to be sent to indicate failures.
type StatusResponse ¶ added in v1.3.0
StatusResponse is used as the generic response parameter for the deserialized response from the generic Client Execute calls. One of the below structs should be used as the concrete type for the request's response to be deserialized into.
type SubclassHash ¶ added in v1.9.3
type SubclassHash uint
SubclassHash holds the hash representing the exact subclass "item". These are represented with items and a subclass bucket definition.
const ( Striker SubclassHash = 2958378809 Sunbreaker SubclassHash = 3105935002 Sentinel SubclassHash = 3382391785 Arcstrider SubclassHash = 1334959255 Gunslinger SubclassHash = 3635991036 Nightstalker SubclassHash = 3225959819 Stormcaller SubclassHash = 1751782730 Dawnblade SubclassHash = 3481861797 Voidwalker SubclassHash = 3887892656 )
Subclass hashes (from the subclass inventory bucket)