Class: QQpush::Ios

Inherits:
General show all
Defined in:
lib/qqpush/ios.rb

Overview

iOS device

Constant Summary

Constants inherited from General

General::PROTOCAL, General::ROOT_URL, General::SERVICES, General::VERSION

Instance Attribute Summary

Attributes inherited from General

#request_params, #settings

Instance Method Summary collapse

Methods inherited from General

#general_params, #param_sign, #request, #request_url

Constructor Details

#initialize(params = {}) ⇒ Ios

Returns a new instance of Ios.



4
5
6
7
8
9
10
11
# File 'lib/qqpush/ios.rb', line 4

def initialize(params = {})
  super
  @request_params[:environment] = 2
  @request_params[:message_type] = 0
  @request_params[:message] =
    { aps: { alert: params[:param_content] } }
    .merge(params[:params_custom])
end