ghislainpiot / GoLolApi

A League of Legends API Wrapper written in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GoLolApi Build Status

A wrapper around the League Of Legends API written in Go.

Getting Started

Installing

go get github.com/Djipyy/GoLolApi

Exemple

package main

import (
	"fmt"

	gololapi "github.com/Djipyy/GoLolApi"
)

func main() {
	api := gololapi.NewAPI(gololapi.EUW, "YOUR_API_KEY", 0.8) //0.8 is the rate limit for the developpement key, you should change it if you have a production key
	summ := api.GetSummonerByID(71248364)
	fmt.Printf("His summoner name is %s", summ.Name)

	fmt.Println(api.GetFeaturedGames()) //This will return the current featured games of the region
}

Built With

  • go-cache - Library used for caching
  • rate - Library for the rate limiting

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A League of Legends API Wrapper written in Golang

License:MIT License


Languages

Language:Go 100.0%