Changed POST API content-type to application/json
Fixed AddMember response parsing added bot post message example
This commit is contained in:
20
examples/post_bot_message/main.go
Normal file
20
examples/post_bot_message/main.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/densestvoid/groupme"
|
||||
)
|
||||
|
||||
// This is not a real Bot ID. Please find yours by logging
|
||||
// into the GroupMe development website: https://dev.groupme.com/bots
|
||||
const botID = "0123456789ABCDEF"
|
||||
|
||||
// A short program that gets the gets the first 5 groups
|
||||
// the user is part of, and then the first 10 messages of
|
||||
// the first group in that list
|
||||
func main() {
|
||||
// Create a new client with your auth token
|
||||
client := groupme.NewClient("")
|
||||
fmt.Println(client.PostBotMessage(botID, "Your message here!", nil))
|
||||
}
|
Reference in New Issue
Block a user