Sha256: 7a7585e84844954a671859bc500c091201d7345b9de60f6552ad8ed53211362f

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

class NotificationPusher::OneSignal

    def initialize notification, options = {}
        if options[:player_ids].any?
            OneSignal::Notification.create params: {
                app_id: options[:app_id],
                url: options[:url] || notification.metadata[:onesignal_url],
                contents: options[:contents] || notification.metadata[:onesignal_contents].to_h,
                include_player_ids: options[:player_ids]
    		}, opts: { auth_key: options[:auth_key] }
        end
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notification-pusher-onesignal-1.0.0.beta10 lib/notification_pusher/one_signal.rb