cfn

package
v0.0.0-...-919e030 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Leagues = map[string]string{
	"0":  "Rookie",
	"1":  "Bronze",
	"2":  "Super Bronze",
	"3":  "Ultra Bronze",
	"4":  "Silver",
	"5":  "Super Silver",
	"6":  "Ultra Silver",
	"7":  "Gold",
	"8":  "Super Gold",
	"9":  "Ultra Gold",
	"10": "Platinum",
	"11": "Super Platinum",
	"12": "Ultra Platinum",
	"13": "Diamond",
	"14": "Super Diamond",
	"15": "Ultra Diamond",
	"16": "Master",
	"17": "Grand Master",
	"18": "Ultimate Grand Master",
	"19": "Warlord",
}

Functions

func DiffInDays

func DiffInDays(d1, d2 time.Time) float64

func ExportCookies

func ExportCookies(cookies []*http.Cookie)

func ImportCookies

func ImportCookies() (cookies []*http.Cookie)

func ParseDate

func ParseDate(date string) time.Time

Types

type Battle

type Battle struct {
	Ratio  float32 `json:"ratio"`
	Total  int     `json:"total"`
	Wins   int     `json:"wins"`
	Losses int     `json:"losses"`
}

type CFN

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

func NewCFN

func NewCFN(token string) *CFN

func (*CFN) GetProfile

func (c *CFN) GetProfile(fighterId string) Profile

type Character

type Character struct {
	Name  string `json:"name"`
	Level int    `json:"level"`
}

type Profile

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

func (Profile) GetAccountAge

func (p Profile) GetAccountAge() string

func (Profile) GetBattleLoungeMatchesLosses

func (p Profile) GetBattleLoungeMatchesLosses() int

func (Profile) GetBattleLoungeMatchesRatio

func (p Profile) GetBattleLoungeMatchesRatio() float32

func (Profile) GetBattleLoungeMatchesTotal

func (p Profile) GetBattleLoungeMatchesTotal() int

func (Profile) GetBattleLoungeMatchesWins

func (p Profile) GetBattleLoungeMatchesWins() int

func (Profile) GetCasualMatchesLosses

func (p Profile) GetCasualMatchesLosses() int

func (Profile) GetCasualMatchesRatio

func (p Profile) GetCasualMatchesRatio() float32

func (Profile) GetCasualMatchesTotal

func (p Profile) GetCasualMatchesTotal() int

func (Profile) GetCasualMatchesWins

func (p Profile) GetCasualMatchesWins() int

func (Profile) GetCharacterLevel

func (p Profile) GetCharacterLevel() int

func (Profile) GetCharacterName

func (p Profile) GetCharacterName() string

func (Profile) GetDevice

func (p Profile) GetDevice() string

func (Profile) GetDojo

func (p Profile) GetDojo() string

func (Profile) GetFighterId

func (p Profile) GetFighterId() string

func (Profile) GetFirstMatch

func (p Profile) GetFirstMatch() string

func (Profile) GetLeague

func (p Profile) GetLeague() string

func (Profile) GetLeaguePoints

func (p Profile) GetLeaguePoints() int

func (Profile) GetMostRecentMatch

func (p Profile) GetMostRecentMatch() string

func (Profile) GetPlayerLevel

func (p Profile) GetPlayerLevel() int

func (Profile) GetRankedMatchesLosses

func (p Profile) GetRankedMatchesLosses() int

func (Profile) GetRankedMatchesRatio

func (p Profile) GetRankedMatchesRatio() float32

func (Profile) GetRankedMatchesTotal

func (p Profile) GetRankedMatchesTotal() int

func (Profile) GetRankedMatchesWins

func (p Profile) GetRankedMatchesWins() int

func (Profile) GetRanking

func (p Profile) GetRanking() int

func (Profile) GetRegion

func (p Profile) GetRegion() string

func (Profile) GetStatus

func (p Profile) GetStatus() string

func (Profile) GetTitle

func (p Profile) GetTitle() string

func (Profile) GetTotalMatches

func (p Profile) GetTotalMatches() int

func (Profile) GetTwitter

func (p Profile) GetTwitter() string

func (Profile) ToJSON

func (p Profile) ToJSON() (response []byte)

type Serialized

type Serialized struct {
	Id              string    `json:"id"`
	Region          string    `json:"region"`
	Device          string    `json:"device"`
	Status          string    `json:"status"`
	Title           string    `json:"title"`
	Dojo            string    `json:"dojo"`
	Twitter         string    `json:"twitter"`
	Level           int       `json:"level"`
	AccountAge      string    `json:"account_age"`
	TotalMatches    int       `json:"total_matches"`
	Character       Character `json:"character"`
	League          string    `json:"league"`
	LeaguePoints    int       `json:"league_points"`
	Ranking         int       `json:"ranking"`
	FirstMatch      string    `json:"first_match"`
	MostRecentMatch string    `json:"most_recent_match"`
	Ranked          Battle    `json:"ranked"`
	Casual          Battle    `json:"casual"`
	Lounge          Battle    `json:"lounge"`
}

Jump to

Keyboard shortcuts

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