Sha256: e7c81f067e06fd5f22c952b793a8465de35698e5bb8fdd8c899ff667179abf57

Contents?: true

Size: 675 Bytes

Versions: 5

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

module NCMB
  class Push < NCMB::Object
    include NCMB
    
    def initialize(params = {})
      [:deliveryTime, :immediateDeliveryFlag, :target, :searchCondition, :message,
      :userSettingValue, :deliveryExpirationDate, :deliveryExpirationTime, :action, :title, :dialog,
      :badgeIncrementFlag, :badgeSetting, :sound, :contentAvailable, :richUrl].each do |name|
        params[name] = nil unless params[name]
      end
      @search_key = :search_condition
      @queries = {}
      @queries[@search_key] = []
      super('push', params)
    end
    
    def base_path
      "/#{@@client.api_version}/#{@name}"
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ncmb-ruby-client-0.2.0 lib/ncmb/push.rb
ncmb-ruby-client-0.1.7 lib/ncmb/push.rb
ncmb-ruby-client-0.1.6 lib/ncmb/push.rb
ncmb-ruby-client-0.1.5 lib/ncmb/push.rb
ncmb-ruby-client-0.1.4 lib/ncmb/push.rb