Class: Xiaomi::Push::Message::Android

Inherits:
Base
  • Object
show all
Defined in:
lib/xiaomi/push/services/messages/android.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#alias, #registration_id, #topic, #topic_op, #topics

Instance Method Summary collapse

Methods inherited from Base

#build, #extra, #type

Constructor Details

#initialize(**params) ⇒ Android

Returns a new instance of Android.



6
7
8
9
10
11
12
13
14
15
# File 'lib/xiaomi/push/services/messages/android.rb', line 6

def initialize(**params)
  @title = params[:title]
  @description = params[:description]
  @badge = params[:badge] || 1
  @sound = params[:sound] || 'default'
  @pass_through = params[:pass_through] || 0
  @notify_type = params[:notify_type] || 'DEFAULT_ALL'
  @notify_id = params[:notify_id]
  @extras = params[:extras] || {}
end

Instance Attribute Details

#badgeObject

Returns the value of attribute badge.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def badge
  @badge
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def description
  @description
end

#extrasObject

Returns the value of attribute extras.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def extras
  @extras
end

#notify_idObject

Returns the value of attribute notify_id.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def notify_id
  @notify_id
end

#notify_typeObject

Returns the value of attribute notify_type.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def notify_type
  @notify_type
end

#pass_throughObject

Returns the value of attribute pass_through.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def pass_through
  @pass_through
end

#soundObject

Returns the value of attribute sound.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def sound
  @sound
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/xiaomi/push/services/messages/android.rb', line 5

def title
  @title
end