• Stars
    star
    21
  • Rank 1,084,038 (Top 22 %)
  • Language
    Go
  • License
    MIT License
  • Created over 4 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yandex.Tracker library for Go

Yandex.Tracker API in Go

This is the original Yandex.Tracker library for Go.

Install

go get -u github.com/dvsnin/yandex-tracker-go

Example

Getting ticket and description

import (
    "fmt"
	
    "github.com/dvsnin/yandex-tracker-go"
)

func main() {
    client := tracker.New("YOUR YANDEX.TRACKER TOKEN", "YOUR YANDEX ORG_ID")
    ticket, err := client.GetTicket("TICKET KEY")
    if err != nil {
    	fmt.Printf("%v\n", err)
        return
    }
    fmt.Printf("%s\n", ticket.Description())
}

Edit ticket fields

import (
    "fmt"

    "github.com/dvsnin/yandex-tracker-go"
)

func main() {
    client := tracker.New("YOUR YANDEX.TRACKER TOKEN", "YOUR YANDEX ORG_ID")
    ticket, err := client.PatchTicket("TICKET KEY", map[string]string{"TICKET FIELD": "NEW VALUE"})
    if err != nil {
    	fmt.Printf("%v\n", err)
        return
    }
    fmt.Printf("%s\n", ticket.Description())
}

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem.

License

This project is licensed under the MIT License - see the LICENSE.md file for details