Skip to content

Dao007forever/go-hoiio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-hoiio

Hoiio SDK in Go

Requirements

Go1

Compiliation

Install go-gb and compile the package.

$ gb

The package will be in the _obj folder.

Getting started

Create a HoiioRestClient.

API Credential

The HoiioRestClient needs your Hoiio credentials. You must pass these directly to the constructor.

import . "go-hoiio/impl"

appid := "YOUR_APPID_HERE"
token := "YOUR_TOKEN_HERE"
client := NewClient(appid, token)

Make a call

import (
       "net/url"
       . "go-hoiio/impl"
)

appid := "YOUR_APPID_HERE"
token := "YOUR_TOKEN_HERE"
client := NewClient(appid, token)
voiceService := NewVoice(client)
data := url.Values{
     "dest" : {"+6512345678"},
     "dest2": {"+6554326547"},
     "caller_id": {"Trong Dao"},
}

resp = voiceService.call(data)

Send a sms

import (
       "net/url"
       . "go-hoiio/impl"
)

appid := "YOUR_APPID_HERE"
token := "YOUR_TOKEN_HERE"
client := NewClient(appid, token)
smsService := NewSms(client)
data := url.Values{
     "dest" : {"+6512345678"},
     "msg": {"Hello, how are you?"},
}

resp = smsService.send(data)

About

Hoiio SDK in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages