# github-notification-observer

> Observable Github notifications

Latest version **1.1.0** (published 2020-07-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install github-notification-observer
pnpm add github-notification-observer
yarn add github-notification-observer
bun add github-notification-observer
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-07-29 |
| First published | 2020-07-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 23 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tyler Stewart |
| Maintainers | trs |
| Keywords | github, notification, observable |

## Links

- npm: https://www.npmjs.com/package/github-notification-observer
- Repository: https://github.com/trs/github-notification-observer
- Homepage: https://github.com/trs/github-notification-observer#readme
- Issues: https://github.com/trs/github-notification-observer/issues
- npm.io page: https://npm.io/package/github-notification-observer

## Dependencies (3)

- [rxjs](https://npm.io/package/rxjs.md) ^6.6.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [abort-controller](https://npm.io/package/abort-controller.md) ^3.0.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2020-07-29
- 1.0.1 — 2020-07-28
- 1.0.0 — 2020-07-25

## README

# `github-notification-observer`

Continually poll for notifications, emit when changed

# Install

`npm i github-notification-observer`

# Usage

```ts
import {githubNotifications} from 'github-notification-observer';

githubNotifications({token: '<Github personal access token>'})
  .pipe(...)
  .subscribe(
    (notifications) => console.log(notifications)
  );
```

Each item emitted is an array of [Github notifications](https://docs.github.com/en/rest/reference/activity#list-notifications-for-the-authenticated-user).

# API

`githubNotifications(args)` returns an observable of notifications, given a personal access token.

`args.token` Github personal access token.  
`args.all` **If true**, show notifications marked as read.  
`args.participating` **If true**, only shows notifications in which the user is directly participating or mentioned.  
`args.since` Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: **YYYY-MM-DDTHH:MM:SSZ**.  
`args.before` Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: **YYYY-MM-DDTHH:MM:SSZ**.

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