Name: ARCHIVED-drone-go
Owner: Clever
Description: Go client for the Drone API
Created: 2015-04-08 00:17:40.0
Updated: 2017-02-06 22:48:01.0
Pushed: 2017-02-07 00:09:29.0
Homepage: null
Size: 12
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
drone-go is a Go client library for accessing the Drone API.
![Gitter](https://badges.gitter.im/Join Chat.svg)
Download the package using go get
:
et "github.com/drone/drone-go/drone"
Import the package:
rt "github.com/drone/drone-go/drone"
Create the client:
n := "my-user-token"
:= "https://my-drone-url.com"
nt := drone.NewClient(token, url)
Get the current user:
, err := client.Users.GetCurrent()
Println(user)
Get the repository list:
s, err := client.Repos.List()
Println(repos)
Get the named repository:
, err := client.Repos.Get("github.com", "drone", "drone-go")
Println(repo)