Giter Club home page Giter Club logo

go-zendesk's Introduction

Go-Zendesk

GoDoc

Go-Zendesk is a Zendesk Core API 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

package main

import (
  "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=<your-zendesk-domain>
ZENDESK_USERNAME=<your-zendesk-api-email>
ZENDESK_PASSWORD=<your-zendesk-api-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 instance.

Copyright and license

Copyright © 2017 MEDIGO GmbH. go-zendesk is licensed under the MIT License. See LICENSE for the full license text.

go-zendesk's People

Contributors

albscui avatar alexei-led avatar alexovits avatar alexyans avatar antonmsova avatar dbrabera avatar edevil avatar eggman64 avatar fmeuman avatar fterrag avatar hypnoglow avatar tilfin avatar tucksaun avatar vgw-chriskruger avatar whitone avatar wundark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-zendesk's Issues

An ability to use API keys for authentication instead of login+password

Hello, guys!

Thank you for your hard work on this library! It works really well! I managed to create automatic user and ticket creation in less than few hours!

Great job!

But I'm looking for options to improve security of my application and use API keys instead of login and password.

Do you have plans to implement this feature?

Thank you!

Where is the Requester field?

Through the cURL command I can specifiy a requester field, however I can't find it in the tickets API of the library.
curl https://.zendesk.com/api/v2/tickets.json
-d '{"ticket": {"type": "question", "requester": {"name": "Username", "email": "[email protected]"}, "subject": "My printer is still on fire!", "comment": { "body": "The smoke is colorful." }, "custom_fields": [{"id": 1236432112, "value": "1.2.3.4"}]}}'
-H "Content-Type: application/json" -v -u [email protected]:{ZENDESK_PASSWORD} -X POST

Add semver or equivalent

@edevil sorry for the delayed reply. Yes, we certainly welcome these changes. I'll set up some versioning in this week so that we don't break projects that use the older implementation. Cheers.

Originally posted by @eggman64 in #81 (comment)

All tests should perform clean-up

It's really hard to develop against this library with the sandbox environment as some of the tests leave artefacts behind which makes the next test run fail.

Groups

Hey there,

Thank you for creating and maintaining this package - it's been very useful! I was wondering if there was a way to fetch groups? I see that there is a Group struct defined, but I'm not seeing how to fetch groups from Zendesk.

Thanks!

Errors hidden

Currently in unmarshall it tries to read the error into an APIError struct but if it doesn't match the error text is lost forever.

It would be nice if

  1. The APIError struct matched the error json (I'm not sure if this applies to just some error responses or what)
  2. If deserialization fails there the raw body text is available to client libraries

Error json payloads are unlikely to be large so I don't think deserialization needs to happen directly from the body reader, it could be buffered entirely up front.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.