File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ require 'fcm/connection'
4+ require 'fcm/response'
5+ require 'fcm/client/notification_delivery'
6+ require 'fcm/client/notification_setting'
7+ require 'fcm/client/instance_topic_management'
8+
9+ module Fcm
10+ # Fcm Client class for legacy http protocol API connections
11+ #
12+ # @see https://firebase.google.com/docs/cloud-messaging/http-server-ref
13+ class Client
14+ include Fcm ::Connection
15+ include Fcm ::Response
16+ include Fcm ::Client ::NotificationDilivery
17+ include Fcm ::Client ::NotificationSetting
18+ include Fcm ::Client ::InstanceTopicManagement
19+
20+ # @see https://firebase.google.com/docs/projects/api-keys
21+ # @param api_key [String] Firebase API key
22+ # @return [Client] client instance
23+ def initialize ( api_key )
24+ @api_key = api_key
25+ end
26+
27+ private
28+
29+ def authorization_headers
30+ {
31+ 'Content-Type' => 'application/json' ,
32+ 'Authorization' => "key=#{ @api_key } "
33+ }
34+ end
35+ end
36+ end
You can’t perform that action at this time.
0 commit comments