Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wait-what/osu-microapi
Expose osu! stats for select users publicly as a JSON
https://github.com/wait-what/osu-microapi
api api-rest osu osu-api osugame
Last synced: 5 days ago
JSON representation
Expose osu! stats for select users publicly as a JSON
- Host: GitHub
- URL: https://github.com/wait-what/osu-microapi
- Owner: wait-what
- License: mit
- Created: 2023-01-23T20:10:17.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-26T20:56:32.000Z (about 1 year ago)
- Last Synced: 2024-11-09T11:15:43.122Z (2 months ago)
- Topics: api, api-rest, osu, osu-api, osugame
- Language: Rust
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# osu microapi
Expose osu! stats for select users publicly as a JSONUseful if you want to have an embed with your osu stats on your website. An example page using the API can be found in `example.html`
## Features
- Results are cached in memory and only updated on request after the interval expires
- Runs on Windows, Linux and whatever else you can compile it for## Usage
- Download a prebuilt binary from [releases](https://github.com/wait-what/osu-microapi/releases)
- Create a `config.json`
- Create an OAuth application [here](https://osu.ppy.sh/home/account/edit#oauth)
- Copy the `Client ID` and `Client Secret`
> Do not share this information!
- Create a `config.json` in the same directory following this example:
```json
{
"bind_address": "0.0.0.0:6969",
"client_id": "12345",
"client_secret": "asdfhjksadlhfkldcnkljdsfhgjkldsfhgsjkdlfg",
"update_interval_minutes": 180,
"mode": "osu",
"user_ids": [
"10040223",
"7562902"
]
}
```
> Don't make it update too often or you might get rate limited by the API. 180 is 3 hours> `user_ids` is the list of users you want to expose.
## API reference
- GET `/` - comma separated list of user IDs
- GET `/user/` - JSON object with user info## Manual build
- Install Rust
- Clone the repo
- Run `cargo build --release`## License
This project is licensed under the [MIT license](./LICENSE)