deskbookers
Advanced tools
Comparing version 5.2.4 to 5.3.0
@@ -162,2 +162,42 @@ (function (global, factory) { | ||
}() | ||
}, { | ||
key: 'retrieveForFullCalendar', | ||
value: function () { | ||
var _ref4 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(_ref5) { | ||
var start = _ref5.start, | ||
end = _ref5.end, | ||
spaceId = _ref5.spaceId, | ||
_ref5$noCache = _ref5.noCache, | ||
noCache = _ref5$noCache === undefined ? false : _ref5$noCache; | ||
return regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return this.request({ | ||
path: 'spaces/' + spaceId + '/fullCalendar', | ||
params: { | ||
noCache: noCache, | ||
start: start, | ||
end: end | ||
} | ||
}); | ||
case 2: | ||
return _context2.abrupt('return', _context2.sent); | ||
case 3: | ||
case 'end': | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee2, this); | ||
})); | ||
function retrieveForFullCalendar(_x2) { | ||
return _ref4.apply(this, arguments); | ||
} | ||
return retrieveForFullCalendar; | ||
}() | ||
}]); | ||
@@ -164,0 +204,0 @@ |
@@ -14,3 +14,3 @@ # Availability | ||
#### Arguments | ||
### Arguments | ||
Name | Type | Description | Required | ||
@@ -23,3 +23,3 @@ --- | --- | --- | --- | ||
#### Example response | ||
### Example response | ||
@@ -58,1 +58,42 @@ ```json | ||
``` | ||
## `retrieveForFullCalendar(params)` | ||
Retrieve fullcalendar availability for a given space and date range. | ||
```js | ||
await deskbookers.availability.retrieveForFullCalendar({ | ||
spaceId: 12345, | ||
start: '2017-05-01', | ||
end: '2017-05-08' | ||
}) | ||
``` | ||
### Arguments | ||
Name | Type | Description | Required | ||
--- | --- | --- | --- | ||
spaceId | Number | Space ID | Yes | ||
start | String | Start date (YYYY-MM-DD) | Yes | ||
end | String | End date (YYYY-MM-DD), exclusive | Yes | ||
noCache | Bool | Ignore cache | No | ||
### Example response | ||
```json | ||
[ | ||
{ | ||
"type": "closed", | ||
"start": 1508709600, | ||
"end": 1508742000 | ||
}, | ||
{ | ||
"type": "onRequest", | ||
"start": 1508824800, | ||
"end": 1508828400 | ||
}, | ||
{ | ||
"type": "occupied", | ||
"start": 1508868000, | ||
"end": 1508882400 | ||
} | ||
] | ||
``` |
{ | ||
"name": "deskbookers", | ||
"version": "5.2.4", | ||
"version": "5.3.0", | ||
"description": "Deskbookers API JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -56,2 +56,3 @@ # Deskbookers JavaScript SDK | ||
* [`retrieve(params)`](docs/availability.md#retrieveparams) | ||
* [`retrieveForFullCalendar(params)`](docs/availability.md#retrieveforfullcalendarparams) | ||
* spaces | ||
@@ -58,0 +59,0 @@ * [`retrieve(id)`](docs/spaces.md#retrieveid) |
346034
5313
96