module Buildkit::Client::Organizations

Methods for the Organizations API

@see buildkite.com/docs/api/organizations

Public Instance Methods

organization(org, options = {}) click to toggle source

Get an organization

@param org [String] Organization slug. @return [Sawyer::Resource] Hash representing Buildkite organization. @see buildkite.com/docs/api/organizations#get-an-organization @example

Buildkit.organization('my-great-org')
# File lib/buildkit/client/organizations.rb, line 26
def organization(org, options = {})
  get("/v2/organizations/#{org}", options)
end
organizations(options = {}) click to toggle source

List organizations

@return [Array<Sawyer::Resource>] Array of hashes representing Buildkite organizations. @see buildkite.com/docs/api/organizations#list-organizations @example

Buildkit.organizations
# File lib/buildkit/client/organizations.rb, line 15
def organizations(options = {})
  get('/v2/organizations', options)
end