package main import ( "fmt" "git.darknebu.la/emile/matrix" ) func main() { fmt.Println("Basic example") username := "testbot1" password := "testbot1" homeserver := "https://matrix.emile.space" authinfo, err := matrix.Login(username, password, homeserver) if err != nil { fmt.Println("ERROR") fmt.Println(err) return } fmt.Printf("UserID %v\n", authinfo.UserID) fmt.Printf("HomeServer %v\n", authinfo.HomeServer) fmt.Printf("DeviceID %v\n", authinfo.DeviceID) fmt.Printf("AccessToken %v\n", authinfo.AccessToken) matrix.Sync(authinfo) }