Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mainmatter/ember-api-actions
Ember.js addon allowing you to easily implement non-CRUD actions for your Ember Data models
https://github.com/mainmatter/ember-api-actions
crud ember-data emberjs
Last synced: 8 days ago
JSON representation
Ember.js addon allowing you to easily implement non-CRUD actions for your Ember Data models
- Host: GitHub
- URL: https://github.com/mainmatter/ember-api-actions
- Owner: mainmatter
- License: mit
- Created: 2022-10-28T07:38:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T07:18:41.000Z (7 months ago)
- Last Synced: 2024-05-01T11:49:42.686Z (7 months ago)
- Topics: crud, ember-data, emberjs
- Language: JavaScript
- Homepage:
- Size: 2.17 MB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @mainmatter/ember-api-actions
This is an [Ember.js] addon allowing you to easily implement non-[CRUD] actions
for your [Ember Data] models.## Compatibility
* Ember.js v3.28 or above
* Ember CLI v3.28 or above
* Node.js v14 or above## Installation
```
ember install @mainmatter/ember-api-actions
```## Usage
```js
import Model from '@ember-data/model';
import { apiAction } from '@mainmatter/ember-api-actions';class User extends Model {
async follow() {
return await apiAction(this, { method: 'PUT', path: 'follow' });
}
}
```## Contributing
See the [Contributing](CONTRIBUTING.md) guide for details.
## License
This project is licensed under the [MIT License](LICENSE.md).
[Ember.js]: https://emberjs.com
[CRUD]: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
[Ember Data]: https://github.com/emberjs/data