Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/4kelly/go-kik
A Go client library for the Kik bot API. Unfortunately, I missed the bot craze by about 4 years on this one. I wrote it strictly to practise Go.
https://github.com/4kelly/go-kik
clientlibrary go golang kik kikbot
Last synced: 28 days ago
JSON representation
A Go client library for the Kik bot API. Unfortunately, I missed the bot craze by about 4 years on this one. I wrote it strictly to practise Go.
- Host: GitHub
- URL: https://github.com/4kelly/go-kik
- Owner: 4kelly
- Created: 2020-01-09T01:59:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-22T02:56:31.000Z (almost 3 years ago)
- Last Synced: 2024-08-03T23:29:27.308Z (4 months ago)
- Topics: clientlibrary, go, golang, kik, kikbot
- Language: Go
- Homepage: https://bots.kik.com/#/
- Size: 33.2 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-golang-repositories - go-kik
README
# kikbot
A Go client library for the [Kik bot API](https://dev.kik.com/#/home).
Example usage in [here](test/system/kik_test.go).
```go
package mainimport (
"log"
"net/http"
"os"
"time""github.com/4kelly/go-kik/kik"
"github.com/google/go-cmp/cmp"
)var (
kikClient *kik.Client
err error
)func init() {
username := os.Getenv("KIKBOT_USERNAME")
key := os.Getenv("KIKBOT_API_KEY")
webhook := os.Getenv("KIKBOT_WEBHOOK")client := &http.Client{
Transport: nil,
CheckRedirect: nil,
Jar: nil,
Timeout: time.Duration(3) * time.Second,
}kikClient, err = kik.NewKikClient(
"https://api.kik.com/",
username,
key,
client,
)
if err != nil {
log.Fatalf("could not initiate client: %v ", err)
}err = kikClient.SetConfiguration(&kik.Configuration{
Webhook: webhook,
Features: kik.Features{},
StaticKeyboard: nil,
})
if err != nil {
log.Fatalf("could not configure kik client: %v ", err)
}
}
```## Testing
Run system tests to validate integrity of the Kik API.
```go
go test ./...
```