https://github.com/jonasknobloch/nhie
No-bullshit "Never Have I Ever" implementation for the web.
https://github.com/jonasknobloch/nhie
api game go js vanilla-js
Last synced: 5 months ago
JSON representation
No-bullshit "Never Have I Ever" implementation for the web.
- Host: GitHub
- URL: https://github.com/jonasknobloch/nhie
- Owner: jonasknobloch
- License: mit
- Created: 2019-04-25T08:00:24.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T22:07:52.000Z (over 2 years ago)
- Last Synced: 2025-04-29T23:13:04.799Z (about 1 year ago)
- Topics: api, game, go, js, vanilla-js
- Language: Go
- Homepage: https://nhie.io
- Size: 211 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Never Have I Ever
[](https://goreportcard.com/report/github.com/jonasknobloch/nhie)
This project aims at providing a no-bullshit "Never Have I Ever" experience.
Available features are intentionally limited to the bare minimum.
Use the provided API to implement own ideas.
**We do not advocate overconsumption or the abuse of alcohol.
While we hope you have fun playing, please do so responsibly.**
[Screenshot Dark](nhie_28be7d12-90b4-4846-b86a-73040eff11ec_dark.png)
[Screenshot Light](nhie_28be7d12-90b4-4846-b86a-73040eff11ec_light.png)
## API
### Endpoints
#### v2
```http request
GET https://api.nhie.io/v2/statements/next
```
```json
{
"ID":"28be7d12-90b4-4846-b86a-73040eff11ec",
"statement":"Never have I ever been stung by a bee.",
"category":"harmless"
}
```
#### v1
```http request
GET https://api.nhie.io/v1/statements/random
```
**This endpoint is deprecated and might be removed at any time.**
Since a surprising amount of other projects still depend on the (previously undocumented) `v1` endpoint, we decided to
keep it around as a permanent redirect to the largely compatible `v2` endpoint. Note that the `history_id` query
parameter is not supported anymore. See [duplicate statements](#duplicate-statements) for a similar functionality.
### Query Parameters
| Key | Value |
|----------------|----------------------------------|
| category | harmless, delicate or offensive |
| language | IETF BCP 47 language tag |
| statement_id | UUID of previous statement |
### Multiple Categories
Multiple categories can be queried by adding multiple `category` parameters.
A random category is used if no `category` parameter is set.
```http request
GET https://api.nhie.io/v2/statements/next?category=delicate&category=offensive
```
### Supported Languages
The currently supported languages are listed below. More languages might be added in the future.
| Language | BCP 47 |
|-------------------|--------|
| English (default) | en |
| Deutsch | de |
```http request
GET https://api.nhie.io/v2/statements/next?language=de
```
### Duplicate Statements
The `statement_id` parameter can be used to avoid duplicate statements during a game session.
All available statements are internally ordered in a random fashion. With `statement_id` set,
the returned statement is guaranteed be different from previous statements.
```http request
GET https://api.nhie.io/v2/statements/next?statement_id=28be7d12-90b4-4846-b86a-73040eff11ec
```
## Contributing
Pull requests are welcome. Please open an issue first to discuss what you would like to change.