Class: Xiaomi::Push::Message::IOS

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

Overview

iOS 数据消息体

Instance Attribute Summary collapse

Attributes inherited from Base

#alias, #extras, #registration_id, #topic, #topic_op, #topics, #user_account

Instance Method Summary collapse

Methods inherited from Base

#build, #extra, #type

Constructor Details

#initialize(**params) ⇒ IOS

Returns a new instance of IOS.


13
14
15
16
17
18
19
# File 'lib/xiaomi/push/services/messages/ios.rb', line 13

def initialize(**params)
  @description = params[:description]
  @badge = params[:badge] || 1
  @sound = params[:sound] || 'default'
  @category = params[:category]
  @extras = params[:extras] || {}
end

Instance Attribute Details

#badgeString

角标, 默认 1

Returns:

  • (String)

    the current value of badge


10
11
12
# File 'lib/xiaomi/push/services/messages/ios.rb', line 10

def badge
  @badge
end

#categoryString

iOS 8 以上可设置推送消息快速回复类别

Returns:

  • (String)

    the current value of category


10
11
12
# File 'lib/xiaomi/push/services/messages/ios.rb', line 10

def category
  @category
end

#descriptionString

描述

Returns:

  • (String)

    the current value of description


10
11
12
# File 'lib/xiaomi/push/services/messages/ios.rb', line 10

def description
  @description
end

#soundString

声音,默认 default

Returns:

  • (String)

    the current value of sound


10
11
12
# File 'lib/xiaomi/push/services/messages/ios.rb', line 10

def sound
  @sound
end

#titleString

标题

Returns:

  • (String)

    the current value of title


10
11
12
# File 'lib/xiaomi/push/services/messages/ios.rb', line 10

def title
  @title
end