Class: Xiaomipush::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/xiaomipush/message.rb

Direct Known Subclasses

AndroidBuilder, IosBuilder, TargetedMessage

Constant Summary collapse

EXTRA_PREFIX =
'extra.'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload: "", restricted_package_name: "", title: "", description: "", time_to_live: "", time_to_send: "", extra: "", notify_type: "", pass_through: '', notify_id: 0) ⇒ Message

ws add pass_through: ” notify_id: 0



8
9
10
11
12
13
14
15
16
17
# File 'lib/xiaomipush/message.rb', line 8

def initialize(payload: "", restricted_package_name: "", title: "", description: "", time_to_live: "", time_to_send: "", extra: "", notify_type: "", pass_through: '', notify_id: 0)
  @payload = payload
  @restricted_package_name = restricted_package_name
  @title = title
  @description = description
  @time_to_live = time_to_live
  @time_to_send = time_to_send
  @extra = extra
  @notify_type = notify_type
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def description
  @description
end

#extra(options = {}) ⇒ Object

Returns the value of attribute extra.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def extra
  @extra
end

#notify_typeObject

Returns the value of attribute notify_type.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def notify_type
  @notify_type
end

#payloadObject

Returns the value of attribute payload.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def payload
  @payload
end

#restricted_package_nameObject

Returns the value of attribute restricted_package_name.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def restricted_package_name
  @restricted_package_name
end

#time_to_liveObject

Returns the value of attribute time_to_live.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def time_to_live
  @time_to_live
end

#time_to_sendObject

Returns the value of attribute time_to_send.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def time_to_send
  @time_to_send
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/xiaomipush/message.rb', line 4

def title
  @title
end