Giter VIP home page Giter VIP logo

go-kik's Introduction

kikbot

A Go client library for the Kik bot API.

Example usage in here.

package main

import (
	"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 test ./...

go-kik's People

Contributors

4kelly avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

skh42

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.