Skip to content

Commit

Permalink
Merge 1864c98 into 118a913
Browse files Browse the repository at this point in the history
  • Loading branch information
nukosuke committed Mar 17, 2019
2 parents 118a913 + 1864c98 commit a166b74
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 nukosuke
Copyright (c) 2018-2019 nukosuke

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,52 @@
# go-zendesk

[![Gitter](https://badges.gitter.im/terraform-provider-zendesk/Lobby.svg)](https://gitter.im/terraform-provider-zendesk/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/nukosuke/go-zendesk.svg?branch=master)](https://travis-ci.org/nukosuke/go-zendesk)
[![Build status](https://ci.appveyor.com/api/projects/status/ce4p1mswjkdftv6o/branch/master?svg=true)](https://ci.appveyor.com/project/nukosuke/go-zendesk/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/nukosuke/go-zendesk/badge.svg?branch=master)](https://coveralls.io/github/nukosuke/go-zendesk?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/nukosuke/go-zendesk)](https://goreportcard.com/report/github.com/nukosuke/go-zendesk)
[![GoDoc](https://godoc.org/github.com/zenform/go-zendesk?status.svg)](https://godoc.org/github.com/zenform/go-zendesk)

Zendesk API client library
Zendesk API client library for Go

- [Reference](https://godoc.org/github.com/nukosuke/go-zendesk)

## Installation

``` shell
$ go get github.com/nukosuke/go-zendesk
```

## Usage

```go
package main

import (
"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(zendesk.Group{
Name: "support team",
})
}
```

## License

MIT License.

See the file [LICENSE](./LICENSE).

0 comments on commit a166b74

Please sign in to comment.