An unofficial go SDK client library for the mypurecloud api generated from the official swagger.json
Retrieve the package from https://github.com/freman/genesysapi using go get:
go get github.com/freman/genesysapi
import (
"github.com/freman/geneysapi/client"
)
The SDK can be configured by setting properties on a Configuration instance. Applications using this library really can only use client credentials as I have not implemented any of the other auth schemes.
uri, err := url.Parse("https://api.mypurecloud.com.au")
if err != nil {
panic(err)
}
config := client.Config{
URL: uri,
}
err := config.AuthorizeClientCredentials(os.Getenv("GENESYS_CLOUD_CLIENT_ID"), os.Getenv("GENESYS_CLOUD_CLIENT_SECRET"))
if err != nil {
panic(err)
}
api := client.New(config)
Enabling debug will trace out all http requests
api.SetDebug(true)
You need to have goswagger installed but I have provided a shell script to re-generate this package from the official swagger.json
./generate.sh
None yet
- Shannon Wynter - Initial work - Freman
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Genesys / MyPureCloud, couldn't have done this without their swagger document.
- Stratoscale for their swagger template from which swagger-template/client is derived from
- etc