go sdk for groupme
A simple sdk for the GroupMe API with no dependencies outside of the stdlib.
import "github.com/nhomble/groupme.go/groupme"
package main
import "github.com/nhomble/groupme.go/groupme"
func main() {
provider := groupme.TokenProviderFromToken("... your access token with groupme ....")
client, _ := groupme.NewClient(provider)
client.Messages.Send(".. group id..", &groupme.SendMessageCommand{
SourceGuid: "... guid ...",
Text: "Houston we have landed",
})
}
go run examples/sendMessage.go
You'll see here that the token is pulled from disk ~/.groupme-go.prop
and then we:
- create group
- create message
- list messages (and print our expectation)
- delete the group
Property file contains one field
token="your token not mine"