|
1 | | -# GameDB |
| 1 | +<div align="center"> |
| 2 | + <h1 align="center">GameDB</h1> |
| 3 | + <h4 align="center">Jekyll static site with IGDB data</h4> |
| 4 | +</div> |
2 | 5 |
|
3 | | -[](https://github.com/LizardByte/GameDB/actions/workflows/update-db.yml?query=branch%3Amaster) |
4 | | -[](https://app.codecov.io/gh/LizardByte/GameDB) |
| 6 | +<div align="center"> |
| 7 | + <a href="https://github.com/LizardByte/GameDB/actions/workflows/ci-tests.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/gamedb/ci-tests.yml.svg?branch=master&label=CI&logo=github&style=for-the-badge" alt="CI"></a> |
| 8 | + <a href="https://github.com/LizardByte/GameDB/actions/workflows/update-db.yml?query=branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/gamedb/update-db.yml.svg?branch=master&label=update%20db&logo=github&style=for-the-badge" alt="Update DB"></a> |
| 9 | + <a href="https://app.codecov.io/gh/LizardByte/GameDB"><img src="https://img.shields.io/codecov/c/gh/LizardByte/GameDB.svg?token=AG91ICECDX&style=for-the-badge&logo=codecov&label=codecov" alt="Codecov"></a> |
| 10 | +</div> |
5 | 11 |
|
6 | | -This repository clones IGDB to gh-pages to be consumed by LizardByte projects, such as LizardByte/Sunshine. |
| 12 | +--- |
7 | 13 |
|
8 | | -Information from YouTube API is also added to the database for videos. |
| 14 | +<div align="center"> |
| 15 | + <a href="https://app.lizardbyte.dev/GameDB/characters/all.json"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapp.lizardbyte.dev%2FGameDB%2Fstats.json&query=%24.characters&label=characters&style=for-the-badge&color=blue" alt="Characters"></a> |
| 16 | + <a href="https://app.lizardbyte.dev/GameDB/collections/all.json"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapp.lizardbyte.dev%2FGameDB%2Fstats.json&query=%24.collections&label=collections&style=for-the-badge&color=blue" alt="Collections"></a> |
| 17 | + <a href="https://app.lizardbyte.dev/GameDB/franchises/all.json"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapp.lizardbyte.dev%2FGameDB%2Fstats.json&query=%24.franchises&label=franchises&style=for-the-badge&color=blue" alt="Franchises"></a> |
| 18 | + <a href="https://app.lizardbyte.dev/GameDB/games"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapp.lizardbyte.dev%2FGameDB%2Fstats.json&query=%24.games&label=games&style=for-the-badge&color=blue" alt="Games"></a> |
| 19 | + <a href="https://app.lizardbyte.dev/GameDB/platforms/all.json"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapp.lizardbyte.dev%2FGameDB%2Fstats.json&query=%24.platforms&label=platforms&style=for-the-badge&color=blue" alt="Platforms"></a> |
| 20 | + <a href="https://app.lizardbyte.dev/GameDB/videos"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapp.lizardbyte.dev%2FGameDB%2Fstats.json&query=%24.videos&label=videos&style=for-the-badge&color=blue" alt="Videos"></a> |
| 21 | +</div> |
| 22 | + |
| 23 | +## Overview |
| 24 | + |
| 25 | +GameDB is a database of games, platforms, characters, collections, franchises, and videos sourced from |
| 26 | +[IGDB](https://www.igdb.com) and published as a static JSON API via |
| 27 | +[GitHub Pages](https://lizardbyte.github.io/GameDB). Video metadata is enriched with data from the YouTube API. |
| 28 | + |
| 29 | +The data is intended to be consumed by [LizardByte](https://app.lizardbyte.dev) projects such as |
| 30 | +[Sunshine](https://github.com/LizardByte/Sunshine). |
| 31 | + |
| 32 | +## Data |
| 33 | + |
| 34 | +The database is updated automatically on a schedule via the [update-db](.github/workflows/update-db.yml) workflow. |
| 35 | +The generated JSON files are published to the `gh-pages` branch and served at |
| 36 | +`https://app.lizardbyte.dev/GameDB/`. |
| 37 | + |
| 38 | +| Endpoint | Description | URL | |
| 39 | +|-------------|-------------------------------------------------------|-----------------------------------------------------------| |
| 40 | +| Buckets | Game name search index, split by first two characters | `https://app.lizardbyte.dev/GameDB/buckets/<bucket>.json` | |
| 41 | +| Characters | Individual character details and all characters | `https://app.lizardbyte.dev/GameDB/characters/<id>.json` | |
| 42 | +| Collections | Individual collection details and all collections | `https://app.lizardbyte.dev/GameDB/collections/<id>.json` | |
| 43 | +| Franchises | Individual franchise details and all franchises | `https://app.lizardbyte.dev/GameDB/franchises/<id>.json` | |
| 44 | +| Games | Individual game details (no aggregate `all.json`) | `https://app.lizardbyte.dev/GameDB/games/<id>.json` | |
| 45 | +| Platforms | Individual platform details and all platforms | `https://app.lizardbyte.dev/GameDB/platforms/<id>.json` | |
| 46 | +| Videos | Individual YouTube video metadata | `https://app.lizardbyte.dev/GameDB/videos/<id>.json` | |
| 47 | +| Stats | Total item counts per category | `https://app.lizardbyte.dev/GameDB/stats.json` | |
| 48 | + |
| 49 | +`all.json` files (e.g. `characters/all.json`) contain a summary of every item in that category as a single |
| 50 | +dictionary keyed by ID. |
| 51 | + |
| 52 | +Buckets are used as a lightweight search index for game names. Each bucket file is named after the first two |
| 53 | +alphanumeric characters of the game name (lowercased), e.g. `ha.json` for games starting with "Ha" such as |
| 54 | +*Halo*. Games whose names contain a space as the second character are put into a bucket named after the first |
| 55 | +character. Games whose names do not start with two alphanumeric characters are grouped into `@.json`. Each bucket |
| 56 | +contains a dictionary of `{ id: { name } }` entries, keeping individual files small for fast lookups. |
0 commit comments