class Assembla::Client::Spaces::SpaceTools

Constants

VALID_PARAMS_NAMES

Public Instance Methods

all(*args)
Alias for: list
create(*args) click to toggle source

@example api.spaces.space_tools.create ‘project1’, 21,

# File lib/assembla_api/client/spaces/space_tools.rb, line 16
def create(*args)
  arguments(args, required: [:space, :tool_id])
  post_request("/spaces/#{arguments.space}/space_tools/#{arguments.tool_id}/add")
end
delete(*args) click to toggle source

@example api.spaces.space_tools.delete ‘project1’, ‘tool_guid’

# File lib/assembla_api/client/spaces/space_tools.rb, line 40
def delete(*args)
  arguments(args, required: [:space, :space_tool_id])
  delete_request("/spaces/#{arguments.space}/space_tools/#{arguments.space_tool_id}")
end
edit(*args) click to toggle source

@example api.spaces.space_tools.edit ‘project1’, ‘tool_guid’, space_tool: {watcher_permissions: 1}

# File lib/assembla_api/client/spaces/space_tools.rb, line 23
def edit(*args)
  arguments(args, required: [:space, :space_tool_id]) do
    permit VALID_PARAMS_NAMES, recursive: true
  end

  put_request("/spaces/#{arguments.space}/space_tools/#{arguments.space_tool_id}", arguments.params)
end
get(*args) click to toggle source

@example api.spaces.space_tools.get ‘project1’, ‘tool_guid’

# File lib/assembla_api/client/spaces/space_tools.rb, line 33
def get(*args)
  arguments(args, required: [:space, :space_tool_id])
  get_request("/spaces/#{arguments.space}/space_tools/#{arguments.space_tool_id}")
end
list(*args) { |el| ... } click to toggle source

@example api.spaces.space_tools.list ‘project1’ api.spaces.space_tools.all ‘project1’

# File lib/assembla_api/client/spaces/space_tools.rb, line 48
def list(*args)
  arguments(args, required: [:space])
  response = get_request("/spaces/#{arguments.space}/space_tools", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end
Also aliased as: all
repo_list(*args) { |el| ... } click to toggle source

@example api.spaces.space_tools.repo_list ‘project1’

# File lib/assembla_api/client/spaces/space_tools.rb, line 58
def repo_list(*args)
  arguments(args, required: [:space])
  response = get_request("/spaces/#{arguments.space}/space_tools/repo", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end