Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ulisesgascon/go-synology-chat
Simple wrapper to send Messages to Synology Chat
https://github.com/ulisesgascon/go-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/go-synology-chat
- Owner: UlisesGascon
- License: mit
- Created: 2024-05-08T12:14:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-05-08T19:25:34.000Z (5 months ago)
- Last Synced: 2024-06-19T11:21:36.447Z (4 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
go-synology-chat
Simple wrapper to send Messages to Synology Chat in Go# About
Simple wrapper to send Messages to [Synology Chat](https://www.synology.com/es-es/dsm/feature/chat) in Go
๐ If you want a Node.js version, please check [synology-chat-communicator](https://www.npmjs.com/package/synology-chat-communicator) ๐
## โค๏ธ 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 ๐
- Zero dependencies ๐ช
- Easy to use and great test coverage โ## Installation
```bash
go get github.com/UlisesGascon/[email protected]
```## Usage
### Simple example
```go
package mainimport (
"fmt"
"github.com/UlisesGascon/go-synology-chat"
)func main() {
baseUrl := "https://:"
token := ""
ignoreSSLErrors := truesc, err := synologychat.New(baseUrl, token, ignoreSSLErrors)
if err != nil {
fmt.Println("Error initializing SynologyChat:", err)
return
}users, err := sc.GetUsers()
if err != nil {
fmt.Println("Error getting users:", err)
return
}channels, err := sc.GetChannels()
if err != nil {
fmt.Println("Error getting channels:", err)
return
}const userId = 43451
data, err := sc.SendDirectMessage([]int{userId}, "Hello, World!")
if err != nil {
fmt.Println("Error sending direct message:", err)
return
}fmt.Println(users)
fmt.Println(channels)
fmt.Println(data)
}
```### 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
## 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/go-synology-chat/tags).
## Authors
- **Ulises Gascรณn** - Initial work - [@ulisesGascon](https://github.com/ulisesGascon)
See also the list of [contributors](https://github.com/go-synology-chat/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!