1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-02-01 12:58:01 +02:00
Arno Cornette d2dfd10850
feat(service): add matrix service (#410)
* feat(service): implemented matrix service

* docs(readme): add matrix service

* chore(format) Reformatted with gofumpt

* docs(readme): updated readme and added doc

* chore(rename): Rename functions to be compliant with project style

* chore(formatting): Reformatted docs

* docs(changes): Modified the service and path to it in the documentation.

* chore(format): Reformated with Gofump
2022-10-04 18:01:09 +03:00

34 lines
655 B
Go

/*
Package matrix provides message notification integration for Matrix.
Usage:
package main
import (
"log"
"github.com/nikoksr/notify"
"github.com/nikoksr/notify/service/matrix"
)
func main() {
matrixSvc, err := matrix.New("fake-user-id", "fake-room-id", "fake-home-server", "fake-access-token")
if err != nil {
log.Fatalf("matrix.New() failed: %s", err.Error())
}
notifier := notify.New()
notifier.UseServices(matrixSvc)
err = notifier.Send(context.Background(), "subject", "message")
if err != nil {
log.Fatalf("notifier.Send() failed: %s", err.Error())
}
log.Println("notification sent")
}
*/
package matrix