1
0
Fork 0
mirror of https://github.com/matrix-org/gomatrix synced 2025-05-12 10:41:44 +00:00

Test example file

This commit is contained in:
Kegan Dougal 2016-12-09 16:09:48 +00:00
parent 9c35a1edb8
commit 76fa23b9a4
2 changed files with 17 additions and 12 deletions

View file

@ -1,18 +1,6 @@
// Package gomatrix implements the Matrix Client-Server API.
//
// Specification can be found at http://matrix.org/docs/spec/client_server/r0.2.0.html
//
// Example usage of this library: (blocking version)
// cli, _ := gomatrix.NewClient("https://matrix.org", "@example:matrix.org", "MDAefhiuwehfuiwe")
// syncer := cli.Syncer.(*gomatrix.DefaultSyncer)
// syncer.OnEventType("m.room.message", func(ev *gomatrix.Event) {
// fmt.Println("Message: ", ev)
// })
// if err := cli.Sync(); err != nil {
// fmt.Println("Sync() returned ", err)
// }
//
// To make the example non-blocking, call Sync() in a goroutine.
package gomatrix
import (