go-zendesk

module
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: MIT

README

go-zendesk

Gitter Build Status Build status Coverage Status Go Report Card GoDoc FOSSA Status

Zendesk API client library for Go

Installation

$ go get github.com/codykaup/go-zendesk

Usage

package main

import (
    "context"

    "github.com/codykaup/go-zendesk/zendesk"
)

func main() {
    // You can set custom *http.Client here
    client := zendesk.NewClient(nil)

    // example.zendesk.com
    client.SetSubdomain("example")

    // Authenticate with API token
    client.SetCredential(zendesk.NewAPITokenCredential("john.doe@example.com", "apitoken"))

    // Authenticate with agent password
    client.SetCredential(zendesk.NewBasicAuthCredential("john.doe@example.com", "password"))

    // Create resource
    client.CreateGroup(context.Background(), zendesk.Group{
        Name: "support team",
    })
}

Authors

License

MIT License.

See the file LICENSE.

FOSSA Status

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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