22
23
24
25
26
27
28
29
|
# File 'lib/umeng_msg/subject.rb', line 22
def push
sign = Sign.generate @platform, PUSH_URL, @payload
begin
parse_res RestClient.post("#{PUSH_URL}?sign=#{sign}", @payload.to_json, content_type: :json, accept: :json)
rescue => e
parse_res e.response
end
end
|