# @polymorphic/excal

> A js client for our Exchange Calendar service.

Latest version **1.0.0-rc2** (published 2018-04-04) · LicenseRef-LICENSE license · 0 weekly downloads

## Install

```sh
npm install @polymorphic/excal
pnpm add @polymorphic/excal
yarn add @polymorphic/excal
bun add @polymorphic/excal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-rc2 |
| Published | 2018-04-04 |
| First published | 2018-04-04 |
| Weekly downloads | 0 |
| License | LicenseRef-LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jonathan Peel |
| Maintainers | jonathanpeel |

## Links

- npm: https://www.npmjs.com/package/@polymorphic/excal
- Repository: https://polymorphic-group.visualstudio.com/Exchange%20Calendar/_git/ExCal.js
- npm.io page: https://npm.io/package/@polymorphic/excal

## Recent versions

- 1.0.0-rc2 (latest) — 2018-04-04
- 1.0.0-rc — 2018-04-04

## README

# exCal
#### _Exchange Calendar_
A js client for our Exchange Calendar service.

## Install
```bash 
$ npm install --save @polymorphic/excal
```

## Usage (javascript)
```js
const exCal = require('excal').exCal;
exCal.setClientCode('123-456-789');
```

## Usage (typeScript)
```ts
import { exCal } from 'excal';
exCal.setClientCode('123-456-789');
```

## Examples

### Get Availability
```js
const location = 'Boardroom 1';
const date = new Date();
const email = 'user@exchange.co.za';
const password = 'exchange_password';
const uri = 'https://exchange.co.za/EWS/Exchange.asmx';

exCal.getAvailability(location, date, email, password, uri).then(results => {});
```

#### Results
```json
[{
	start: Date,
	end: Date,
	duration: number
}]
```

### Get Bookings
```js
const location = 'Boardroom 1';
const date = new Date();
const email = 'user@exchange.co.za';
const password = 'exchange_password';
const uri = 'https://exchange.co.za/EWS/Exchange.asmx';

exCal.getBookings(location, date, email, password, uri).then(results => {});
```

#### Results
```json
[{
	start: Date,
	end: Date,
	duration: number
}]
```

### Post Booking
```js
const email = 'user@exchange.co.za';
const password = 'exchange_password';
const uri = 'https://exchange.co.za/EWS/Exchange.asmx';
const booking = {
		location: 'Boardroom 1',
		start: new Date(),
		end: new Date(),
		subject: 'The Meeting Name',
		body: 'A description of the meeting'
		};
exCal.postBooking(email, password, uri, booking);
```

#### Results
The result is a `Promise` that returns `void`;

### Post Booking
```js
const email = 'user@exchange.co.za';
const password = 'exchange_password';
const uri = 'https://exchange.co.za/EWS/Exchange.asmx';
const booking = {
		location: 'Boardroom 1',
		start: new Date()
		};
exCal.removeBooking(email, password, uri, booking);
```

#### Results
The result is a `Promise` that returns `void`;

---
_Source: https://npm.io/package/@polymorphic/excal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
