class Assembla::Client::Spaces::Tickets::Comments
Constants
- VALID_PARAMS_NAMES
Public Instance Methods
create(*args)
click to toggle source
@example api.spaces.tickets.comments.create ‘project1’, 500,
ticket_comment: { comment: 'I will do it now' }
# File lib/assembla_api/client/spaces/tickets/comments.rb, line 8 def create(*args) arguments(args, required: [:space, :number]) do permit VALID_PARAMS_NAMES, recursive: true assert_required %w[ comment ] end post_request("/spaces/#{arguments.space}/tickets/#{arguments.number}/ticket_comments", arguments.params) end
edit(*args)
click to toggle source
@example api.spaces.tickets.comments.edit ‘project1’, 500, 142857,
ticket_comment: { comment: 'Ops, I made a typo' }
# File lib/assembla_api/client/spaces/tickets/comments.rb, line 27 def edit(*args) arguments(args, required: [:space, :number, :id]) do permit ['comment'] , recursive: true assert_required %w[ comment ] end put_request("/spaces/#{arguments.space}/tickets/#{arguments.number}/ticket_comments/#{arguments.id}", arguments.params) end
get(*args)
click to toggle source
@example api.spaces.tickets.comments.get ‘project1’, 500, 142857
# File lib/assembla_api/client/spaces/tickets/comments.rb, line 19 def get(*args) arguments(args, required: [:space, :number, :id]) get_request("/spaces/#{arguments.space}/tickets/#{arguments.number}/ticket_comments/#{arguments.id}", arguments.params) end
list(*args) { |el| ... }
click to toggle source
@example api.spaces.tickets.comments.list ‘project1’, 500
# File lib/assembla_api/client/spaces/tickets/comments.rb, line 38 def list(*args) arguments(args, required: [:space, :number]) response = get_request("/spaces/#{arguments.space}/tickets/#{arguments.number}/ticket_comments", arguments.params) return response unless block_given? response.each { |el| yield el } end