An open API service indexing awesome lists of open source software.

https://github.com/griffin-stewie/go-backlog

Backlog API Client for Golang.
https://github.com/griffin-stewie/go-backlog

backlog golang

Last synced: 4 months ago
JSON representation

Backlog API Client for Golang.

Awesome Lists containing this project

README

          

# go-backlog

[![GoDoc](https://godoc.org/github.com/garyburd/redigo/redis?status.svg)](https://godoc.org/github.com/griffin-stewie/go-backlog)

[Backlog API](http://developer.nulab-inc.com/ja/docs/backlog/ "Backlog API とは | Backlog | Nulab Developers") Client for Golang.

## Install

```sh
$ go get github.com/griffin-stewie/go-backlog
```

## Usage

```sh
$ go run ./example/main.go
```

```go
// Sample code
package main

import (
"log"
"net/url"
"os"

backlog "github.com/griffin-stewie/go-backlog"
)

func main() {
token := os.Getenv("BACKLOG_TOKEN")
if token == "" {
log.Fatalln("You need Backlog access token.")
}

URL, err := url.Parse("https://YOURSPACE.backlog.jp")
if err != nil {
log.Fatalf("ERROR: %s", err.Error())
}

client := backlog.NewClient(URL, token)

issues, err := client.Issues()
if err != nil {
log.Fatalf("ERROR: %s", err.Error())
}

log.Printf("issues: %#+v", issues)
}
```