Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wh-iterabb-it/meowfacts
🐈 a simple api which returns a catfact
https://github.com/wh-iterabb-it/meowfacts
api catfacts hacktoberfest js-api-examples learning-by-doing restful-api
Last synced: 3 months ago
JSON representation
🐈 a simple api which returns a catfact
- Host: GitHub
- URL: https://github.com/wh-iterabb-it/meowfacts
- Owner: wh-iterabb-it
- License: mit
- Created: 2019-08-31T13:22:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T14:54:30.000Z (3 months ago)
- Last Synced: 2024-10-25T19:21:21.827Z (3 months ago)
- Topics: api, catfacts, hacktoberfest, js-api-examples, learning-by-doing, restful-api
- Language: JavaScript
- Homepage: https://meowfacts.herokuapp.com/
- Size: 617 KB
- Stars: 408
- Watchers: 5
- Forks: 58
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Funding: docs/FUNDING.yml
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- public-apis - MeowFacts
- public-apis - MeowFacts
- public-apis - MeowFacts
- fucking-public-apis - MeowFacts
README
meowfacts
=========[![Issues](https://img.shields.io/github/issues/wh-iterabb-it/meowfacts.svg)](https://github.com/wh-iterabb-it/meowfacts/issues)
[![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://github.com/wh-iterabb-it/meowfacts/blob/main/LICENSE)
![Known Vulnerabilities](https://snyk.io/test/github/wh-iterabb-it/meowfacts/badge.svg)
[![codecov](https://codecov.io/gh/wh-iterabb-it/meowfacts/branch/main/graph/badge.svg)](https://codecov.io/gh/wh-iterabb-it/meowfacts)## Description:
A simple api that returns a random fact about cats on a GET request
### Example Usage
```
curl https://meowfacts.herokuapp.com/
```Response
```json
{
"data": [
"0": "Mother cats teach their kittens to use the litter box."
]
}
```### Advanced Usage
You can request more than one fact at a time by using the GET param `count`
```bash
curl https://meowfacts.herokuapp.com/?count=3
```Response
```json
{
"data": [
"0": "Mother cats teach their kittens to use the litter box.",
"1": "A cat can sprint at about thirty-one miles per hour.",
"2": "The worlds richest cat is worth $13 million after his human passed away and left her fortune to him."
]
}
```You can request a specific fact if you know the ID / order it is buy passing the GET param `id`
```bash
curl https://meowfacts.herokuapp.com/?id=3
```Response
```json
{
"data": [
"0": "Mother cats teach their kittens to use the litter box."
]
}
```### Language Support
You can request the response in different languages by using the GET param `lang`
```bash
curl https://meowfacts.herokuapp.com/?lang=ukr
```Response
```json
{
"data": [
"0": "Найбагатший у світі кіт коштує 13 мільйонів доларів після того, як його людина померла і залишила йому свій стан"
]
}
```#### Supported Languages
The supported languages are listed below, you can use any of the `lang Values` in the first column as a `lang` param.
"?lang=esp" and "?lang=esp-mx" will both return spanish for your response, and simply using the `ISO-639-1` code will default to esp-mx for simplicity.
| LANG Variable | [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) | Language Name | Localization (country) |
| :---: | :---: | :---: | :---: |
| `eng-us` | `eng` | English | USA |
| `ces-cz` or `cze-cz` | `cze` (B) `ces` (T) | Czech | CZ |
| `ger-de` | `ger` | German | DE |
| `ben-in` | `ben` | Bengali | IN |
| `esp-es` | `esp` | Spanish | ES |
| `esp-mx` | `esp` | Spanish (default) | MX |
| `rus-ru` | `rus` | Russian | RUS |
| `por-br` | `por` | Portuguese | BR |
| `tl-fil` | `fil` | Filipino | PH |
| `ukr-ua` | `ukr` | Ukrainian | UA |
| `urd-ur` | `urd` | Urdu | UR |
| `ita-it` | `ita` | Italian | IT |
| `zho-tw` | `zho` | Chinese | TW (Taiwan) |
| `kor-ko` | `kor` | Korean | KO |Help us expand and improve Internationalization on this API (Click to expand)
Help us expand and improve Internationalization on this API
Note: We are trying to follow the browser's language tags, which are formally defined in RFC 5646, which rely on the ISO 639 standard (quite often the 639-1 code list) for language codes to be used.
We would love it if you helped this project by taking a look at our Call for Contributors to see if you can make a contribution that helps us be more inclusive and support more languages.
### Documentation
## Local Development
### Installation
```
npm install
```Basic usage
```
npm run start
```### Dedication && Funding
This api is dedicated to pistachio; she brought me great comfort in dire times. Words can't describe the debt I owe to her.
If you enjoy this api, or just love cats, please donate to:
NYC Animal Project Paypal Link
NYC Animal Project is a struggling `no kill` cat shelter in the heart of new york that relies entirely on fosters and help from small donations. I can say personally having volunteered for them, even a few cents donation would make a difference for the very small organization. I fostered many kittens from them, and Pistachio was the runt that went un-adopted. She was shy, but very outgoing when she got settled. I highly recommend to foster and adopt if you can.