@@ -112,7 +112,7 @@ To Log in and try it out hit the "Try out" button.
112112
113113## Return Data
114114
115- > For Success Responses
115+ > For success responses
116116
117117``` json
118118{
@@ -123,7 +123,7 @@ To Log in and try it out hit the "Try out" button.
123123}
124124```
125125
126- > For Error Responses
126+ > For error responses
127127
128128``` json
129129{
@@ -135,7 +135,7 @@ To Log in and try it out hit the "Try out" button.
135135}
136136```
137137
138- > For Error Responses With Validation Errors
138+ > For error responses with validation errors
139139
140140``` json
141141{
@@ -152,7 +152,7 @@ To Log in and try it out hit the "Try out" button.
152152}
153153```
154154
155- > For Error Responses With JSON Schema Errors (Current only used when creating a Job Revision)
155+ > For error responses with JSON schema errors (Current only used when creating a Job Revision)
156156
157157``` json
158158{
@@ -285,7 +285,7 @@ So, for example: if the list has 600 items and the `offset` is set to 100, the `
285285
286286### Sorting
287287
288- > Sort ID Descending and Name Ascending
288+ > Sort ID descending and name ascending
289289
290290```
291291?sort=-id,name
@@ -297,7 +297,7 @@ The API supports sorting ascending or descending sorting on multiple columns (se
297297
298298### Searching
299299
300- > Search for name LIKE "Kevin" and company That Ends With "4News"
300+ > Search for name LIKE "Kevin" and company that ends with "4News"
301301
302302```
303303?search[name]=Kevin&search[company]=$:4News
@@ -546,11 +546,13 @@ const colors = await api.users.select('me').colors.list();
546546
547547The wrapper exposes relations which return proxies.
548548These proxies can be used to either build a route to a resource or to fetch resources.
549+
549550This means that ` api.users.get('me') ` is the same as calling the route ` /v1/users/me ` .
551+
550552All proxies expose the methods ` new ` , ` list ` and ` lister ` .
551553Most proxies expose the methods ` select ` and ` get ` .
552554
553- < br />< br />
555+ Async methods return a ` Promise ` this means that both ` then/catch ` and ` await/async ` syntax are supported.
554556
555557``` js
556558// Case translation
@@ -566,8 +568,6 @@ test.fooBarBaz === 123; // true
566568The wrapper will transform snake_case named variables returned from the api into camelCase named variables.
567569This means that for example ` place_name ` will be transformed into ` placeName ` .
568570
569- Async methods return a ` Promise ` this means that both ` then/catch ` and ` await/async ` syntax are supported.
570-
571571## Getting a resource
572572
573573> Fetch resource and all its properties
@@ -589,8 +589,9 @@ api.users.select('me').mapstyleSets.list().then(function(sets) {
589589```
590590
591591Resources are bound to the base api class by default. Resources can be fetched in two ways;
592- by selecting them (` .select ` ) or by fetching them (` .get ` ). Selecting them will only set the
593- object's id to its properties. Fetching a resource returns a ` Promise ` that will resolve with the requested resource.
592+ by selecting them (` .select ` ) or by fetching them (` .get ` ).
593+
594+ Selecting them will only set the object's id to its properties. Fetching a resource returns a ` Promise ` that will resolve with the requested resource.
594595
595596Selection is only useful as a stepping stone to related resources that can be easily obtained using the id of the parent.
596597
@@ -652,7 +653,7 @@ function parsePages(page) {
652653
653654 if (page .hasNext ) {
654655 console .log (' Grabbing page ' + (page .page + 1 ));
655- page .next ().then (parsePage );
656+ page .next ().then (parsePages );
656657 }
657658}
658659
0 commit comments