0.6.0 • Published 8 years ago

apsmee v0.6.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Apsmee

Currently in development.

Apsmee is a simple schema based api client over Superagent. It works with browserify and webpack.

Install

NPM

npm install apsmee

From source

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

Usage example

Simple github client

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);
});
0.6.0

8 years ago

0.5.5

8 years ago

0.5.4

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.4.1

8 years ago

0.3.1

8 years ago

0.1.1

8 years ago