Skip to content

Commit

Permalink
Documents exclusion ability when generating availability
Browse files Browse the repository at this point in the history
  • Loading branch information
craigpaul committed Jan 23, 2020
1 parent 12c0735 commit 2a55872
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ Set a filter which will tell the API to return time slots between a given start

Set a filter which will tell the API to return time slots that are specifically for the user matching the provided identifier.

- `excluding(exclusion: number)`

Set a filter which will tell the API to exclude a particular appointment identifier when generating availability. _(not publicly available yet)_

- `for(services: number | number[])`

Set a filter which will tell the API to return time slots that are specifically for the service(s) matching the provided identifier(s).
Expand Down Expand Up @@ -691,13 +695,14 @@ class TimeSlots {
this.api = new OpenApi();
}

async get({ end, location, service, start, user }) {
async get({ appointment, end, location, service, start, user }) {
return await this.api
.slots()
.at(location)
.by(user)
.for(service)
.between(start, end)
.excluding(appointment)
.in('America/Chicago')
.supporting(['en', 'fr', 'es'])
.visibility(Visibilities.ALL)
Expand Down

0 comments on commit 2a55872

Please sign in to comment.