Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuroji-fusky/sbbrowser-api-wrapper
An API wrapper for SBbrowser or sb.ltn.fi
https://github.com/kuroji-fusky/sbbrowser-api-wrapper
api cheerio fastify sponsorblock
Last synced: about 1 month ago
JSON representation
An API wrapper for SBbrowser or sb.ltn.fi
- Host: GitHub
- URL: https://github.com/kuroji-fusky/sbbrowser-api-wrapper
- Owner: kuroji-fusky
- License: apache-2.0
- Created: 2024-10-09T14:32:15.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T07:25:26.000Z (3 months ago)
- Last Synced: 2024-10-27T05:04:03.645Z (3 months ago)
- Topics: api, cheerio, fastify, sponsorblock
- Language: TypeScript
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SBbrowser API Wrapper
A wrapper for Lanrza's [SBbrowser][sbb] frontend as a digestable API built on Fastify and [Cheerio][cheerio].
This is built in conjunction with [SponsorExplorer][se] for ease of access through a REST API without
the concerns of rewriting it from scratch.## Setup and Installation
Requires Node and PNPM package manager, install the dependencies with
```console
pnpm install
```Then run the server locally
```console
pnpm run dev
```### Environment variables
- `ORIGIN_PRODUCTION_URL`: If you self-host [SponsorExplorer][se], point to its domain name you provided to be resolved by CORS
- `SERVER_PROTOCOL` (default: `http:`)
- `SERVER_HOST` (default: `localhost`)
- `SERVER_PORT` (default: `4000`)## Endpoints
All endpoints are prefixed with `/api/*` and they only accept `GET` requests only.
- `/video/:id`: A valid YouTube video ID, will return an empty array otherwise
- `/uuid/:uuid`: A segment UUID
- `/username/:username`: A given username
- `/userid/:userid`: A userID, suitable alternative if no username is given
- `/vip-users`: Returns a list of VIP users in UserID## License
Apache-2.0
[se]: https://github.com/kuroji-fusky/SponsorExplorer
[sbb]: https://sb.ltn.fi
[cheerio]: https://github.com/cheeriojs/cheerio