firebase_dynamic_link 1.0.5 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/coverage.yml +1 -1
- data/README.md +13 -2
- data/lib/firebase_dynamic_link/client.rb +5 -4
- data/lib/firebase_dynamic_link/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8674b44e3f8742867c46b5b61c5337e8e85f57644a715996336ee27ff3a53369
|
4
|
+
data.tar.gz: 46c54ae920029f11f03f32329bfe49ad884345b4aab986b206a50505509b6b54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e91c5a93e650ba597ce2ab03d76db9d48ef1fae276ca4fd0447aafcd423d3fc3366d2fc12dfbb62204d037a2eadbcf9d92b59d78b8be0e7b924b8fd1fe70fad
|
7
|
+
data.tar.gz: 8aa69a65b06a2fa9019f2e380eadb3373df55672d10a53ebf096a00dba3601aff6b0eee9ae7a5900b92bf786d4f13312ef78b3431ccf2bea418c42b060a04c6f
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
- name: Set up Ruby
|
16
16
|
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
17
17
|
with:
|
18
|
-
ruby-version:
|
18
|
+
ruby-version: 3.0
|
19
19
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
20
20
|
- name: Install cc-test-reporter and prebuild notification
|
21
21
|
run: |
|
data/README.md
CHANGED
@@ -11,6 +11,7 @@ Firebase Dynamic Link is a tool to create a deep link of your webpage. It can be
|
|
11
11
|
- [Configure the HTTP client](#configure-the-http-client)
|
12
12
|
- [Shorten a link](#shorten-a-link)
|
13
13
|
- [Shorten parameters](#shorten-parameters)
|
14
|
+
- [More than one firebase project](#more-than-one-firebase-project)
|
14
15
|
- [CHANGELOG](#changelog)
|
15
16
|
- [V1.0.5](#v105)
|
16
17
|
- [V1.0.3](#v103)
|
@@ -56,8 +57,8 @@ Or install it yourself as:
|
|
56
57
|
# Faraday.default_adapter is the default adapter
|
57
58
|
config.adapter = :httpclient # optional, default is net_http
|
58
59
|
|
59
|
-
# required
|
60
|
-
config.api_key = 'API_KEY'
|
60
|
+
# required, taken as default firebase api key when api_key parameter isn't passed to FirebaseDynamicLink::Client constructor
|
61
|
+
config.api_key = 'API_KEY'
|
61
62
|
|
62
63
|
# default 'UNGUESSABLE'
|
63
64
|
config.suffix_option = 'SHORT' or 'UNGUESSABLE'
|
@@ -159,6 +160,16 @@ Or if the request reached daily quota, client will throw `FirebaseDynamicLink::Q
|
|
159
160
|
|
160
161
|
Otherwise it will throw `FirebaseDynamicLink::ConnectionError` error, with message = http error message
|
161
162
|
|
163
|
+
### More than one firebase project
|
164
|
+
|
165
|
+
If you have more than one firebase project you can pass your `api_key` to `FirebaseDynamicLink::Client` constructor additionally to `FirebaseDynamicLink` configuration.
|
166
|
+
Api key provided by constructor has precendece over this provided by `FirebaseDynamicLink` configuration.
|
167
|
+
|
168
|
+
```
|
169
|
+
client = FirebaseDynamicLink::Client.new(api_key: 'API_KEY')
|
170
|
+
```
|
171
|
+
|
172
|
+
|
162
173
|
## CHANGELOG
|
163
174
|
|
164
175
|
### V1.0.5
|
@@ -10,9 +10,10 @@ module FirebaseDynamicLink
|
|
10
10
|
class Client
|
11
11
|
extend Forwardable
|
12
12
|
|
13
|
-
def initialize
|
13
|
+
def initialize(api_key: config.api_key)
|
14
14
|
@link_renderer = FirebaseDynamicLink::LinkRenderer.new
|
15
|
-
|
15
|
+
short_links_url = end_point(api_key)
|
16
|
+
@connection = FirebaseDynamicLink::Connection.new(short_links_url)
|
16
17
|
end
|
17
18
|
|
18
19
|
# @param link [String] required
|
@@ -156,8 +157,8 @@ module FirebaseDynamicLink
|
|
156
157
|
"#{dynamic_link_domain}?link=#{link}"
|
157
158
|
end
|
158
159
|
|
159
|
-
def end_point
|
160
|
-
"https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=#{
|
160
|
+
def end_point(api_key)
|
161
|
+
"https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=#{api_key}"
|
161
162
|
end
|
162
163
|
end
|
163
164
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firebase_dynamic_link
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M Saiqul Haq
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: case_transform2
|