https://github.com/nukosuke/go-zendesk
Zendesk API client library for Go
https://github.com/nukosuke/go-zendesk
api go golang zendesk
Last synced: over 1 year ago
JSON representation
Zendesk API client library for Go
- Host: GitHub
- URL: https://github.com/nukosuke/go-zendesk
- Owner: nukosuke
- License: mit
- Created: 2018-01-17T13:09:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-30T01:49:59.000Z (over 1 year ago)
- Last Synced: 2025-03-28T20:09:44.296Z (over 1 year ago)
- Topics: api, go, golang, zendesk
- Language: Go
- Homepage: https://pkg.go.dev/github.com/nukosuke/go-zendesk/zendesk
- Size: 567 KB
- Stars: 66
- Watchers: 6
- Forks: 80
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-zendesk
[](https://github.com/nukosuke/go-zendesk/actions)
[](https://ci.appveyor.com/project/nukosuke/go-zendesk/branch/master)
[](https://coveralls.io/github/nukosuke/go-zendesk?branch=master)
[](https://goreportcard.com/report/github.com/nukosuke/go-zendesk)
[](https://pkg.go.dev/github.com/nukosuke/go-zendesk/zendesk)
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fnukosuke%2Fgo-zendesk?ref=badge_shield)
Zendesk API client library for Go
- [Reference](https://pkg.go.dev/github.com/nukosuke/go-zendesk/zendesk)
## Installation
```shell
$ go get github.com/nukosuke/go-zendesk
```
## Usage
```go
package main
import (
"context"
"github.com/nukosuke/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",
})
}
```
## Want to mock API?
go-zendesk has a [mock package](https://pkg.go.dev/github.com/nukosuke/go-zendesk/zendesk/mock) generated by [uber-go/mock](https://github.com/uber-go/mock).
You can simulate the response from Zendesk API with it.
## To regenerate the mock client
`go generate ./...`
## Zendesk OBP(Offset Based Pagination) to CBP(Cursor Based Pagination) migration guide
[CBPMigration](CBPMigration.md)
## Maintainer
- [nukosuke](https://github.com/nukosuke)
## License
MIT License.
See the file [LICENSE](./LICENSE).
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fnukosuke%2Fgo-zendesk?ref=badge_large)