You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,41 @@ For Android you will need a device running 2.3 (or newer) that also have the Goo
22
22
A version of supported Ruby, currently:
23
23
`ruby >= 2.4`
24
24
25
+
## Getting Started
26
+
To use this gem, you need to instantiate a client with your firebase credentials:
27
+
28
+
```ruby
29
+
fcm =FCM.new(
30
+
API_TOKEN,
31
+
GOOGLE_APPLICATION_CREDENTIALS_PATH,
32
+
FIREBASE_PROJECT_ID
33
+
)
34
+
```
35
+
36
+
## About the `GOOGLE_APPLICATION_CREDENTIALS_PATH`
37
+
The `GOOGLE_APPLICATION_CREDENTIALS_PATH` is meant to contain your firebase credentials.
38
+
39
+
The easiest way to provide them is to pass here an absolute path to a file with your credentials:
40
+
41
+
```ruby
42
+
fcm =FCM.new(
43
+
API_TOKEN,
44
+
'/path/to/credentials.json',
45
+
FIREBASE_PROJECT_ID
46
+
)
47
+
```
48
+
49
+
As per their secret nature, you might not want to have them in your repository. In that case, another supported solution is to pass a `StringIO` that contains your credentials:
0 commit comments