drone-go

Go client for the Drone API

  • 所有者: drone/drone-go
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

drone-go

import (
	"github.com/drone/drone-go/drone"
	"golang.org/x/oauth2"
)

const (
	token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
	host  = "http://drone.company.com"
)

func main() {
	// create an http client with oauth authentication.
	config := new(oauth2.Config)
	auther := config.Client(
		oauth2.NoContext,
		&oauth2.Token{
			AccessToken: token,
		},
	)

	// create the drone client with authenticator
	client := drone.NewClient(host, auther)

	// gets the current user
	user, err := client.Self()
	fmt.Println(user, err)

	// gets the named repository information
	repo, err := client.Repo("drone", "drone-go")
	fmt.Println(repo, err)
}

主要指标

概览
名称与所有者drone/drone-go
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2015-02-12 18:58:17
推送于2024-07-08 16:10:16
最后一次提交2022-03-08 11:58:42
发布数21
最新版本名称v1.7.1 (发布于 )
第一版名称v0.8.0 (发布于 )
用户参与
星数275
关注者数13
派生数113
提交数218
已启用问题?
问题数0
打开的问题数0
拉请求数54
打开的拉请求数2
关闭的拉请求数15
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?