# api-call-simplifier

> A small library that makes it easy to write a client to work with the API.

Latest version **0.2.4** (published 2023-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install api-call-simplifier
pnpm add api-call-simplifier
yarn add api-call-simplifier
bun add api-call-simplifier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2023-08-11 |
| First published | 2021-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kirill Vercetti |
| Maintainers | kyzima-spb |
| Keywords | api, web api, rest api, axios, api client |

## Links

- npm: https://www.npmjs.com/package/api-call-simplifier
- Repository: https://github.com/kyzima-spb/api-call-simplifier
- Homepage: https://github.com/kyzima-spb/api-call-simplifier#readme
- Issues: https://github.com/kyzima-spb/api-call-simplifier/issues
- npm.io page: https://npm.io/package/api-call-simplifier

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.24.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.2.4 (latest) — 2023-08-11
- 0.2.3 — 2023-08-09
- 0.2.2 — 2023-08-05
- 0.2.1 — 2023-08-04
- 0.2.0 — 2021-11-13
- 0.1.0 — 2021-11-12

## README

# api-call-simplifier

A small library that makes it easy to write a client to work with the API.

## Installation

```shell
$ npm i -S api-call-simplifier
```

## Usage

### NodeJS example

```javascript
const axios = require('axios');
const API = require('api-call-simplifier');


const { apiCall, resource } = API(axios.create({
    baseURL: 'https://jsonplaceholder.typicode.com',
}));

const api = {
    posts: resource('/posts'),
    comments: resource('/comments'),
    albums: resource('/albums'),
    photos: resource('/photos'),
    todos: resource('/todos'),
    users: resource('/users'),
    post: {
        comments: resource('/posts/<id>/comments')
    }
};
```

### NuxtJS example

[![Edit demo-api-call-simplifier](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vibrant-noyce-wpgg7?fontsize=14&hidenavigation=1&module=%2Fcore%2Fapi.js&theme=dark&view=editor)

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

[comment]: <> (## History)

[comment]: <> (TODO: Write history)

[comment]: <> (## Credits)

[comment]: <> (TODO: Write credits)

[comment]: <> (## License)

[comment]: <> (TODO: Write license)

---
_Source: https://npm.io/package/api-call-simplifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
