lib/parse/push.rb in parse-ruby-client-0.2.0 vs lib/parse/push.rb in parse-ruby-client-0.3.0
- old
+ new
@@ -1,5 +1,6 @@
+# -*- encoding : utf-8 -*-
require 'cgi'
require 'parse/error'
module Parse
class Push
@@ -7,10 +8,11 @@
attr_accessor :channel
attr_accessor :where
attr_accessor :type
attr_accessor :expiration_time_interval
attr_accessor :expiration_time
+ attr_accessor :push_time
attr_accessor :data
def initialize(data, channel = "")
@data = data
@channel = channel
@@ -31,9 +33,10 @@
body.delete :channel
end
body.merge!({ :expiration_interval => @expiration_time_interval }) if @expiration_time_interval
body.merge!({ :expiration_time => @expiration_time }) if @expiration_time
+ body.merge!({ :push_time => @push_time }) if @push_time
body.merge!({ :type => @type }) if @type
response = Parse.client.request uri, :post, body.to_json, nil
end