Module: Tacokit::Client::Organizations

Included in:
Tacokit::Client
Defined in:
lib/tacokit/client/organizations.rb

Instance Method Summary collapse

Instance Method Details

#create_organization(display_name, options = {}) ⇒ Object

POST /1/organizations


50
51
52
# File 'lib/tacokit/client/organizations.rb', line 50

def create_organization(display_name, options = {})
  post organization_path, options.merge(display_name: display_name)
end

#delete_organization(org_id) ⇒ Object

DELETE /1/organizations/[idOrg or name]


57
58
59
# File 'lib/tacokit/client/organizations.rb', line 57

def delete_organization(org_id)
  delete organization_path(org_id)
end

#organization(org_id, options = nil) ⇒ Object

GET /1/organizations/[idOrg or name]


5
6
7
# File 'lib/tacokit/client/organizations.rb', line 5

def organization(org_id, options = nil)
  get organization_path(org_id), options
end

#organization_path(*paths) ⇒ Object

DELETE /1/organizations/[idOrg or name]/ logo members/ members//all prefs/associatedDomain prefs/orgInviteRestrict


68
69
70
# File 'lib/tacokit/client/organizations.rb', line 68

def organization_path(*paths)
  path_join "organizations", *paths
end

#organization_resource(org_id, resource, *paths) ⇒ Object

GET /1/organizations/[idOrg or name]/ actions boards boards/ deltas members members/ members//cards membersInvited membersInvited/ memberships memberships/


21
22
23
24
# File 'lib/tacokit/client/organizations.rb', line 21

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 = {}) ⇒ Object

PUT /1/organizations/[idOrg or name]


27
28
29
# File 'lib/tacokit/client/organizations.rb', line 27

def update_organization(org_id, options = {})
  put organization_path(org_id), options
end