https://github.com/medigo/go-zendesk
A Zendesk client library for Go
https://github.com/medigo/go-zendesk
go zendesk zendesk-api
Last synced: 4 months ago
JSON representation
A Zendesk client library for Go
- Host: GitHub
- URL: https://github.com/medigo/go-zendesk
- Owner: MEDIGO
- License: mit
- Created: 2015-11-24T11:13:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-07T10:43:20.000Z (about 1 year ago)
- Last Synced: 2024-06-19T21:09:18.066Z (12 months ago)
- Topics: go, zendesk, zendesk-api
- Language: Go
- Size: 216 KB
- Stars: 47
- Watchers: 15
- Forks: 45
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go-Zendesk
[](http://godoc.org/github.com/MEDIGO/go-zendesk/zendesk)
Go-Zendesk is a [Zendesk Core API](https://developer.zendesk.com/rest_api/docs/core/introduction) client library for Go.
This library is used internally at MEDIGO and the API resources are being implemented as needed.
**It's work in progress. Use with caution.**
## Usage
```go
package mainimport (
"log""github.com/MEDIGO/go-zendesk/zendesk"
)func main() {
client, err := zendesk.NewClient("domain", "username", "password")
if err != nil {
log.Fatal(err)
}
ticket, err := client.ShowTicket(1)
if err != nil {
log.Fatal(err)
}
log.Printf("Requester ID is: %d", *ticket.RequesterID)
}
```Find the complete API on https://godoc.org/github.com/MEDIGO/go-zendesk/zendesk#NewClient
## Development
### Linting
To lint the source code, use the command:
```
$ make lint
```### Testing
The project contains integration tests that uses the Zendesk API. To execute them you must provide the following values in a `.env` file:
```
ZENDESK_DOMAIN=
ZENDESK_USERNAME=
ZENDESK_PASSWORD=
```Then, to run the test, use the command:
```
$ make test
```Please note that integration tests will create and alter entities in the configured Zendesk instance.
You most likely want to run them against a [Zendesk Sandbox](https://support.zendesk.com/hc/en-us/articles/203661826-Testing-changes-in-your-sandbox-Enterprise-) instance.## Copyright and license
Copyright © 2017 MEDIGO GmbH. go-zendesk is licensed under the MIT License. See LICENSE for the full license text.