Class: NCMB::Push
Constant Summary
Constants included from NCMB
Instance Attribute Summary collapse
-
#acl ⇒ Object
Returns the value of attribute acl.
-
#action ⇒ Object
Returns the value of attribute action.
-
#badgeIncrementFlag ⇒ Object
Returns the value of attribute badgeIncrementFlag.
-
#badgeSetting ⇒ Object
Returns the value of attribute badgeSetting.
-
#contentAvailable ⇒ Object
Returns the value of attribute contentAvailable.
-
#createDate ⇒ Object
Returns the value of attribute createDate.
-
#deliveryExpirationDate ⇒ Object
Returns the value of attribute deliveryExpirationDate.
-
#deliveryExpirationTime ⇒ Object
Returns the value of attribute deliveryExpirationTime.
-
#deliveryTime ⇒ Object
Returns the value of attribute deliveryTime.
-
#dialog ⇒ Object
Returns the value of attribute dialog.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#immediateDeliveryFlag ⇒ Object
Returns the value of attribute immediateDeliveryFlag.
-
#message ⇒ Object
Returns the value of attribute message.
-
#objectId ⇒ Object
Returns the value of attribute objectId.
-
#richUrl ⇒ Object
Returns the value of attribute richUrl.
-
#searchCondition ⇒ Object
Returns the value of attribute searchCondition.
-
#sound ⇒ Object
Returns the value of attribute sound.
-
#target ⇒ Object
Returns the value of attribute target.
-
#title ⇒ Object
Returns the value of attribute title.
-
#userSettingValue ⇒ Object
Returns the value of attribute userSettingValue.
Instance Method Summary collapse
Methods included from NCMB
Instance Attribute Details
#acl ⇒ Object
Returns the value of attribute acl.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def acl @acl end |
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def action @action end |
#badgeIncrementFlag ⇒ Object
Returns the value of attribute badgeIncrementFlag.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def badgeIncrementFlag @badgeIncrementFlag end |
#badgeSetting ⇒ Object
Returns the value of attribute badgeSetting.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def badgeSetting @badgeSetting end |
#contentAvailable ⇒ Object
Returns the value of attribute contentAvailable.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def contentAvailable @contentAvailable end |
#createDate ⇒ Object
Returns the value of attribute createDate.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def createDate @createDate end |
#deliveryExpirationDate ⇒ Object
Returns the value of attribute deliveryExpirationDate.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def deliveryExpirationDate @deliveryExpirationDate end |
#deliveryExpirationTime ⇒ Object
Returns the value of attribute deliveryExpirationTime.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def deliveryExpirationTime @deliveryExpirationTime end |
#deliveryTime ⇒ Object
Returns the value of attribute deliveryTime.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def deliveryTime @deliveryTime end |
#dialog ⇒ Object
Returns the value of attribute dialog.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def dialog @dialog end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def errors @errors end |
#immediateDeliveryFlag ⇒ Object
Returns the value of attribute immediateDeliveryFlag.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def immediateDeliveryFlag @immediateDeliveryFlag end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def end |
#objectId ⇒ Object
Returns the value of attribute objectId.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def objectId @objectId end |
#richUrl ⇒ Object
Returns the value of attribute richUrl.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def richUrl @richUrl end |
#searchCondition ⇒ Object
Returns the value of attribute searchCondition.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def searchCondition @searchCondition end |
#sound ⇒ Object
Returns the value of attribute sound.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def sound @sound end |
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def target @target end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def title @title end |
#userSettingValue ⇒ Object
Returns the value of attribute userSettingValue.
4 5 6 |
# File 'lib/ncmb/push.rb', line 4 def userSettingValue @userSettingValue end |
Instance Method Details
#save ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ncmb/push.rb', line 8 def save path = "/#{@@client.api_version}/push" queries = {} [:deliveryTime, :immediateDeliveryFlag, :target, :searchCondition, :message, :userSettingValue, :deliveryExpirationDate, :deliveryExpirationTime, :action, :title, :dialog, :badgeIncrementFlag, :badgeSetting, :sound, :contentAvailable, :richUrl, :acl].each do |name| queries[name] = send(name) unless send(name).nil? end results = @@client.post path, queries if results[:objectId].nil? self.errors = results return false end self.objectId = results[:objectId] self.createDate = results[:createDate] return true end |