pgo

package module
v0.0.0-...-6b727c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2018 License: MIT Imports: 9 Imported by: 0

README

Go Report Card

program-go

Small and simple program-o wrapper in Golang

Install

go get github.com/KurozeroPB/program-go

Usage

Small example:

package main

import (
  "fmt"

  "github.com/KurozeroPB/program-go"
)

func main() {
  resp, err := pgo.Say(6, "Testing 123 hello", "test_id_123456")
  if err != nil {
    fmt.Printf("Error: %s\n", err)
    return
  }
  fmt.Printf("Response: %s\n", resp.BotSay)
}

Docs

Say(botID, query, convoID)
Parameter Type Description
botID int The program-o bot id you want to use
query string The query you want to send
convoID string The conversation id to recognize you

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	ConvoID string `json:"convo_id"`
	UserSay string `json:"usersay"`
	BotSay  string `json:"botsay"`
}

Response holds all the returned data from program-o

func Say

func Say(botID int, query string, convoID string) (*Response, error)

Say sends the query to program-o

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL