# basis-fetch

> Quick module to get one days metrics from the Basis Peak private API. Using the Basis private API so it could break at any time. Tests and support for other data types coming soon.

Latest version **0.0.4** (published 2016-03-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install basis-fetch
pnpm add basis-fetch
yarn add basis-fetch
bun add basis-fetch
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2016-03-20 |
| First published | 2015-05-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Adrian Lansdown |
| Maintainers | yayadrian |

## Links

- npm: https://www.npmjs.com/package/basis-fetch
- Repository: https://github.com/yayadrian/basis-fetch
- Homepage: https://github.com/yayadrian/basis-fetch#readme
- Issues: https://github.com/yayadrian/basis-fetch/issues
- npm.io page: https://npm.io/package/basis-fetch

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) ^2.10.2
- [request](https://npm.io/package/request.md) ^2.55.0
- [dateformat](https://npm.io/package/dateformat.md) ^1.0.11

## Recent versions

- 0.0.4 (latest) — 2016-03-20
- 0.0.3 — 2015-05-10
- 0.0.2 — 2015-05-10
- 0.0.1 — 2015-05-04
- 0.0.0 — 2015-05-03

## README

#Basis-fetch

Quick module to get one days metrics from the Basis Peak private API.
Using the Basis private API so it could break at any time.
Tests and support for other data types coming soon.

## Install
```sh
$ npm install basis-fetch
```
## Access Token
Username and Password thay ou use on https://app.mybasis.com/
```javascript
  basis.requestUser(username, password, "2015-05-04");
  // returns error, access token
 ``` 
 
 ## Get Metrics for a day
 Date Format: YYYY-MM-DD
 ```javascript
	basis.getMetrics(accessToken, "2015-05-03", "details", callback)
	// returns error, array of data
```

## Get Latest Data
Finds the most recent complete data.
```javascript
	basis.getLatest(data, function(metric) {
		console.log("time: ", moment.unix(metric.date).format("dddd, MMMM Do YYYY, h:mm:ss a"));
		console.log("temp (c): ", convertTemp(metric.skinTemp));
		console.log("latest metric:", metric);
	}

 ```

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