Skip to content

StrayStormStudios/lichess

Β 
Β 

Repository files navigation

Golang Lichess Package Go Report Card - Badge GitHub Forks - Badge GitHub Issues - Badge

A Go implementation of Lichess's API

Usage

package main

import (
 "fmt"
 "github.com/chrisbarnes2000/lichess"
 "log"
 "net/http"
 "net/url"
)

func main() {
  baseURL, err := url.Parse("https://lichess.org")
  if err != nil {
    log.Fatal(err)
  }
  client := new(lichess.Client)

  client.BaseURL = baseURL
  client.APIKey = "<API Key>"
  client.UserAgent = "Golang Client"
  client.HttpClient = new(http.Client)

  user, err := client.GetProfile()
  if err != nil {
    log.Fatal(err)
  }
  fmt.Println(user.ID)
  }

πŸ’» Local Development

Getting Started

  • First, Create an API Token from here
  • Second, fork this repo,
  • Third, run these commands to clone it locally and get started
# Clone and CD into/Open this project
$ git clone [email protected]:YOUR_GITHUB_USERNAME/lichess.git && cd lichess
# Create a .env file to hold our secrets
$ touch .env > LICHESS_TOKEN=YOUR_API_TOKEN
# Download & Install the dependancies. Then Compile the program
$ go build
# Run the program locally
$ go run lichess.go

Available Features

Ideas For Tournament Main Code

Afetr setting things up for the Chess club at MakeSchool to compete and learn from eachother I have noticed these features are missing from the tournament sections of lichess.org and will be looking into how one mighth add these

  1. Ability to Kick/Pause Members
  2. Ability to Invite people you follow
  3. Ability to Pick who you compete against
  4. Ability to Change How Matches are paird up
  5. Ability to Link to Twitter/Twitch/Discord/Slack Group Channel for voice/disscussion
  6. Dispay Tournaments you've joined via quick button on mobile and desktop versions

πŸ“š Resources

About

Golang package for lichess

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.5%
  • Makefile 1.5%