Tools
SDKs
Official libraries for the API. Each one has every endpoint, retries a request that hit a limit or a busy moment, and turns errors into exceptions with the error’s code.
JavaScript and TypeScript
Works in Node 18 and up, Deno, Bun and edge runtimes. Types come with it.
npm install roterminalimport RoTerminal from 'roterminal'
const rt = new RoTerminal({ apiKey: process.env.ROTERMINAL_API_KEY })
const { data: game } = await rt.games.retrieve('grow a garden')
console.log(`${game.name}: ${game.playing_now} playing`)The key is optional. Without one, new RoTerminal() reads ROTERMINAL_API_KEY, and calls without a key if there isn’t one.
Methods
| Method | Endpoint |
|---|---|
rt.games.retrieve() | Retrieve a game |
rt.games.days() | List a game’s days |
rt.games.updates() | List a game’s updates |
rt.games.live() | Get live players |
rt.games.liveMany() | Get live players for several games |
rt.games.developer() | Retrieve a game’s developer |
rt.games.search() | Search games |
rt.games.compare() | Compare games |
rt.games.top() | List the most played games |
rt.games.rising() | List rising games |
rt.games.screen() | Screen games |
rt.trends.list() | List trends |
rt.trends.retrieve() | Retrieve a trend |
rt.genres.list() | List genres |
rt.charts.list() | List Roblox’s charts |
rt.charts.retrieve() | Retrieve a chart |
rt.games.charts() | List a game’s places on the charts |
rt.developers.retrieve() | Retrieve a developer |
rt.roblox.retrieve() | Get players on Roblox |
rt.me.retrieve() | Retrieve your account |
rt.me.games() | List your games |
Each method returns the whole response: { data, link, as_of }.
Errors
import RoTerminal, { RoTerminalError } from 'roterminal'
try {
await rt.games.retrieve('a game that doesn’t exist')
} catch (err) {
if (err instanceof RoTerminalError) console.log(err.code, err.status, err.requestId)
}Options
| Option | Default | Description |
|---|---|---|
apiKey | ROTERMINAL_API_KEY | Your API key. |
maxRetries | 2 | How many times to retry a 429 or 5xx, waiting as the response asks. |
timeout | 20000 | Milliseconds before a request gives up. |
baseURL | https://roterminal.co/api/v1 | Where to send requests. |
Python
Python 3.9 and up, with no dependencies.
pip install roterminalfrom roterminal import RoTerminal
rt = RoTerminal() # reads ROTERMINAL_API_KEY
game = rt.games.retrieve("grow a garden")["data"]
print(f"{game['name']}: {game['playing_now']} playing")Methods have the same names as JavaScript’s, with keyword arguments: rt.games.rising(range="7d", limit=5). Errors raise roterminal.RoTerminalError, with code, status and request_id.
Any other language
The OpenAPI file describes every endpoint, parameter and field, so you can generate a client for any language.