fflogs

package
v0.0.0-...-d27e07b Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fflogs

type Fflogs struct {
	// contains filtered or unexported fields
}

func Init

func Init(clientId, clientSecret string) *Fflogs

func (*Fflogs) GetProgForReport

func (f *Fflogs) GetProgForReport(r string, rankingsToGet []*RankingToGet, char *ffxiv.Character) (*Fights, error)

func (*Fflogs) GetRankingsForCharacter

func (f *Fflogs) GetRankingsForCharacter(rankingsToGet []*RankingToGet, char *ffxiv.Character) (*Rankings, error)

func (*Fflogs) SetCharacterLodestoneID

func (f *Fflogs) SetCharacterLodestoneID(char *ffxiv.Character) error

func (*Fflogs) SetGraphqlClient

func (f *Fflogs) SetGraphqlClient()

func (*Fflogs) Token

func (f *Fflogs) Token() (*oauth2.Token, error)

type Fight

type Fight struct {
	LastPhaseIndex int
	Kill           bool
	EncounterID    int
	ReportID       string
	ID             int
}

func (*Fight) ReportURL

func (f *Fight) ReportURL() string

type Fights

type Fights struct {
	Fights []*Fight
}

func (*Fights) Add

func (f *Fights) Add(fight *Fight)

func (*Fights) FurthestFight

func (f *Fights) FurthestFight() *Fight

type Metric

type Metric string
const (
	Dps Metric = "rdps"
	Hps Metric = "hps"
)

type Rank

type Rank struct {
	RankPercent float64 `json:"rankPercent"`
	Spec        string  `json:"spec"`
	StartTime   int     `json:"startTime"`
	Report      Report  `json:"report"`
	Job         *ffxiv.Job

	DPSParseFound bool
	HPSParseFound bool

	DPSPercent float64
	HPSPercent float64
}

func (*Rank) BestDPSParseString

func (r *Rank) BestDPSParseString(encounterName string) string

func (*Rank) DPSPercentString

func (r *Rank) DPSPercentString() string

func (*Rank) HPSPercentString

func (r *Rank) HPSPercentString() string

func (*Rank) SameFight

func (r *Rank) SameFight(o *Rank) bool

func (*Rank) UnixTime

func (r *Rank) UnixTime() int

type Ranking

type Ranking struct {
	Error      string  `json:"error"`
	TotalKills int     `json:"totalKills"`
	Metric     Metric  `json:"metric"`
	Ranks      []*Rank `json:"ranks"`

	// odd partitions are standard comp, even partitions are nonstandard
	// if a nonstandard response returns an odd partition,
	// it's a copy of the standard counterpart
	Partition   int `json:"partition"`
	Nonstandard bool
}

func (*Ranking) BestDPSRank

func (r *Ranking) BestDPSRank() *Rank

func (*Ranking) BestHPSRank

func (r *Ranking) BestHPSRank() *Rank

func (*Ranking) Cleared

func (r *Ranking) Cleared() bool

func (*Ranking) RanksByDPSPercent

func (r *Ranking) RanksByDPSPercent() []*Rank

func (*Ranking) RanksByHPSPercent

func (r *Ranking) RanksByHPSPercent() []*Rank

func (*Ranking) RanksByTime

func (r *Ranking) RanksByTime() []*Rank

func (*Ranking) WorstDPSRank

func (r *Ranking) WorstDPSRank() *Rank

func (*Ranking) WorstHPSRank

func (r *Ranking) WorstHPSRank() *Rank

type RankingToGet

type RankingToGet struct {
	IDs        []int
	Difficulty int
}

type Rankings

type Rankings struct {
	Rankings map[int]*Ranking
}

Rankings contains many rankings for different encounters, indexed by the encounter ID of the fight.

func (*Rankings) Add

func (rs *Rankings) Add(id int, r *Ranking) error

type Report

type Report struct {
	Code      string `json:"code"`
	StartTime int    `json:"startTime"`
	FightId   int    `json:"fightID"`
}

func (*Report) Url

func (r *Report) Url() string

Jump to

Keyboard shortcuts

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