Class: Troo::Remote::Comment
- Inherits:
-
Object
- Object
- Troo::Remote::Comment
- Includes:
- Troo::RemoteModelHelpers
- Defined in:
- lib/troo/remote/comment.rb
Class Method Summary collapse
Instance Method Summary collapse
- #adapted ⇒ Hash
- #associations ⇒ Array
-
#external_board_id ⇒ Object
[].
-
#external_card_id ⇒ Object
[].
-
#external_comment_id ⇒ Object
[].
-
#local_model ⇒ Object
[].
-
#text ⇒ Object
[].
Methods included from Troo::RemoteModelHelpers
Class Method Details
.by_board_id ⇒ Hash
21 22 23 24 25 26 |
# File 'lib/troo/remote/comment.rb', line 21 def by_board_id { endpoint: :comments_by_board_id, query: { filter: :commentCard } } end |
.by_card_id ⇒ Hash
29 30 31 32 33 34 |
# File 'lib/troo/remote/comment.rb', line 29 def by_card_id { endpoint: :comments_by_card_id, query: { filter: :commentCard } } end |
.remote_options ⇒ Hash
16 17 18 |
# File 'lib/troo/remote/comment.rb', line 16 def { mode: :card } end |
Instance Method Details
#adapted ⇒ Hash
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/troo/remote/comment.rb', line 68 def adapted { external_id: id, external_board_id: data.board.id, external_card_id: data.card.id, external_member_id: idMemberCreator, date: date, text: text } end |
#associations ⇒ Array
58 59 60 |
# File 'lib/troo/remote/comment.rb', line 58 def associations [:memberCreator] end |
#external_board_id ⇒ Object
Returns [].
38 39 40 |
# File 'lib/troo/remote/comment.rb', line 38 def external_board_id data.board.id end |
#external_card_id ⇒ Object
Returns [].
43 44 45 |
# File 'lib/troo/remote/comment.rb', line 43 def external_card_id data.card.id end |
#external_comment_id ⇒ Object
Returns [].
48 49 50 |
# File 'lib/troo/remote/comment.rb', line 48 def external_comment_id id end |
#local_model ⇒ Object
Returns [].
63 64 65 |
# File 'lib/troo/remote/comment.rb', line 63 def local_model Troo::Comment end |
#text ⇒ Object
Returns [].
53 54 55 |
# File 'lib/troo/remote/comment.rb', line 53 def text data.text end |