Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/tracker_api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ def project(id, params={})
Endpoints::Project.new(self).get(id, params)
end

# Create a new workspace.
#
# @param [Hash] params attributes to create the workspace with
# @return [TrackerApi::Resources::Workspace] newly created Workspace
def create_workspace(params)
Endpoints::Workspace.new(self).create(params)
end

# Get workspace
#
# @param [Hash] params
Expand Down
6 changes: 6 additions & 0 deletions lib/tracker_api/endpoints/workspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ def get(id, params={})

Resources::Workspace.new({ client: client }.merge(data))
end

def create(params={})
data = client.post("/my/workspaces", params: params).body

Resources::Workspace.new({ client: client }.merge(data))
end
end
end
end