Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
/ rito Public archive

Simple, crossplatform C++20 library for League of Legends client and Riot API

License

Notifications You must be signed in to change notification settings

bartekprtc/rito

Repository files navigation

rito

linux gcc build linux clang build windows build

Overview

Rito is a simple, crossplatform (Windows and Linux) C++20 library interfacing with Riot services (i.e. Riot REST API and League of Legends client). It is currently in development - API changes might occur at some point. Rito uses POCO library in the backend. It offers a few classes which handle communication with Riot REST API, as well as with LoL client (LCU). For League client, Rito supports both REST API and Websocket communication.

Features

You want to:

  • Use Riot REST API easily? Use Riot_rest_handler class
  • Get League client (LCU) params (port & remoting auth token) easily? Use Lcu_process_handler class
  • Use League client REST API? Use Lcu_rest_handler class
  • Connect to League client using Websocket? Use Lcu_websocket_handler class
  • Use LCU events (with WAMP protocol over Websocket)? Use Lcu_wamp_handler class

Details in Docs wiki page and in Doxygen documentation.

Build

Quickstart

Windows

You'll need msvc from Visual Studio 2022 and cmake. Clone rito recursively:

> git clone --recursive git@github.com:bartekprtc/rito.git

Use embedded vcpkg to get all dependencies:

> .\tools\vcpkg\bootstrap-vcpkg.bat
> .\tools\vcpkg\vcpkg.exe install poco[netssl]

Configure, build and install the library:

> cmake -S . -B build "-DCMAKE_TOOLCHAIN_FILE=.\tools\vcpkg\scripts\buildsystems\vcpkg.make"
> cmake --build build --config Release
> cmake --build build -t install

Linux

You'll need gcc or clang 16, cmake, ninja and poco library. Install dependencies:

Ubuntu/Debian:

$ sudo apt install gcc cmake ninja-build libpoco-dev

or

$ sudo apt install clang cmake ninja-build libpoco-dev

Clone repo and build Rito:

$ git clone git@github.com:bartekprtc/rito.git
$ cd rito
$ cmake -S . -B build
$ cmake --build build

Install library:

$ sudo cmake --build build -t install

Detailed build guide

Rito uses cmake as a build system. It can be built with gcc or clang-16 on Linux and with msvc on Windows. It depends on Poco library (with SSL). For details, see Building Rito wiki page.

Usage

Rito can be either installed on the system, or integrated within cmake project. See Using Rito wiki page for more information on how to use the library and Docs wiki page for some brief overview of classes.

Development/Contributing

Rito was meant to be a simple League stat collection application, which turned into a library. Even though it's very simple, I decided to make it into proper github project (with CI, coverage, tests and other fancy stuff) for learning purposes. I am happy to accept suggestions, reviews and pull requests. If you wish to contribute (or you're just interested in running tests/static analysis locally), see Contributing wiki page.