Class: Xiaomi::Push::Services::Feedback

Inherits:
Object
  • Object
show all
Defined in:
lib/xiaomi/push/services/feedback.rb

Overview

适用于 iOS 推送获取设备 Feedback API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Feedback

Returns a new instance of Feedback.



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

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextClient

Returns the current value of context.

Returns:

  • (Client)

    the current value of context



7
8
9
# File 'lib/xiaomi/push/services/feedback.rb', line 7

def context
  @context
end

Instance Method Details

#invalidHash

获取失效的 device token

Returns:

  • (Hash)

    小米返回数据结构

See Also:



19
20
21
22
# File 'lib/xiaomi/push/services/feedback.rb', line 19

def invalid
  url = 'https://feedback.xmpush.xiaomi.com/v1/feedback/fetch_invalid_regids'
  @context.get(url)
end