Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theyadev/random-api
A simple and lightweight module to get random api
https://github.com/theyadev/random-api
api npm npm-package publicapis random
Last synced: 8 days ago
JSON representation
A simple and lightweight module to get random api
- Host: GitHub
- URL: https://github.com/theyadev/random-api
- Owner: theyadev
- License: mit
- Created: 2021-12-09T12:07:31.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-10T08:37:34.000Z (almost 3 years ago)
- Last Synced: 2024-10-27T09:17:09.555Z (22 days ago)
- Topics: api, npm, npm-package, publicapis, random
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/get-random-api
- Size: 363 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A simple and lightweight module to get random api
## Installation
`npm i --save get-random-api`
## Documentation
Import what you need !
#### Javascript
```js
const { getAllApis, getRandomApi, getAllCategories, getRandomCategory, getNumberOfApis } = require("get-random-api")
```#### Typescript
```ts
import { getAllApis, getRandomApi, getAllCategories, getRandomCategory, getNumberOfApis } from "get-random-api";
```### Usage
#### getAllApis
```js
const apis = await getAllApis()
```
#### getRandomApi
```js
const randomApis = await getRandomApi(number)
```#### getAllCategories
```js
const categories = await getAllCategories()
```
#### getRandomCategory
```js
const randomCategories = await getRandomCategory(number)
```
#### getNumberOfApis
```js
const count = await getNumberOfApis()
```