0.6.0 • Published 10 years ago

apsmee v0.6.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 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

10 years ago

0.5.5

10 years ago

0.5.4

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.4.1

10 years ago

0.3.1

10 years ago

0.1.1

10 years ago