Module: Umeng::JsonBody

Included in:
SendMessage
Defined in:
lib/umeng/json_body.rb

Instance Method Summary collapse

Instance Method Details

#android_params(opts = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/umeng/json_body.rb', line 3

def android_params(opts={})
  {
    payload: {
      display_type: 'message',
      body: {
        custom: opts[:key_value]
      }
    }
  }
end

#ios_params(opts = {}) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/umeng/json_body.rb', line 14

def ios_params(opts={})
  {
    payload: {
      aps: {
        alert: opts[:key_value]["content"]
      }
    }.merge(opts[:key_value])
  }
end