Class: Trello::Notification

Inherits:
BasicData show all
Defined in:
lib/trello/notification.rb

Instance Attribute Summary collapse

Attributes inherited from BasicData

#client

Instance Method Summary collapse

Methods inherited from BasicData

#==, #attributes, client, #collection_name, #collection_path, create, #element_name, #element_path, find, #hash, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attrs, #save, save, schema, #schema, #update!, #update_fields

Methods included from JsonUtils

included

Constructor Details

This class inherits a constructor from Trello::BasicData

Instance Attribute Details

#action_idString (readonly)

Returns:



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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#creator_appString (readonly)

Returns:



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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#creator_idString (readonly)

Returns:



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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#dataObject

Returns:

  • (Object)


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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#dateDatetime (readonly)

Returns:

  • (Datetime)


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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#idString (readonly)

Returns:



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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#is_reactableBoolean (readonly)

Returns:

  • (Boolean)


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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#reactionsArray (readonly)

Returns:



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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#read_atDatetime (readonly)

Returns:

  • (Datetime)


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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#typeObject (readonly)

Returns:

  • (Object)


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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

#unreadBoolean Also known as: unread?

Returns:

  • (Boolean)


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
# File 'lib/trello/notification.rb', line 25

class Notification < BasicData

  schema do
    # Readonly
    attribute :id, read_only: true
    attribute :type, read_only: true
    attribute :date, read_only: true
    attribute :data, read_only: true
    attribute :creator_app, read_only: true, remote_key: 'appCreator'
    attribute :creator_id, read_only: true, remote_key: 'idMemberCreator'
    attribute :action_id, read_only: true, remote_key: 'idAction'
    attribute :is_reactable, read_only: true, remote_key: 'isReactable'
    attribute :unread, read_only: true
    attribute :read_at, read_only: true, remote_key: 'dateRead'
    attribute :reactions, read_only: true
  end

  validates_presence_of :id, :type, :date, :creator_id

  alias :unread? :unread

  one :creator, path: :members, via: Member, using: :creator_id

  def board(params = {})
    Board.from_response client.get("/notifications/#{id}/board", params)
  end

  def list(params = {})
    List.from_response client.get("/notifications/#{id}/list", params)
  end

  def card(params = {})
    Card.from_response client.get("/notifications/#{id}/card", params)
  end

  def member(params = {})
    Member.from_response client.get("/notifications/#{id}/member", params)
  end

  def organization(params = {})
    Organization.from_response client.get("/notifications/#{id}/organization", params)
  end
end

Instance Method Details

#board(params = {}) ⇒ Object



48
49
50
# File 'lib/trello/notification.rb', line 48

def board(params = {})
  Board.from_response client.get("/notifications/#{id}/board", params)
end

#card(params = {}) ⇒ Object



56
57
58
# File 'lib/trello/notification.rb', line 56

def card(params = {})
  Card.from_response client.get("/notifications/#{id}/card", params)
end

#list(params = {}) ⇒ Object



52
53
54
# File 'lib/trello/notification.rb', line 52

def list(params = {})
  List.from_response client.get("/notifications/#{id}/list", params)
end

#member(params = {}) ⇒ Object



60
61
62
# File 'lib/trello/notification.rb', line 60

def member(params = {})
  Member.from_response client.get("/notifications/#{id}/member", params)
end

#organization(params = {}) ⇒ Object



64
65
66
# File 'lib/trello/notification.rb', line 64

def organization(params = {})
  Organization.from_response client.get("/notifications/#{id}/organization", params)
end