Skip to content

Commit d815352

Browse files
authored
Merge pull request #3 from Exelord/wojtek-feedback
Apply Wojtek feedback
2 parents adad187 + fb052a5 commit d815352

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

README.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<a href='https://travis-ci.org/Exelord/ember-custom-actions'><img src="https://travis-ci.org/Exelord/ember-custom-actions.svg?branch=master" alt="Dependency Status" /></a> <a href='https://gemnasium.com/github.com/Exelord/ember-custom-actions'><img src="https://gemnasium.com/badges/github.com/Exelord/ember-custom-actions.svg" alt="Dependency Status" /></a>
55
</p>
66

7-
The Ember add-on lets you call custom actions to your JSON API server.
8-
Ember Custom Actions is compatible with Ember 2.8 (and higher) applications..
7+
Ember Custom Actions is a package for defining custom API actions, dedicated for Ember 2.8 (and higher) applications.
98

109
# Getting started
1110

@@ -17,7 +16,7 @@ Ember Custom Actions is compatible with Ember 2.8 (and higher) applications..
1716

1817
### Configuration
1918

20-
You can define your custom default options in your `config/environment.js` file.
19+
You can define your custom options in your `config/environment.js` file
2120

2221
``` js
2322
module.exports = function(environment) {
@@ -34,41 +33,41 @@ module.exports = function(environment) {
3433
}
3534
```
3635
#### `type`
37-
default type of the request (GET, PUT, POST, DELETE, etc..)
36+
Default type of the request (GET, PUT, POST, DELETE, etc..)
3837

3938
#### `urlType`
40-
Base of the URL that's generated for the action. If not defined `urlType` is equal `type`;
39+
Base of the URL which is generated for the action. If not defined, `urlType` is equal to the `type` option
4140

4241
#### `ajaxOptions`
43-
you can define your own ajax options for example headers.
42+
Your own ajax options (e.g. headers)
4443

4544
#### `pushToStore`
46-
if you want to push the recived data to the store mark this option to `true` and change your application `JSONAPISerializer` to:
45+
If you want to push the received data to the store, set this option to `true` and change your application `JSONAPISerializer` to:
4746
``` js
4847
// app/serializers/application.js
4948

5049
import { JSONAPISerializer } from 'ember-custom-actions';
5150
export default JSONAPISerializer.extend();
5251
```
5352
#### `normalizeOperation`
54-
You can define how your outgoing data should be serialized.
53+
You can define how your outgoing data should be serialized
5554

56-
Example of data:
55+
Exemplary data:
5756
```js
5857
{
5958
firstParam: 'My Name',
6059
colors: { rubyRed: 1, blueFish: 3 }
6160
}
6261
```
63-
using a `dasherize` transformer our request data will be look like:
62+
After using a `dasherize` transformer our request data will turn into:
6463

6564
```js
6665
{
6766
first-param: 'My Name',
6867
colors: { ruby-red: 1, blue-fish: 3 }
6968
}
7069
```
71-
It's great for API with request data format restrictions.
70+
It's great for API with request data format restrictions
7271

7372
**Available transformers:**
7473
- camelize
@@ -82,9 +81,8 @@ It's great for API with request data format restrictions.
8281
### Model actions
8382
To define custom action like: `posts/1/publish` you can use
8483
`modelAction(path, options)` method with arguments:
85-
86-
`path` - the url of the action in our case `publish`
87-
`options` - optional parameter which will overwrite the configuration options
84+
- `path` - the url of the action (in our case it's `publish`)
85+
- `options` - optional parameter which will overwrite the configuration options
8886

8987
```js
9088
import Model from 'ember-data/model';
@@ -108,11 +106,10 @@ postToPublish.publish(payload).then((status) => {
108106
```
109107

110108
### Resource actions
111-
To define custom action like: `posts/favorites` you can use
109+
To a define custom action like: `posts/favorites` you can use
112110
`resourceAction(path, options)` method with arguments:
113-
114-
`path` - the url of the action in our case `favorites`
115-
`options` - optional parameter which will overwrite the configuration options
111+
- `path` - the url of the action (in our case it's `favorites`)
112+
- `options` - optional parameter which will overwrite the configuration options
116113

117114
```js
118115
import Model from 'ember-data/model';
@@ -141,7 +138,7 @@ emptyPost.favorites(payload).then((favoritesPosts) => {
141138

142139
## Installation
143140

144-
* `git clone <repository-url>` this repository
141+
* `git clone https://github.com/Exelord/ember-custom-actions.git`
145142
* `cd ember-custom-actions`
146143
* `npm install`
147144
* `bower install`
@@ -168,7 +165,7 @@ Big thanks to Mike North and his [Project](https://github.com/mike-north/ember-a
168165

169166
## Contributing
170167

171-
Bug reports and pull requests are welcome on GitHub at https://github.com/exelord/Monarchy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
168+
Bug reports and pull requests are welcome on GitHub at https://github.com/exelord/ember-custom-actions. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
172169

173170
## License
174171

0 commit comments

Comments
 (0)