Skip to content

Commit

Permalink
Adds basic documentation for new forms resource
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed Jul 15, 2019
1 parent 94eaf72 commit fc4d2a4
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,52 @@ class Attendees {
}
```

### Forms

##### Methods

- `cancellations()`

Set a filter which will tell the API to return only cancellation forms.

- `get()`

Send the API request using the pre-set filters.

- `on(page: number)`

Set the page offset which you want to view.

- `sortBy(sortable: string)`

Set a sorting string to determine how the returned results are sorted.

- `take(limit: number)`

Set the limit which you want returned.

##### Example

```javascript
import { OpenApi } from 'coconut-open-api-js';

class Forms {
constructor() {
this.api = new OpenApi();
}

async get({ limit, page, sortable }) {
return await this.api
.forms()
.cancellations()
.on(page)
.sortBy(sortable)
.take(limit)
.get()
}
}
```

### Locations

##### Methods
Expand Down

0 comments on commit fc4d2a4

Please sign in to comment.