Skip to content

jbydeley/go-semaphore

Repository files navigation

Go-Semaphore API SDK

Build Status Coverage Status GoDoc

Go-Semaphore is an SDK to map to the SemaphoreApp API. This lets you check on build status, branch status and branch history. Check the GoDoc link for a list of functions you can call. Check the semaphore api for more information.

TODO: Implement build from commit.

Installation

Get the package go get -u github.com/jbydeley/go-semaphore

Import it import "github.com/jbydeley/go-semaphore"

Example Usage

Get a list of projects

api := semaphore.NewSemaphore("auth_token")
projects, err := api.GetProjects()

GetProjects returns a project.

Get a list of branches for a project

api := semaphore.NewSemaphore("auth_token")
branches, err := api.GetBranches("project_hash")

GetBranches returns an array of branches.

Get the status of a branch

api := semaphore.NewSemaphore("auth_token")
branchStatus, err := api.GetBranchStatus("project_hash", branch_id)

GetBranchStatus returns a branch status.

About

An API SDK for SemaphoreApp.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages