# sassi-api

> Secret API for Service Server and Build Info (Client API)

Latest version **3.2.0** (published 2018-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install sassi-api
pnpm add sassi-api
yarn add sassi-api
bun add sassi-api
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2018-01-29 |
| First published | 2018-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | highseas |

## Links

- npm: https://www.npmjs.com/package/sassi-api
- Repository: https://github.com/highseas/sassi
- npm.io page: https://npm.io/package/sassi-api

## Dependencies (1)

- [sassi-core](https://npm.io/package/sassi-core.md) ^3.2.0

## Recent versions

- 3.2.0 (latest) — 2018-01-29
- 3.1.1 — 2018-01-26
- 3.1.0 — 2018-01-26
- 3.0.0 — 2018-01-25
- 2.4.3 — 2018-01-24
- 2.4.2 — 2018-01-24
- 2.3.0 — 2018-01-19
- 2.2.1 — 2018-01-08
- 2.2.0 — 2018-01-08
- 2.1.0 — 2018-01-08

## README

# sassi-api

The `sassi-api` package is client side library for calling the sassi api hosted on the server.
Assuming your service/slot is hosting the `sassi-api`, you can use this library to fetch the data:

    const apiConfigParams: SassiApiConfig = {
        baseUrlPath: '/api/_sassi_',
        sbdJsonPath: 'sbd.json',
        sbdHtmlPath: 'sbd.html',
        creds: {
            id: 'SOME_ID',
            secret: 'SOME_SECRET_FROM_ENV'
        }
    };

    const sassiApiConfig = new SassiApiConfig(apiConfigParams);

    const sassiApi = new SassiApi(sassiApiConfig);

    const server = 'https://some-azure-service-slot.azurewebsites.com';

    sassiApi
        .fetchServerBuildData(server)
        .then(sbd => {
            console.log('sbd: \n', JSON.stringify(sbd, undefined, 4));
        })
        .catch(error => {
            console.log('error:', error);
        });


The data returned `sbd` is the `IServerBuildData` defined in `sassi-core`.

Note, the `sassi-server-api` extends the `sassi-api` with server specific configuration, so it can be shared.

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