# apsmee

> Schema based js api client.

Latest version **0.6.0** (published 2016-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install apsmee
pnpm add apsmee
yarn add apsmee
bun add apsmee
```

## 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.6.0 |
| Published | 2016-10-02 |
| First published | 2016-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+10 in 2 direct dependencies) |
| Install scripts | no |
| Author | refast |
| Maintainers | refast |

## Links

- npm: https://www.npmjs.com/package/apsmee
- Repository: https://github.com/refast/apsmee
- Issues: https://github.com/refast/apsmee/issues
- npm.io page: https://npm.io/package/apsmee

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) 4.16.2
- [superagent](https://npm.io/package/superagent.md) 2.3.0
- [promise-polyfill](https://npm.io/package/promise-polyfill.md) 6.0.2

## Recent versions

- 0.6.0 (latest) — 2016-10-02
- 0.5.5 — 2016-10-01
- 0.5.4 — 2016-09-27
- 0.5.3 — 2016-09-26
- 0.5.2 — 2016-09-03
- 0.5.1 — 2016-07-12
- 0.4.1 — 2016-07-05
- 0.3.1 — 2016-06-27
- 0.1.1 — 2016-06-24

## README

# Apsmee
__Currently in development.__

Apsmee is a simple schema based api client over [Superagent](https://github.com/visionmedia/superagent).
It works with [browserify](https://github.com/substack/node-browserify) and [webpack](https://github.com/visionmedia/superagent/wiki/Superagent-for-Webpack).


## Install

#### NPM

```sh
npm install apsmee
```

#### From source

```sh
git clone git@github.com:refast/apsmee.git apsmee
cd apsmee
npm install
npm run build
```


## Usage example

### Simple github client

```javascript
const ApiClient = require('apsmee');


const githubSchema = {
  user: {
    getByName: { path: '/users/:name' },
  },
};

const githubClient = new ApiClient({
  host: 'https://api.github.com',
  schema: githubSchema,
});

const request = githubClient.user.getByName({ name: 'refast' });
request.then(response => {
  console.log(response.body);
});
request.catch(err => {
  console.log(err.status);
});
```

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