Class: Glass::Subscription::Notification::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/glass/subscriptions/subscription.rb

Constant Summary collapse

SHARE =
"SHARE"
REPLY =
"REPLY"
REPLY_ALL =
"REPLY_ALL"
CUSTOM =
"CUSTOM"
DELETE =
"DELETE"
PIN =
"PIN"
UNPIN =
"UNPIN"

Instance Attribute Summary collapse

Instance Attribute Details

#payloadObject

An optional payload for the action.

For actions of type CUSTOM, this is the ID of the custom menu item that was selected.



181
182
183
# File 'lib/glass/subscriptions/subscription.rb', line 181

def payload
  @payload
end

#typeObject

The type of action. The value of this can be:

SHARE - the user shared an item.
REPLY - the user replied to an item.
REPLY_ALL - the user replied to all recipients of an item.
CUSTOM - the user selected a custom menu item on the timeline item.
DELETE - the user deleted the item.
PIN - the user pinned the item.
UNPIN - the user unpinned the item.

In the future, additional types may be added. UserActions with unrecognized types should be ignored.



166
167
168
# File 'lib/glass/subscriptions/subscription.rb', line 166

def type
  @type
end