Sha256: 7038156f6362de1de152056bdaf011d1383c4eb7678bb90082f029473fbd26da

Contents?: true

Size: 960 Bytes

Versions: 9

Compression:

Stored size: 960 Bytes

Contents

# frozen_string_literal: true

module Buildkit
  class Client
    # Methods for the Organizations API
    #
    # @see https://buildkite.com/docs/api/organizations
    module Organizations
      # List organizations
      #
      # @return [Array<Sawyer::Resource>] Array of hashes representing Buildkite organizations.
      # @see https://buildkite.com/docs/api/organizations#list-organizations
      # @example
      #   Buildkit.organizations
      def organizations(options = {})
        get('/v2/organizations', options)
      end

      # Get an organization
      #
      # @param org [String] Organization slug.
      # @return [Sawyer::Resource] Hash representing Buildkite organization.
      # @see https://buildkite.com/docs/api/organizations#get-an-organization
      # @example
      #   Buildkit.organization('my-great-org')
      def organization(org, options = {})
        get("/v2/organizations/#{org}", options)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
buildkit-1.6.1 lib/buildkit/client/organizations.rb
buildkit-1.6.0 lib/buildkit/client/organizations.rb
buildkit-1.5.0 lib/buildkit/client/organizations.rb
buildkit-1.4.6 lib/buildkit/client/organizations.rb
buildkit-1.4.5 lib/buildkit/client/organizations.rb
buildkit-1.4.4 lib/buildkit/client/organizations.rb
buildkit-1.4.3 lib/buildkit/client/organizations.rb
buildkit-1.4.2 lib/buildkit/client/organizations.rb
buildkit-1.4.1 lib/buildkit/client/organizations.rb