0.1.0 • Published 8 years ago

node-strapi-sdk v0.1.0

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

node-strapi-sdk

npm.io

strapi 的 RESTful API 封装,使用 ES6 promise

Usage

npm install node-strapi-sdk --save
export STRAPI_HOST='your strapi host'
export STRAPI_USERNAME='username'
export STRAPI_PASSWORD='password'
var strapi = require('node-strapi-sdk');

strapi.get('/resources').then();
strapi.get('/resources/:id').then();

strapi.post('/resources', {}).then();

strapi.put('/resources/:id', {}).then();

strapi.del('/resources/:id').then();