Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextcloud-libraries/notify_push-client
A javascript client for notify_push events
https://github.com/nextcloud-libraries/notify_push-client
Last synced: about 18 hours ago
JSON representation
A javascript client for notify_push events
- Host: GitHub
- URL: https://github.com/nextcloud-libraries/notify_push-client
- Owner: nextcloud-libraries
- Created: 2021-01-15T17:08:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-21T01:31:34.000Z (7 days ago)
- Last Synced: 2024-09-26T10:19:07.267Z (1 day ago)
- Language: TypeScript
- Size: 441 KB
- Stars: 2
- Watchers: 8
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSES/AGPL-3.0-or-later.txt
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# @nextcloud/notify_push
[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud-libraries/notify_push-client)](https://api.reuse.software/info/github.com/nextcloud-libraries/notify_push-client)
[![npm](https://img.shields.io/npm/v/@nextcloud/notify_push.svg)](https://www.npmjs.com/package/@nextcloud/notify_push)A javascript client for notify_push events for Nextcloud apps.
## Installation
```sh
npm i @nextcloud/notify_push
```## Usage
```js
import { listen } from '@nextcloud/notify_push'// Using pre_auth request for web apps
listen('notify_file', () => {
console.log('A File has been changed')
})// Using credentials for clients
listen('notify_file', () => {
console.log('A File has been changed')
}, {
credentials: {
username: 'alice',
password: 'app-password',
},
})
```