genesysapi

package module
v0.0.0-...-853dd42 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 0 Imported by: 0

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64(f float64) *float64

func Int32

func Int32(i int32) *int32

func Int64

func Int64(i int64) *int64

func String

func String(s string) *string

Types

This section is empty.

Jump to

Keyboard shortcuts

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