golol

package module
v0.0.0-...-a4ddc4c Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2013 License: MIT Imports: 7 Imported by: 0

README

golol

RTMPS client for league of legends built in go

This is incomplete, but works mostly. All of the hard work has been done. There could be a lot better error handling, documentation, and code clean up, but with the release of the official API my work on this project has ended. I am putting it up incase anyone is curious to see how I did it. Potentially someone could use this code as a foundation for a custom league client built in Go.

Anyways, if anyone has any questions let me know.

Huge thanks to the lolrtmpsclient java library (https://code.google.com/p/lolrtmpsclient/). I referenced it immensly while trying to get this to work. A lot of the low level code is more or less just the java implemnetation ported to Go.

Documentation

Overview

Package golol is a library that provides a means of connecting and recieving data from Riot's League of Legend Servers

Index

Constants

View Source
const (
	RedID    = 1
	YellowID = 3
	BlueID   = 5
	QuintID  = 7
)

Variables

View Source
var (
	ClientVersion = "3.15.13_12_13_16_07"
)

Might need to worry about ClientVersion being different on different Server

Functions

func ChangeClientVersion

func ChangeClientVersion(version string)

func ChangePort

func ChangePort(newPort int)

func GetLeagueID

func GetLeagueID(summonerName string) (int, error)

func GetRunePages

func GetRunePages(leagueID int) bool

Types

type LeagueConnection

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

func New

func New(serverName, username, password string) (LeagueConnection, error)

func (LeagueConnection) GetSummonerByName

func (client LeagueConnection) GetSummonerByName(summonerName string) (summoner Summoner, err error)

func (LeagueConnection) GetSummonerRunePages

func (client LeagueConnection) GetSummonerRunePages(summonerID int) (runePages []RunePage, err error)

func (LeagueConnection) GetSummonerRunePages2

func (client LeagueConnection) GetSummonerRunePages2(summonerID int)

type LeaguePool

type LeaguePool chan LeagueConnection

func NewPool

func NewPool(loginInfo ...LoginInfo) LeaguePool

func (LeaguePool) GetNextConnection

func (pool LeaguePool) GetNextConnection() (client LeagueConnection, err error)

func (LeaguePool) GetSummonerByName

func (pool LeaguePool) GetSummonerByName(summonerName string) (summoner Summoner, err error)

func (LeaguePool) GetSummonerRunePages

func (pool LeaguePool) GetSummonerRunePages(summonerID int) (runePages []RunePage, err error)

func (LeaguePool) GetSummonerRunePages2

func (pool LeaguePool) GetSummonerRunePages2(summonerID int)

type LoginInfo

type LoginInfo struct {
	ServerName string
	Username   string
	Password   string
}

type Rune

type Rune struct {
	ID          int
	Tier        int
	Description string
	Name        string
}

type RunePage

type RunePage struct {
	Name      string
	Current   bool
	ID        int
	RuneSlots []RuneSlot
}

type RuneSlot

type RuneSlot struct {
	ID       int
	MinLevel int
	TypeID   int
	Color    string
	Rune
}

type Summoner

type Summoner struct {
	IconId       int
	Level        int
	ID           int
	InternalName string
	AccountID    int
	Name         string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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