lolbuild

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package lolbuild provides functions for loading builds from different sources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetData added in v0.3.0

type AssetData struct {
	Name    string
	Slug    string
	IconUrl string
}

type Build

type Build struct {
	Name           string          `json:"name"`
	Winrate        float64         `json:"winrate"`
	Matches        int             `json:"matches"`
	Primary        Rune            `json:"primary"`
	Secondary      Rune            `json:"secondary"`
	SelectedPerks  []Rune          `json:"selectedPerks"`
	SummonerSpells []SummonerSpell `json:"summonerSpells"`
	ItemGroups     []ItemGroup     `json:"itemGroups"`
	CoreItem       Item            `json:"coreItem"`
	SkillMaxOrder  []int           `json:"skillMaxOrder"`
	SkillOrder     []int           `json:"skillOrder"`
}

Build is a build structure ready to be used in the app

type BuildCollection

type BuildCollection struct {
	Builds []Build `json:"builds"`
	Source string  `json:"source"`
}

BuildCollection is a collection of builds from a single source

type BuildSource added in v0.3.0

type BuildSource struct {
	Slug string `json:"slug"`
	Name string `json:"name"`
}

type ChampionData added in v0.4.0

type ChampionData struct {
	Spells  []Spell `json:"spells"`
	Passive Passive `json:"passive"`
}

type ChampionName added in v0.3.0

type ChampionName struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Item

type Item struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	Slug       string `json:"slug"`
	IconUrl    string `json:"iconUrl"`
	IsCoreItem bool   `json:"IsCoreItem"`
}

type ItemGroup

type ItemGroup struct {
	Items []Item `json:"items"`
	Name  string `json:"name"`
}

type Loader

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

func (*Loader) GetChampionData added in v0.4.0

func (l *Loader) GetChampionData(championId int, language string) *ChampionData

GetChampionData loads champion data from data dragon

func (*Loader) GetChampionName added in v0.3.0

func (l *Loader) GetChampionName(id int, language string) ChampionName

func (*Loader) GetRuneTree

func (l *Loader) GetRuneTree(name string, language string) RuneTree

GetRuneTree returns a rune tree by its name

func (*Loader) GetSources added in v0.3.0

func (l *Loader) GetSources() []BuildSource

func (*Loader) LoadBuilds

func (l *Loader) LoadBuilds(championName string, sources []string, role, language string) []BuildCollection

LoadBuilds loads builds for a given champion and role from specified sources

type Passive added in v0.4.0

type Passive struct {
	Name  string     `json:"name"`
	Image SpellImage `json:"image"`
}

type RawRuneTree

type RawRuneTree struct {
	ID    int    `json:"id"`
	Key   string `json:"key"`
	Icon  string `json:"icon"`
	Name  string `json:"name"`
	Slots []struct {
		Runes []struct {
			ID        int    `json:"id"`
			Key       string `json:"key"`
			Icon      string `json:"icon"`
			Name      string `json:"name"`
			ShortDesc string `json:"shortDesc"`
			LongDesc  string `json:"longDesc"`
		} `json:"runes"`
	} `json:"slots"`
}

RawRuneTree is a raw rune tree structure from data dragon

type Rune

type Rune struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Slug    string `json:"slug"`
	IconUrl string `json:"iconUrl"`
	Path    *Rune  `json:"path"`
}

type RuneTree

type RuneTree struct {
	Name      string `json:"name"`
	Keystones []Rune `json:"keystones"`
	Perks     []Rune `json:"perks"`
	IconUrl   string `json:"iconUrl"`
}

RuneTree is a rune tree structure ready to be used in the app

type RuneTrees

type RuneTrees = []RuneTree

type Spell added in v0.4.0

type Spell struct {
	Name  string     `json:"name"`
	Image SpellImage `json:"image"`
}

type SpellImage added in v0.4.0

type SpellImage struct {
	Full string `json:"full"`
}

type SummonerSpell

type SummonerSpell struct {
	ID      int    `json:"id"`
	IconUrl string `json:"iconUrl"`
	Name    string `json:"name"`
}

Jump to

Keyboard shortcuts

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