# uwgaws

> Client Library for University of Washington's Person Web Service

Latest version **5.1.0** (published 2021-04-26) · 4 weekly downloads

## Install

```sh
npm install uwgaws
pnpm add uwgaws
yarn add uwgaws
bun add uwgaws
```

## 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 | 5.1.0 |
| Published | 2021-04-26 |
| First published | 2021-02-03 |
| Weekly downloads | 4 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.10.0 |
| Dependencies | 6 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Douglas Gale |
| Maintainers | kevintechie |
| Keywords | uw, graduate, applicant, web, service, gaws |

## Links

- npm: https://www.npmjs.com/package/uwgaws
- Repository: https://github.com/UWFosterIT/node-gaws
- Homepage: https://github.com/UWFosterIT/node-gaws#readme
- Issues: https://github.com/UWFosterIT/node-gaws/issues
- npm.io page: https://npm.io/package/uwgaws

## Dependencies (6)

- [got](https://npm.io/package/got.md) ^11.8.2
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.892.0
- [@types/got](https://npm.io/package/@types/got.md) ^9.6.11
- [micro-cache](https://npm.io/package/micro-cache.md) ^3.0.3
- [query-string](https://npm.io/package/query-string.md) ^7.0.0
- [@log4js-node/log4js-api](https://npm.io/package/@log4js-node/log4js-api.md) ^1.0.2

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 5.1.0 (latest) — 2021-04-26
- 5.0.1 — 2021-03-09
- 5.0.0 — 2021-02-17
- 4.3.0 — 2021-02-03

## README

# UW Graduate Applicant Webervice

This implements the [v3 Graduate Applicant Webservice](https://devweb.grad.uw.edu/services/documentation/version3api.html).

Note: Version 4.0.0 and later require Node 8.10 or later.

## USE

### Installation

Add the following to your `package.json` and then do a `npm install`. Update the version number as needed.

    "uwgaws": "git+ssh://git@github.com/UWFosterIT/node-gaws.git#4.0.0",

### Set up

Import the module and initialize it

```JavaScript
const uwgaws = import('uwgaws');

// With x509 cert
let config = {
  baseUrl:   'https://apps.grad.uw.edu/services/applicants/v3/api/',
  cert:      '/path/to/your/x509.pem',
  key:       '/path/to/your/x509.key',
  cacheMode: 'record',
  cachePath: '/path/to/a/cache/directory/',
  cacheExt:  '.json',
  logLevel:  'info'
};

uwgaws.initialize(config);
```

### Config options

#### Base Url

At the moment, this module only supports the v3 api. The url in the example config above is what your config should use. There is no test url.

#### UW x509 Client Cert

The Graduate Applicant Web Service requires that you have a valid UW x509 Client Cert. The data returned is restricted to what is authorized for your cert.

When specifying the store for the certificates, only choose one of the valid types and edit the certInfo section of the config file accordingly. Currently only local file and s3 certificate storage locations are supported.

#### Caching

The ``cacheMode`` can be set to any one of the following modes.  This uses the ``micro-cache`` node module as a local file system cache.

- wild: all requests go out to the internet, don't load anything from cache, doesn't save anything.
- dryrun: Loads files from cache if exists, does http calls when cache doesn't exist, doesn't save to the cache.
- record: Loads files from the cache and saves new ones to the cache.

It's recommended to use `record` during development and `wild` in producation.

#### Logging

This module uses ``winston`` for all logging.

### Endpoints Implemented

All the v3 endpoints except for `documents` have been implemented. By default, all requests are made to the JSON endpoints, if you want XML as the response set `options.format` to `xml`.

Endpoint|Implementation
-|-
gradprograms|uwgaws.programs.getAuthorized()
applicants|uwgaws.applicants.getByProgram(options)
applications (single)|uwgaws.applications.getById(options)
applications (for program)|uwgaws.applications.getByProgram(options)

#### Options example and return values

```Javascript
  let options = {
    gradProgId: 999,
    year:       2037,
    quarter:    1
  };
```

Got to  [v3 Graduate Applicant Web Service](https://devweb.grad.uw.edu/services/documentation/version3api.html) page for complete details.

## DEVELOPMENT

Copy ``test/setup/config-sample.js`` to ``test/setup/config.js`` and edit values as needed. Use the ``npm`` commands indicated in ``package.json``.

    npm run test
    npm run lint

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