Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# get-random-api

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()
```