Method: Trello::Comment#member_creator_id

Defined in:
lib/trello/comment.rb

#member_creator_idString (readonly)

Returns:



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/trello/comment.rb', line 12

class Comment < BasicData
  register_attributes :action_id, :text, :date, :member_creator_id,
    readonly: [ :action_id, :text, :date, :member_creator_id ]
  validates_presence_of :action_id, :text, :date, :member_creator_id
  validates_length_of   :text,        in: 1..16384

  class << self
    # Locate a specific action and return a new Comment object.
    def find(action_id)
      client.find(:action, action_id, filter: commentCard)
    end
  end

  # Update the attributes of a Comment
  #
  # Supply a hash of string keyed data retrieved from the Trello API representing
  # a Comment.
  def update_fields(fields)
    attributes[:action_id]          = fields['id']
    attributes[:text]               = fields['data']['text']
    attributes[:date]               = Time.iso8601(fields['date'])
    attributes[:member_creator_id]  = fields['idMemberCreator']
    self
  end

  # Returns the board this comment is located
  def board
    Board.from_response client.get("/actions/#{action_id}/board")
  end

  # Returns the card the comment is located
  def card
    Card.from_response client.get("/actions/#{action_id}/card")
  end

  # Returns the list the comment is located
  def list
    List.from_response client.get("/actions/#{action_id}/list")
  end

  # Deletes the comment from the card
  def delete
    ruta = "/actions/#{action_id}"
    client.delete(ruta)
  end


  # Returns the member who created the comment.
  one :member_creator, via: Member, path: :members, using: :member_creator_id
end