Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ulisesgascon/synology-chat-communicator
Simple wrapper to send Messages to Synology Chat
https://github.com/ulisesgascon/synology-chat-communicator
synology synology-chat
Last synced: about 20 hours ago
JSON representation
Simple wrapper to send Messages to Synology Chat
- Host: GitHub
- URL: https://github.com/ulisesgascon/synology-chat-communicator
- Owner: UlisesGascon
- License: mit
- Created: 2023-02-11T14:27:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-08T19:28:04.000Z (5 months ago)
- Last Synced: 2024-09-14T05:11:04.192Z (21 days ago)
- Topics: synology, synology-chat
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/synology-chat-communicator
- Size: 321 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
synology-chat-communicator
Simple wrapper to send Messages to Synology Chat# About
Simple wrapper to send Messages to [Synology Chat](https://www.synology.com/es-es/dsm/feature/chat)
๐ If you want a Go version, please check [go-synology-chat](https://github.com/UlisesGascon/go-synology-chat) ๐
## โค๏ธ Awesome Features:
- Out of the box simple Interface. ๐ฅ
- Added support for multimedia messages ๐บ
- Simple way to send direct messages to one or many users ๐
- Direct support to list users and channels ๐
- `debug` is supported ๐ช
- Easy to use and great test coverage โ## Installation
```bash
npm install synology-chat-communicator
```## Usage
### Simple example
```js
const { sendDirectMessage, getUsers, getChannels } = require('synology-chat-communicator')({
token: '',
baseUrl: 'https://:',
ignoreSSLErrors: true
});(async () => {
const channels = await getChannels()
console.log("channels:", channels)const users = await getUsers()
console.log("users:", users)const user = users[0]
const userIdsList = users.map(({user_id}) => user_id)const message = await sendDirectMessage(user.user_id, `Hello, ${user.username}!`)
console.log("message:", message)const mediaMessage = await sendDirectMessage(user.user_id, `Check out this cool picture, ${user.username}!`, 'https://ulisesgascon.com/ulises_gascon.jpg')
console.log("Media Message:", mediaMessage)const massiveMessage = await sendDirectMessage(userIdsList, "I am the new ๐ค. Chat with me!")
console.log("Massive Message:", massiveMessage)
})()
```### Disable SSL validation
If you have a Synology NAS with invalid SSL certificates (due to expiration or other issues), you can disable the SSL validation in the requests generated by the library by using the configuration parameter `ignoreSSLErrors`.
## Additional Features
Please check out the official [DSM Documentation](https://kb.synology.com/en-uk/DSM/help/Chat/chat_integration?version=7) to include new features
## Built With
Development only:
- [Standard](https://www.npmjs.com/package/standard) - Linting propuses
- [Husky](https://www.npmjs.com/package/husky) - Git Hooks
- [commitlint](https://www.npmjs.com/package/@commitlint/cli) - Linting commit messages
- [jest](https://www.npmjs.com/package/jest) - Testing
- [standard](https://www.npmjs.com/package/standard) - Linting
- [standard-version](https://www.npmjs.com/package/standard-version) - Manage changelog and releasesProduction only:
- [debug](https://www.npmjs.com/package/debug) - Debug the app
- [got](https://www.npmjs.com/package/got) - Human-friendly and powerful HTTP request library for Node.js## Contributing
Please read [CONTRIBUTING.md](https://github.com/UlisesGascon/.github/blob/main/contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/ulisesGascon/synology-chat-communicator/tags).
## Authors
- **Ulises Gascรณn** - Initial work- - [@ulisesGascon](https://github.com/ulisesGascon)
See also the list of [contributors](https://github.com/ulisesGascon/synology-chat-communicator/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Acknowledgments
- This project is under development, but you can help us to improve it! We :heart: FOSS!