# ythnotify

> Library for YouTube video upload and Twitch live detection

Latest version **1.0.1** (published 2021-06-05) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2021-06-05 |
| First published | 2021-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 34.1 KB |
| Known vulnerabilities | 0 (+25 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | WhiteKJ hands8142 |
| Maintainers | whitekj |
| Keywords | Youtube, Twitch, Notify |

## Links

- npm: https://www.npmjs.com/package/ythnotify
- Repository: https://github.com/CwhiteKJ/ythNotify
- Homepage: https://github.com/CwhiteKJ/ythNotifyy#readme
- Issues: https://github.com/CwhiteKJ/ythNotify/issues
- npm.io page: https://npm.io/package/ythnotify

## Dependencies (8)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [knex](https://npm.io/package/knex.md) ^0.95.6
- [path](https://npm.io/package/path.md) ^0.12.7
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [events](https://npm.io/package/events.md) ^3.3.0
- [sqlite3](https://npm.io/package/sqlite3.md) ^5.0.2
- [rss-parser](https://npm.io/package/rss-parser.md) ^3.12.0
- [simple-youtube-api](https://npm.io/package/simple-youtube-api.md) ^5.2.1

## Recent versions

- 1.0.1 (latest) — 2021-06-05
- 1.0.0 — 2021-06-05
- 0.0.1 — 2021-06-05

## README

# Youtube Twitch Notify

❯ Library for YouTube video upload and Twitch live detection

---

### Install

```
# NPM
$ npm install ythnotify
# yarn
$ yarn add ythnotify
```

### How to use?

❯ To use this module, you need a Youtube Data v3 API Key, Twitch API Secreat, and a Client ID.

Youtube API: [Click here](https://console.cloud.google.com/apis/library/youtube.googleapis.com?q=Youtube&id=125bab65-cfb6-4f25-9826-4dcc309bc508&project=brilliant-rhino-281406)  
Twitch API: [Click here](https://dev.twitch.tv/console/apps)

### Examples

```js
const Yth = require("ythnotify")
const yth = new Yth.Client({
  youtube: {
    token: "API Key (Youtube Data V3 API) ",
    youtubers: ["https://www.youtube.com/channel/UCzRDCwJdqSSRwI4BgojVkIw"],
  },
  twitch: {
    secreat: "Secreat (Twitch API)",
    clientid: "Client ID (Twitch API)",
    streamers: ["https://www.twitch.tv/whitekj"],
  },
  interval: 60,
})

yth.on("YoutubeUpload", (data) => {
  console.log("New video detected! \n" + data)
})

yth.on("TwitchStreaming", (data) => {
  console.log("Start streaming! \n" + data)
})
```

### Options

❯ General

| Name     | Type   | Need | Default | Description    |
| -------- | ------ | ---- | ------- | -------------- |
| interval | Number | X    | 60      | time to repeat |

❯ Youtube

| Name      | Type            | Need | Default | Description                         |
| --------- | --------------- | ---- | ------- | ----------------------------------- |
| token     | String          | O    | -       | Youtube Data v3 API's api key       |
| youtubers | String or Array | O    | -       | List of YouTubers to detect uploads |

❯ Twitch

| Name      | Type            | Need | Default | Description                      |
| --------- | --------------- | ---- | ------- | -------------------------------- |
| secreat   | String          | O    | -       | Twitch API secreat key           |
| clientid  | String          | O    | -       | Twitch API Client ID             |
| streamers | String or Array | O    | -       | List of Streamers to detect live |

### Used Code

Youtube Notify: [Androz2091's DiscordYoutubeNotifier](https://github.com/Androz2091/DiscordYoutubeNotifier/blob/master/index.js) **[ License: None ]**

### Authors

**[WhiteKJ](https://github.com/CwhiteKJ), [hands8142](https://github.com/hands8142)**

### License

This repository is [MIT](https://github.com/CwhiteKJ/ythNotify/blob/main/LICENSE) licensed.

---

If you have a problem or want to improve or add features, please make an [issue](https://github.com/CwhiteKJ/ythNotify/issues) or [pull request](https://github.com/CwhiteKJ/ythNotify/pulls). Thank you!

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