1.0.0-alpha.3 • Published 7 months ago

starrez-js v1.0.0-alpha.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

StarRez-Js

A wrapper for the StarRez REST API.

Initialization

We initialize the api using a factory class. Here we can define our authentication method and specify the domain we are connecting to.

Basic Authentication

const starRezClient = new starRezClientFactory('miamioh.starrezhousing.com')
.addBasicAuthentication('jappleseed', 'Password123')
.build();

Web/Application Token

const starRezClient = new starRezClientFactory('miamioh.starrezhousing.com')
.addBearerToken('efa9459e-56dc-11ee-8c99-0242ac120002')
.build();

Querying Data

Select

We can select an entire single record from a table using the at method.

const entry = await starRezClient.from('Entry').at(1222);
console.log(`${entry.NameTitle} ${entry.LastName}, ${entry.FirstName} (${entry.NamePreferred})`);

Query Builder

We can build SQL queries in an expressive way using the select method.

const result = await starRezClient.from('Entry')
.select('EntryID', 'NameFirst', 'NameLast', 'NameTitle', 'NamePreferred')
.innerJoin('Booking', 'Booking.EntryID', 'Entry.EntryID')
.eq('Booking.RoomSpaceID', 88)
.orderBy('Booking.ContractStartDate', 'DESC')
.get();
1.0.0-alpha.3

7 months ago

5.1.0-alpha.2

7 months ago

3.0.0-alpha.2

8 months ago

3.0.1-alpha.2

8 months ago

4.0.0-alpha.2

7 months ago

4.0.1-alpha.2

7 months ago

5.0.0-alpha.2

7 months ago

2.1.2-alpha.2

8 months ago

2.1.1-alpha.2

8 months ago

2.1.0-alpha.2

8 months ago

2.0.0-alpha.2

8 months ago

1.0.2-alpha.2

8 months ago

1.0.1-alpha.2

8 months ago

1.0.0-alpha.2

8 months ago

1.0.5-alpha.1

8 months ago

1.0.4-alpha.1

8 months ago

1.0.1-alpha.1

8 months ago

1.0.0-alpha.1

8 months ago

1.0.0-alpha.0

8 months ago