# sau-node

> Node.js wrapper for the Sea Around Us API

Latest version **1.1.0** (published 2016-02-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install sau-node
pnpm add sau-node
yarn add sau-node
bun add sau-node
```

## 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.1.0 |
| Published | 2016-02-02 |
| First published | 2015-10-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Robert Scott Reis |
| Maintainers | evilscott |

## Links

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

## Dependencies (2)

- [q](https://npm.io/package/q.md) ^1.4.1
- [request](https://npm.io/package/request.md) ^2.64.0

## Recent versions

- 1.1.0 (latest) — 2016-02-02
- 1.0.2 — 2015-11-02
- 1.0.1 — 2015-11-02
- 1.0.0 — 2015-10-30

## README

## SeaAroundUs API Wrapper
Node.js wrapper for the [Sea Around Us API](https://github.com/SeaAroundUs/sau-web-mt).

The Sea Around Us data are licensed to the public under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License.  
Please read the data use policy described in the DATA_USE file.

This software is free software:  you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    any later version.  See the LICENSE file for a full statement of the License.


### Installation
```bash
$ npm install sau-node
```


### Example usage
```javascript
// include the helper library
var sau = require('sau-node');

// get list of EEZs
var eezs = sau.getRegions('eez')
  .then(function(res) { eezs = res; });

// get details for a single EEZ
var brazil = eezs.getByTitle('Brazil (mainland)');
brazil = brazil.getDetail()
  .then(function(res) { brazil = res; });

// alternative way without getting the region list
brazil = sau.getRegionDetail('eez', 76)
  .then(function(res) { brazil = res; });

// using LMEs for the next example
var lmes = sau.getRegions('lme')
  .then(function(res) { lmes = res; });

// sample set of parameters for catch data
var catchDataParams = {
  measure: 'tonnage',
  dimension: 'taxon',
  sciname: true,
  limit: 10
};

// get catch data for a single LME
var northSea = lmes.getByTitle('North Sea');
northSea = northSea.getData(catchDataParams)
  .then(function(res) { northSea = res; });

// alternative way without getting the region list
northSea = sau.getRegionData('lme', 22, catchDataParams)
  .then(function(res) { northSea = res; });
```


### Available parameters
Regions:
* eez
* lme
* rfmo
* fishing-entity

Measures:
* tonnage
* value

Dimensions:
* taxon
* commercialgroup
* functionalgroup
* country
* sector
* catchtype
* reporting-status

Other catch data parameters:
* limit (integer)
* sciname (boolean)

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