Chicky Save

🐥 window.fetch() api interface

Project README

chicky

🐥 chicky

window.fetch() api interface

  • Minimal basic interface for window.fetch().
  • Easy to use http methods.
  • Supported in old browsers IE8+ (using unfetch polyfill)
  • Written in ES6.

Install

You can install chicky from npm.

npm install chicky --save

or from yarn

yarn add chicky

Usage

import chicky from 'chicky';

chicky.get('http://api.github.com/aganglada')
   .then(data => {
      console.log(data); 
   });

Methods

get

Get data from anywhere at any time.

import chicky from 'chicky';

chicky.get('http://api.github.com/aganglada')
   .then(data => {
      console.log(data); 
   });

post

Create new data for a better future.

import chicky from 'chicky';

chicky.post('http://api.github.com/aganglada', {
    repo: {
        name: 'chicky'
    }
})
   .then(data => {
      console.log(data); 
   });

put

Update data to maintain the world.

import chicky from 'chicky';

chicky.put('http://api.github.com/aganglada', {
    repo: {
        name: 'chicky',
        owner: 'alex'
    }
})
   .then(data => {
      console.log(data); 
   });

patch

Change data of a single person and make it optimal.

import chicky from 'chicky';

chicky.patch('http://api.github.com/aganglada', {
    repo: {
        name: 'chicky',
        owner: 'alex'
    }
})
   .then(data => {
      console.log(data); 
   });

delete

Get rid of things you don't need.

import chicky from 'chicky';

chicky.delete('http://api.github.com/aganglada', {
    repo: {
        name: 'chicky'
    }
})
   .then(data => {
      console.log(data); 
   });

Contribute

If you like to contribute to this project be sure all the changes you made, make sense for everyone and they can continue using chicky as their general api service.

License

MIT © aganglada

Open Source Agenda is not affiliated with "Chicky" Project. README Source: aganglada/chicky
Stars
27
Open Issues
0
Last Commit
6 years ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating