Class: Trello::Comment
Overview
A Comment is a string with a creation date; it resides inside a Card and belongs to a User.
Instance Attribute Summary collapse
Attributes inherited from BasicData
#client
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BasicData
#==, #attributes, client, #collection_name, #collection_path, create, #element_name, #element_path, #hash, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attrs, #save, save, schema, #schema, #update!, #update_fields
Methods included from JsonUtils
included
Instance Attribute Details
#app_creator ⇒ String
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
#creator_id ⇒ String
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
#date ⇒ Datetime
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
#display ⇒ Hash
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
#limits ⇒ Hash
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
#text=(value) ⇒ String
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
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
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/trello/comment.rb', line 22
class Comment < BasicData
schema do
attribute :id, readonly: true, primary_key: true
attribute :creator_id, readonly: true, remote_key: 'idMemberCreator'
attribute :data, readonly: true
attribute :type, readonly: true
attribute :date, readonly: true, serializer: 'Time'
attribute :limits, readonly: true
attribute :app_creator, readonly: true, remote_key: 'appCreator'
attribute :display, readonly: true
attribute :text, update_only: true
end
validates_presence_of :id, :text, :date, :creator_id
validates_length_of :text, in: 1..16384
class << self
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
end
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
one :member_creator, via: Member, path: :members, using: :creator_id
end
|
Class Method Details
.find(action_id) ⇒ Object
43
44
45
46
47
48
|
# File 'lib/trello/comment.rb', line 43
def find(action_id)
response = client.get("/actions/#{action_id}")
self.parse response do |data|
data.client = client
end
end
|
Instance Method Details
#board(params = {}) ⇒ Object
Returns the board this comment is located
52
53
54
|
# File 'lib/trello/comment.rb', line 52
def board(params = {})
Board.from_response client.get("/actions/#{id}/board", params)
end
|
#card(params = {}) ⇒ Object
Returns the card the comment is located
57
58
59
|
# File 'lib/trello/comment.rb', line 57
def card(params = {})
Card.from_response client.get("/actions/#{id}/card", params)
end
|
#delete ⇒ Object
Deletes the comment from the card
67
68
69
70
|
# File 'lib/trello/comment.rb', line 67
def delete
ruta = "/actions/#{id}"
client.delete(ruta)
end
|
#list(params = {}) ⇒ Object
Returns the list the comment is located
62
63
64
|
# File 'lib/trello/comment.rb', line 62
def list(params = {})
List.from_response client.get("/actions/#{id}/list", params)
end
|