# ionic-package-polling

> Polls Ionic.io native builds to trigger success or failed events

Latest version **1.0.2** (published 2016-05-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install ionic-package-polling
pnpm add ionic-package-polling
yarn add ionic-package-polling
bun add ionic-package-polling
```

## 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.0.2 |
| Published | 2016-05-18 |
| First published | 2016-05-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mathieumaes |

## Links

- npm: https://www.npmjs.com/package/ionic-package-polling
- npm.io page: https://npm.io/package/ionic-package-polling

## Dependencies (3)

- [backbone](https://npm.io/package/backbone.md) ^1.3.3
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [ionic-app-lib](https://npm.io/package/ionic-app-lib.md) ^2.0.0-beta.8

## Recent versions

- 1.0.2 (latest) — 2016-05-18
- 1.0.1 — 2016-05-18
- 1.0.0 — 2016-05-18

## README

# Ionic.io package polling

Ionic.io package is still in beta, and it currently does not support callbacks or hooks about status changes of your builds. 
This module will poll the build list and trigger events when a build is successful or fails.

## Installation

```
$ npm install ionic-package-polling
```

## Usage

Here is a basic example:
```
var Poll = require("ionic-package-polling");

var poll = new Poll({
    username: "email@domain.com",
    password: "yourpassword",
    appId: "yourAppId",
    interval: 10 // Optional: poll every x minutes, default is 3
});

poll.onSuccess(function(model) {
    console.log("build successful: " + model.id);
});

poll.onFail(function(model) {
    console.log("build failed: " + model.id);
});

poll.run(); // start polling
```

## License

ISC License

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