node-rsr
v1.4.1
Published
The Node HTTP resource
Downloads
1
Readme
💫 RSR
This is simple Node HTTP resource.
Requirements
Installation
You can get it on npm.
npm install node-rsr --save
Or if you`re not into package management, just download a ZIP file.
Usage
static save(data) {
return Rsr.save(Model, {
data: data,
error: 'Custom error message (optional)',
validate: 'Custom validate message (optional)'
});
}
static update(params, data) {
return Rsr.update(Model, {
params: params,
data: data,
error: 'Custom error message (optional)',
validate: 'Custom validate message (optional)'
});
}
static delete(params) {
return Rsr.delete(Model, {
params: params,
error: 'Custom error message (optional)',
validate: 'Custom validate message (optional)'
});
}
static findAll(params) {
return Rsr.findAll(Model, {
params: params,
error: 'Custom error message (optional)'
});
}
static findOne(params) {
return Rsr.findOne(Model, {
params: params,
error: 'Custom error message (optional)'
});
}
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Changelog
This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented on the Github Releases page.
Author
License
MIT License © Helder Burato