Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.18 KB

README.md

File metadata and controls

47 lines (34 loc) · 1.18 KB

go-traq

Go Reference CI Update

A client library for the traQ API.

This package is updated automatically.

How to use

See client.md and docs/ for more information.

go get github.com/traPtitech/go-traq
package main

import (
	"context"
	"fmt"

	traq "github.com/traPtitech/go-traq"
)

const TOKEN = "/* your token */"

func main() {
	client := traq.NewAPIClient(traq.NewConfiguration())
	auth := context.WithValue(context.Background(), traq.ContextAccessToken, TOKEN)

	v, _, _ := client.ChannelApi.
		GetChannels(auth).
		IncludeDm(true).
		Execute()
	fmt.Printf("%#v", v)
}