# streakapi

> wrapper for the Streak API

Latest version **1.3.0** (published 2022-10-31) · MIT license · 0 weekly downloads

## Install

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

## 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.3.0 |
| Published | 2022-10-31 |
| First published | 2012-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 67.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | Omar Ismail |
| Maintainers | borysk, timothy-rhodes, ruthhalteman, wegry, jfmaggie, macil, omarstreak |
| Keywords | streak, api, wrapper, client |

## Links

- npm: https://www.npmjs.com/package/streakapi
- Repository: https://github.com/StreakYC/node-api-wrapper
- Homepage: https://github.com/StreakYC/node-api-wrapper#readme
- Issues: https://github.com/StreakYC/node-api-wrapper/issues
- npm.io page: https://npm.io/package/streakapi

## Dependencies (1)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.6.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2022-10-31
- 1.2.0 — 2016-11-30
- 1.1.0 — 2016-04-14
- 1.0.2 — 2015-08-06
- 1.0.1 — 2015-08-05
- 1.0.0 — 2015-08-05
- 0.1.0 — 2012-10-02

## README

# NodeJS Wrapper for Streak API

[![Circle CI](https://circleci.com/gh/StreakYC/node-api-wrapper.svg?style=shield)](https://circleci.com/gh/StreakYC/node-api-wrapper)
[![npm version](https://badge.fury.io/js/streakapi.svg)](https://badge.fury.io/js/streakapi)

NodeJS package that acts as a thin wrapper over the Streak API (https://www.streak.com/api).

To use the API, just do the standard

    $ npm install --save streakapi

and then

    var streakapi = require('streakapi');
    var streak = new streakapi.Streak("api key here");
    streak.Me.get().then(function(me) {
      console.log('email', me.email);
    });

## API

All methods return promises.

    streak.Me.get();

    //pipeline functions
    streak.Pipelines.getAll();
    streak.Pipelines.getOne(pipelineKey);
    streak.Pipelines.getBoxes(pipelineKey);
    streak.Pipelines.create(data);
    streak.Pipelines.delete(pipelineKey);
    streak.Pipelines.update(data); // data must have "key" property containing pipeline key
    streak.Pipelines.getFeed(pipelineKey, detailLevel);

    //pipeline stages
    streak.Pipelines.Stages.getAll(pipelineKey);
    streak.Pipelines.Stages.getOne(pipelineKey, key);
    streak.Pipelines.Stages.create(pipelineKey, data);
    streak.Pipelines.Stages.delete(pipelineKey, key);
    streak.Pipelines.Stages.update(pipelineKey, data);

    //pipeline fields
    streak.Pipelines.Fields.getAll(pipelineKey);
    streak.Pipelines.Fields.getOne(pipelineKey, key);
    streak.Pipelines.Fields.create(pipelineKey, data);
    streak.Pipelines.Fields.delete(pipelineKey, key);
    streak.Pipelines.Fields.update(pipelineKey, data);

    //boxes
    streak.Boxes.getAll();
    streak.Boxes.getForPipeline(pipelineKey);
    streak.Boxes.getOne(boxKey);
    streak.Boxes.create(pipelineKey, data);
    streak.Boxes.delete(key);
    streak.Boxes.update(data); // data must have "key" property containing box key
    streak.Boxes.getFields(boxKey);
    streak.Boxes.getReminders(boxKey);
    streak.Boxes.getComments(boxKey);
    streak.Boxes.postComment(boxKey, message);
    streak.Boxes.getFiles(boxKey);
    streak.Boxes.getThreads(boxKey);
    streak.Boxes.getFeed(boxKey, detailLevel);

    //box fields
    streak.Boxes.Fields.getForBox(boxKey);
    streak.Boxes.Fields.getOne(boxKey, key);
    streak.Boxes.Fields.update(boxKey, data);  // data must have "key" property containing the field key and "value" to update to, i.e.: {"key":"1002", "value":"This is my new value for this field!"} 

    //files
    streak.Files.getForBox(boxKey);
    streak.Files.getOne(fileKey);
    streak.Files.getContents(fileKey);

    //threads
    streak.Threads.getForBox(boxKey);
    streak.Threads.getOne(threadKey);

    //tasks
    streak.Tasks.getForBox(boxKey);
    streak.Tasks.getOne(taskKey);
    streak.Tasks.create(boxKey, data);
    streak.Tasks.delete(taskKey);
    streak.Tasks.update(taskKey, data);

    //search
    streak.search(query);

## Types

Basic [Flow Type](http://flowtype.org/) declarations for this module are
included! If you're using Flow, then no extra setup is necessary to take
advantage of them.

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