Module: Grist::Endpoint::Workspace
- Included in:
- Grist::Endpoint
- Defined in:
- lib/grist/endpoint/workspace.rb
Instance Method Summary collapse
- #create(organization_id, payload, **params) ⇒ Object (also: #create_workspace)
- #delete(id) ⇒ Object (also: #delete_workspace)
- #list_workspace_users(id) ⇒ Object
- #manage_workspace_access(id, payload, **params) ⇒ Object
- #update(id, payload, **params) ⇒ Object (also: #update_workspace)
- #workspace(id) ⇒ Object
- #workspaces(organization_id) ⇒ Object
Instance Method Details
#create(organization_id, payload, **params) ⇒ Object Also known as: create_workspace
14 15 16 |
# File 'lib/grist/endpoint/workspace.rb', line 14 def create(organization_id, payload, **params) post("/orgs/#{organization_id}/workspaces", payload, params) end |
#delete(id) ⇒ Object Also known as: delete_workspace
24 25 26 |
# File 'lib/grist/endpoint/workspace.rb', line 24 def delete(id) destroy("/workspaces/#{id}") end |
#list_workspace_users(id) ⇒ Object
29 30 31 |
# File 'lib/grist/endpoint/workspace.rb', line 29 def list_workspace_users(id) get("/workspaces/#{id}/access") end |
#manage_workspace_access(id, payload, **params) ⇒ Object
33 34 35 |
# File 'lib/grist/endpoint/workspace.rb', line 33 def manage_workspace_access(id, payload, **params) patch("/workspaces/#{id}/access", payload, params) end |
#update(id, payload, **params) ⇒ Object Also known as: update_workspace
19 20 21 |
# File 'lib/grist/endpoint/workspace.rb', line 19 def update(id, payload, **params) patch("/workspaces/#{id}", payload, params) end |
#workspace(id) ⇒ Object
10 11 12 |
# File 'lib/grist/endpoint/workspace.rb', line 10 def workspace(id) get("/workspaces/#{id}") end |
#workspaces(organization_id) ⇒ Object
6 7 8 |
# File 'lib/grist/endpoint/workspace.rb', line 6 def workspaces(organization_id) get("/orgs/#{organization_id}/workspaces") end |