Documentation
¶
Overview ¶
Package api holds the business-logic layer for the generic, curl-like passthrough to the Bitrise API exposed by the `api` command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
Method string
Path string
Fields []KeyValue
Headers http.Header
Body io.Reader
Paginate bool
}
Request describes one `api` command invocation.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service exposes the raw API passthrough to the cmd layer.
func NewService ¶
func NewService(client *bitriseapi.Client) *Service
NewService returns a Service backed by the given API client.
func (*Service) Do ¶
Do executes req. Fields become a query string for GET requests, or a JSON body for anything else. Every non-GET body — whether built from Fields or passed through from --input — gets a JSON Content-Type unless the caller set one, since the API won't parse a body sent without it. When Paginate is set, the request must be a GET; pages are followed via the "paging.next" cursor and their "data" arrays merged into one response.