# kandilli

> Retrieves newly occurred earthquakes

Latest version **1.0.3** (published 2019-05-06) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2019-05-06 |
| First published | 2019-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yavuzkoca |

## Links

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

## Dependencies (7)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [express](https://npm.io/package/express.md) ^4.16.4
- [nodemon](https://npm.io/package/nodemon.md) ^1.18.9
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.4.24
- [body-parser](https://npm.io/package/body-parser.md) ^1.18.3
- [@slack/web-api](https://npm.io/package/@slack/web-api.md) ^5.0.1
- [@slack/events-api](https://npm.io/package/@slack/events-api.md) ^2.2.0

## Recent versions

- 1.0.3 (latest) — 2019-05-06
- 1.0.2 — 2019-05-06
- 1.0.1 — 2019-05-06
- 1.0.0 — 2019-05-06

## README

# AUTO PILOT

Auto Pilot retrieves the earthquakes from Kandilli's official website and sends notifications via Slack application.

### Installing

A step by step series of examples that tell you how to get a development env running

First of all, install the package using:

```
npm install kandilli
```
or
```
yarn add kandilli
```

Before running the application, you need to set the SLACK_TOKEN by creating a file called `nodemon.json`

```
touch nodemon.json
```

Then, copy the content into this file

```
{
    "env": {
        "SLACK_TOKEN": "xoxp-xxxx-xxxx-xxxx"
    }
}
```

## Running the development server

After importing the package with

```
const kandilli = require('kandilli')
```

 you can simply run the function for each X minutes using setInterval function.
 
```
const SECOND = 1000
const MINUTE = SECOND * 60

let earthQuakes = []

earthQuakes = kandilli(earthQuakes)
setInterval(function () {
  earthQuakes = kandilli(earthQuakes)
}, MINUTE * 5)
```

If function detects any newly occurred earthquakes, it will send a slack notification to given SLACK_TOKEN's channel.

## Authors

* **[Yavuz koca](https://github.com/yavuzkoca)** - *Junior Software Developer* - [NOD](https://gitlab.com/nod)

See also the list of [contributors](https://gitlab.com/nod/pickle/autonews-eq/graphs/master) who participated in this project.

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