Documentation
¶
Index ¶
- type Ability
- type BuffType
- type Client
- type ClientImplementation
- func (c *ClientImplementation) GetAllAbilities(ctx context.Context) (map[int]Ability, error)
- func (c *ClientImplementation) GetEvents(ctx context.Context, code string, fightID int, startTime, endTime float64, ...) ([]*RawBuffEvent, error)
- func (c *ClientImplementation) GetTimesFromFightAndID(ctx context.Context, code string, fightID int) (startTime, endTime float64, err error)
- func (c *ClientImplementation) Token() (*oauth2.Token, error)
- type EventDataType
- type HostilityType
- type RawBuffEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuffType ¶
type BuffType string
const ( Applybuff BuffType = "applybuff" Applybuffstack BuffType = "applybuffstack" Applydebuff BuffType = "applydebuff" Applydebuffstack BuffType = "applydebuffstack" Begincast BuffType = "begincast" Calculateddamage BuffType = "calculateddamage" Calculatedheal BuffType = "calculatedheal" Cast BuffType = "cast" Damage BuffType = "damage" Heal BuffType = "heal" Limitbreakupdate BuffType = "limitbreakupdate" Refreshbuff BuffType = "refreshbuff" Refreshdebuff BuffType = "refreshdebuff" Removebuff BuffType = "removebuff" Removebuffstack BuffType = "removebuffstack" Removedebuff BuffType = "removedebuff" )
type Client ¶
type Client interface { GetTimesFromFightAndID(ctx context.Context, code string, fightID int) (startTime, endTime float64, err error) GetEvents(ctx context.Context, code string, fightID int, startTime, endTime float64, dataType EventDataType, hostilityType HostilityType) ([]*RawBuffEvent, error) }
type ClientImplementation ¶
type ClientImplementation struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(clientID, secret string, token ...string) (*ClientImplementation, error)
TODO: caching
func (*ClientImplementation) GetAllAbilities ¶
func (*ClientImplementation) GetEvents ¶
func (c *ClientImplementation) GetEvents(ctx context.Context, code string, fightID int, startTime, endTime float64, dataType EventDataType, hostilityType HostilityType) ([]*RawBuffEvent, error)
TODO: GetEvents(Buffs,Friendlies) took 5.76s. Find ways to optimize oh god its slow
func (*ClientImplementation) GetTimesFromFightAndID ¶
type EventDataType ¶
type EventDataType string
const ( EDTypeAll EventDataType = "All" EDTypeBuffs EventDataType = "Buffs" EDTypeCasts EventDataType = "Casts" EDTypeCombatantInfo EventDataType = "CombatantInfo" EDTypeDamageDone EventDataType = "DamageDone" EDTypeDamageTaken EventDataType = "DamageTaken" EDTypeDeaths EventDataType = "Deaths" EDTypeDebuffs EventDataType = "Debuffs" EDTypeDispels EventDataType = "Dispels" EDTypeHealing EventDataType = "Healing" EDTypeInterrupts EventDataType = "Interrupts" EDTypeResources EventDataType = "Resources" EDTypeSummons EventDataType = "Summons" EDTypeThreat EventDataType = "Threat" )
type HostilityType ¶
type HostilityType string
const ( Friendlies HostilityType = "Friendlies" Enemies HostilityType = "Enemies" )
type RawBuffEvent ¶
type RawBuffEvent struct { Timestamp int64 `json:"timestamp"` Type BuffType `json:"type"` SourceID *int64 `json:"sourceID,omitempty"` TargetID *int64 `json:"targetID,omitempty"` AbilityGameID *int64 `json:"abilityGameID,omitempty"` HitType *int64 `json:"hitType,omitempty"` Amount *int64 `json:"amount,omitempty"` Multiplier *float64 `json:"multiplier,omitempty"` PacketID *int64 `json:"packetID,omitempty"` Stack *int64 `json:"stack,omitempty"` DirectHit *bool `json:"directHit,omitempty"` Value *int64 `json:"value,omitempty"` Bars *int64 `json:"bars,omitempty"` Melee *bool `json:"melee,omitempty"` Absorbed *int64 `json:"absorbed,omitempty"` Absorb *int64 `json:"absorb,omitempty"` Overheal *int64 `json:"overheal,omitempty"` Tick *bool `json:"tick,omitempty"` FinalizedAmount *float64 `json:"finalizedAmount,omitempty"` Simulated *bool `json:"simulated,omitempty"` ExpectedAmount *int64 `json:"expectedAmount,omitempty"` ExpectedCritRate *int64 `json:"expectedCritRate,omitempty"` ActorPotencyRatio *float64 `json:"actorPotencyRatio,omitempty"` GuessAmount *float64 `json:"guessAmount,omitempty"` DirectHitPercentage *float64 `json:"directHitPercentage,omitempty"` TargetInstance *int64 `json:"targetInstance,omitempty"` }
Click to show internal directories.
Click to hide internal directories.