module Tacokit::Client::Organizations

Methods for the Organizations API @see developers.trello.com/advanced-reference/organization

Public Instance Methods

create_organization(display_name, options = {}) click to toggle source

Create an organization @param display_name [String] a name for the organization @param options [Hash] options to create the organization with @return [Tacokit::Resource] the organization resource @see developers.trello.com/advanced-reference/organization#post-1-organizations

# File lib/tacokit/client/organizations.rb, line 29
def create_organization(display_name, options = {})
  post "organizations", options.merge(display_name: display_name)
end
delete_organization(org_id) click to toggle source

Delete an organization @param org_id [String] the organization identifier @see developers.trello.com/advanced-reference/organization#delete-1-organizations-idorg-or-name

# File lib/tacokit/client/organizations.rb, line 36
def delete_organization(org_id)
  delete organization_path(org_id)
end
organization(org_id, options = nil) click to toggle source

Retrieve an organization @param org_id [String] the organization identifier @param options [Hash] options to fetch the organization with @return [Tacokit::Resource] the organization resource @see developers.trello.com/advanced-reference/organization

# File lib/tacokit/client/organizations.rb, line 11
def organization(org_id, options = nil)
  get organization_path(org_id), options
end
organization_resource(org_id, resource, *paths) click to toggle source

@private

# File lib/tacokit/client/organizations.rb, line 41
def organization_resource(org_id, resource, *paths)
  paths, options = extract_options(camp(resource), *paths)
  get organization_path(org_id, *paths), options
end
update_organization(org_id, options = {}) click to toggle source

Update an organization @param org_id [String] the organization identifier @param options [Hash] options to update the organization with @return [Tacokit::Resource] the organization resource @see developers.trello.com/advanced-reference/organization#put-1-organizations-idorg-or-name

# File lib/tacokit/client/organizations.rb, line 20
def update_organization(org_id, options = {})
  put organization_path(org_id), options
end

Private Instance Methods

organization_path(org_id, *paths) click to toggle source
# File lib/tacokit/client/organizations.rb, line 48
def organization_path(org_id, *paths)
  resource_path "organizations", org_id, *paths
end