package main
import (
"fmt"
"plivo-go"
)
// Initialize these params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
// with payload in request
func main() {
testPhloRunWithParams()
}
func testPhloRunWithParams() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
//pass corresponding from and to values
type params map[string]interface{}
response, err := phloGet.Run(params{
"from": "<caller_id>",
"to": "<destination_number>",
})
if (err != nil) {
println(err)
}
fmt.Printf("Response: %#v\n", response)
}