/qiita-sdk-go

Qiita API v2 client library written in Golang

Primary LanguageGoMIT LicenseMIT

Qiita SDK for Go

License: MIT Build Status Code Climate Issue Count Coverage Status contributions welcome

Qiita API v2 client library written in Golang.

Install

go get -u github.com/ktsujichan/qiita-sdk-go/qiita

Library

package main

import (
	"context"
	"github.com/ktsujichan/qiita-sdk-go/qiita"
)

func main() {
	config := qiita.NewConfig()
	c, _ := qiita.NewClient("<qiita access token>", *config)
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	c.ListItems(ctx, 1, 10, "Golang")
	c.ListUsers(ctx, 1, 10)
	c.GetUser(ctx, "r7kamura")
}