Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trs/github-notification-observer
Observable Github notifications
https://github.com/trs/github-notification-observer
Last synced: 10 days ago
JSON representation
Observable Github notifications
- Host: GitHub
- URL: https://github.com/trs/github-notification-observer
- Owner: trs
- Created: 2020-07-24T22:47:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T14:32:36.000Z (over 2 years ago)
- Last Synced: 2024-08-09T01:07:06.823Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 940 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
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: ''})
.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**.