d2api

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ActivitiesPageSize int = 100
View Source
const BigDApiHash int = 3824106094

Variables

This section is empty.

Functions

This section is empty.

Types

type Api added in v1.0.2

type Api struct {
	ApiKey                   string
	ActivitiesPageSizeString string
}

func (*Api) DoGetRequest added in v1.0.2

func (api *Api) DoGetRequest(uri string, entity Entity) error

func (*Api) GetActivities added in v1.0.2

func (api *Api) GetActivities(page int, membershipId string, membershipType int, characterId string) (*GetActivitiesRepsonse, error)

func (*Api) GetPlayer added in v1.0.2

func (api *Api) GetPlayer(user string) (*GetPlayerResponse, error)

func (*Api) GetPostGameCarnageReport added in v1.0.2

func (api *Api) GetPostGameCarnageReport(instanceId string) (*PostGameCarnageReportRepsonse, error)

func (*Api) GetProfile added in v1.0.2

func (api *Api) GetProfile(membershipId string, membershipType int) (*GetProfileRepsonse, error)

func (*Api) Init added in v1.0.2

func (api *Api) Init(apiKey string)

type Entity added in v1.0.4

type Entity interface {
	UnmarshalHttpResponseBody([]byte) error
}

type GetActivitiesRepsonse

type GetActivitiesRepsonse struct {
	Response GetActivitiesRepsonseResponse `json:"Response"`
}

func (*GetActivitiesRepsonse) UnmarshalHttpResponseBody added in v1.0.4

func (getActivitiesRepsonse *GetActivitiesRepsonse) UnmarshalHttpResponseBody(responseBody []byte) error

type GetActivitiesRepsonseActivity

type GetActivitiesRepsonseActivity struct {
	ActivityDetails GetActivitiesRepsonseActivityDetails `json:"activityDetails"`
}

type GetActivitiesRepsonseActivityDetails

type GetActivitiesRepsonseActivityDetails struct {
	ReferenceId int    `json:"referenceId"`
	InstanceId  string `json:"instanceId"`
}

type GetActivitiesRepsonseResponse

type GetActivitiesRepsonseResponse struct {
	Activities []GetActivitiesRepsonseActivity `json:"activities"`
}

type GetPlayerRepsonseBody

type GetPlayerRepsonseBody struct {
	MembershipId                string `json:"membershipId"`
	MembershipType              int    `json:"membershipType"`
	BungieGlobalDisplayNameCode int    `json:"bungieGlobalDisplayNameCode"`
}

type GetPlayerResponse

type GetPlayerResponse struct {
	Response []GetPlayerRepsonseBody `json:"Response"`
}

func (*GetPlayerResponse) UnmarshalHttpResponseBody added in v1.0.4

func (getPlayerResponse *GetPlayerResponse) UnmarshalHttpResponseBody(responseBody []byte) error

type GetProfileRepsonse

type GetProfileRepsonse struct {
	Response GetProfileRepsonseResponse `json:"Response"`
	Json     string
}

func (*GetProfileRepsonse) UnmarshalHttpResponseBody added in v1.0.4

func (getProfileResponse *GetProfileRepsonse) UnmarshalHttpResponseBody(responseBody []byte) error

type GetProfileRepsonseData

type GetProfileRepsonseData struct {
	CharacterIds []string `json:"characterIds"`
}

type GetProfileRepsonseProfile

type GetProfileRepsonseProfile struct {
	Data GetProfileRepsonseData `json:"data"`
}

type GetProfileRepsonseResponse

type GetProfileRepsonseResponse struct {
	Profile GetProfileRepsonseProfile `json:"profile"`
}

type PostGameCarnageReportRepsonse

type PostGameCarnageReportRepsonse struct {
	Response PostGameCarnageReportRepsonseResponse `json:"Response"`
	Json     string
}

func (*PostGameCarnageReportRepsonse) UnmarshalHttpResponseBody added in v1.0.4

func (getPostGameCarnageReportRepsonse *PostGameCarnageReportRepsonse) UnmarshalHttpResponseBody(responseBody []byte) error

type PostGameCarnageReportRepsonseBasicValue

type PostGameCarnageReportRepsonseBasicValue struct {
	Value float64 `json:"value"`
}

type PostGameCarnageReportRepsonseBasicValueContainer

type PostGameCarnageReportRepsonseBasicValueContainer struct {
	Basic PostGameCarnageReportRepsonseBasicValue `json:"basic"`
}

type PostGameCarnageReportRepsonseEntry

type PostGameCarnageReportRepsonseEntry struct {
	CharacterId string                                `json:"characterId"`
	Extended    PostGameCarnageReportRepsonseExtended `json:"extended"`
}

type PostGameCarnageReportRepsonseExtended

type PostGameCarnageReportRepsonseExtended struct {
	Weapons []PostGameCarnageReportRepsonseWeapon `json:"weapons"`
}

type PostGameCarnageReportRepsonseResponse

type PostGameCarnageReportRepsonseResponse struct {
	Entries []PostGameCarnageReportRepsonseEntry `json:"entries"`
}

type PostGameCarnageReportRepsonseWeapon

type PostGameCarnageReportRepsonseWeapon struct {
	ReferenceId int                                       `json:"referenceId"`
	Values      PostGameCarnageReportRepsonseWeaponValues `json:"values"`
}

type PostGameCarnageReportRepsonseWeaponValues

type PostGameCarnageReportRepsonseWeaponValues struct {
	UniqueWeaponKills          PostGameCarnageReportRepsonseBasicValueContainer `json:"uniqueWeaponKills"`
	UniqueWeaponPrecisionKills PostGameCarnageReportRepsonseBasicValueContainer `json:"uniqueWeaponPrecisionKills"`
}

Jump to

Keyboard shortcuts

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