Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stchris/randoku
generates random numbers so you don't have to
https://github.com/stchris/randoku
api axum random random-number-generators rust rust-lang webapp
Last synced: about 1 month ago
JSON representation
generates random numbers so you don't have to
- Host: GitHub
- URL: https://github.com/stchris/randoku
- Owner: stchris
- License: agpl-3.0
- Created: 2021-02-27T21:20:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T18:41:04.000Z (about 2 months ago)
- Last Synced: 2024-11-20T19:36:11.445Z (about 2 months ago)
- Topics: api, axum, random, random-number-generators, rust, rust-lang, webapp
- Language: Rust
- Homepage: https://randoku.shuttleapp.rs
- Size: 217 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# randoku
[![Tests & Clippy](https://github.com/stchris/randoku/actions/workflows/test.yml/badge.svg)](https://github.com/stchris/randoku/actions/workflows/test.yml)
a service which generates random numbers so you don't have to
See it in action here: https://randoku.shuttleapp.rs
### Usage
The index page at https://randoku.shuttleapp.rs shows an API overview page when called from a browser, but responds with a random number between 0 and 100 otherwise. This is based on a user-agent check. Numbers passed as parameters need to be between 0 and 18446744073709551615.
Request a random number between 0 and 100:
```
$ curl https://randoku.shuttleapp.rs/
4
```Request a random number between 0 and a given number:
```
$ curl https://randoku.shuttleapp.rs/42
4
```Request a random number between a given interval:
```
$ curl https://randoku.shuttleapp.rs/4/42
42
```Shuffle a list of comma-separated items:
```
$ curl https://randoku.shuttleapp.rs/shuffle/apples,bananas,oranges
bananas
oranges
apples
```### Running locally
```
$ cargo shuttle run
```