Categorygithub.com/freman/genesysapi
modulepackage
0.0.0-20240708045602-853dd42c31fb
Repository: https://github.com/freman/genesysapi.git
Documentation: pkg.go.dev

# README

GenesysAPI

An unofficial go SDK client library for the mypurecloud api generated from the official swagger.json

Get SDK Package

Retrieve the package from https://github.com/freman/genesysapi using go get:

go get github.com/freman/genesysapi

Use the SDK

Importing the package

import (
    "github.com/freman/geneysapi/client"
)

Configuring the SDK

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)

Transport debugging

Enabling debug will trace out all http requests

api.SetDebug(true)

Generating

Prerequisites

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

Versioning

None yet

Authors

  • Shannon Wynter - Initial work - Freman

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author