lunar

package
v0.0.0-...-ec9ba44 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JobTickers = map[string]string{
		"Paladin":    "PLD",
		"Warrior":    "WAR",
		"DarkKnight": "DRK",
		"Gunbreaker": "GNB",

		"Monk":    "MNK",
		"Dragoon": "DRG",
		"Ninja":   "NIN",
		"Samurai": "SAM",

		"WhiteMage":   "WHM",
		"Scholar":     "SCH",
		"Astrologian": "AST",

		"Bard":      "BRD",
		"Machinist": "MCH",
		"Dancer":    "DNC",

		"BlackMage": "BLM",
		"Summoner":  "SMN",
		"RedMage":   "RDM",
		"BlueMage":  "BLU",
	}
)

Functions

func GenerateOutputPng

func GenerateOutputPng(structure DeconstructedQueryResponse)

Types

type CompositionPlayer

type CompositionPlayer struct {
	Name string `json:"name"`
	Job  string `json:"type"`
	ID   int    `json:"id"`
}

type DamageDowns

type DamageDowns struct {
	DebuffMode string `json:"type"`
	TargetID   int    `json:"targetID"`
}

type DeathEvent

type DeathEvent struct {
	PlayerName string `json:"name"`
	PlayerID   int    `json:"id"`
}

type DeconstructedQueryResponse

type DeconstructedQueryResponse struct {
	TotalTime float64
	Deaths    map[string]int
	Players   map[string]RdpsRankingCharacter
	//RdpsRankings []RdpsRankingCharacter
	SpeedRank   SpeedRanking
	DamageDowns map[string]int
	Jobs        map[string]string
}

type FFLogsClient

type FFLogsClient struct {
	AccessToken Token
	// contains filtered or unexported fields
}

func NewFFLogsClient

func NewFFLogsClient() FFLogsClient

func (FFLogsClient) GetLastFightInfo

func (c FFLogsClient) GetLastFightInfo(report string) (*Fight, int)

func (FFLogsClient) GrabReportInfo

func (c FFLogsClient) GrabReportInfo(report string, fight Fight) DeconstructedQueryResponse

type Fight

type Fight struct {
	ID        int    `json:"id"`
	BossName  string `json:"name"`
	StartTime int    `json:"startTime"`
	EndTime   int    `json:"endTime"`
}

type FightsResponse

type FightsResponse struct {
	QueryData struct {
		ReportData struct {
			Report struct {
				Fights []Fight `json:"fights"`
			} `json:"report"`
		} `json:"reportData"`
	} `json:"data"`
}

type QueryResponse

type QueryResponse struct {
	Data struct {
		ReportData struct {
			Report struct {
				Composition struct {
					CompositionData struct {
						TotalTime   float64             `json:"totalTime"`
						Party       []CompositionPlayer `json:"composition"`
						DeathEvents []DeathEvent        `json:"deathEvents"`
					} `json:"data"`
				} `json:"composition"`
				Rankings struct {
					RankingData []RankingData `json:"data"`
				} `json:"rankings"`
				DamageDownEvents struct {
					DmgDownInformation []DamageDowns `json:"data"`
				} `json:"events"`
			} `json:"report"`
		} `json:"reportData"`
	} `json:"data"`
}

type RankingData

type RankingData struct {
	Roles struct {
		Tanks struct {
			TankCharacters []RdpsRankingCharacter `json:"characters"`
		} `json:"tanks"`
		Healers struct {
			HealerCharacters []RdpsRankingCharacter `json:"characters"`
		} `json:"healers"`
		DPS struct {
			DPSCharacters []RdpsRankingCharacter `json:"characters"`
		} `json:"dps"`
	} `json:"roles"`
	SpeedRank SpeedRanking `json:"speed"`
}

type RdpsRankingCharacter

type RdpsRankingCharacter struct {
	PlayerName  string  `json:"name"`
	Rdps        float64 `json:"amount"`
	FightRank   string  `json:"rank"`
	BestRank    string  `json:"best"`
	RankPercent int     `json:"rankPercent"`
	//Class2 is to detect if the player is a combined healer or tank ranking
	Class2 *string `json:"class_2"`
}

type SortByRdps

type SortByRdps []RdpsRankingCharacter

func (SortByRdps) Len

func (r SortByRdps) Len() int

func (SortByRdps) Less

func (r SortByRdps) Less(i, j int) bool

func (SortByRdps) Swap

func (r SortByRdps) Swap(i, j int)

type SpeedRanking

type SpeedRanking struct {
	Rank        string `json:"rank"`
	TotalParses int    `json:"totalParses"`
	RankPercent int    `json:"rankPercent"`
}

type Token

type Token struct {
	AccessToken string `json:"access_token"`
}

Jump to

Keyboard shortcuts

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