google-apis-firebasedynamiclinks_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,232 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module FirebasedynamiclinksV1
23
+ # Firebase Dynamic Links API
24
+ #
25
+ # Programmatically creates and manages Firebase Dynamic Links.
26
+ #
27
+ # @example
28
+ # require 'google/apis/firebasedynamiclinks_v1'
29
+ #
30
+ # Firebasedynamiclinks = Google::Apis::FirebasedynamiclinksV1 # Alias the module
31
+ # service = Firebasedynamiclinks::FirebaseDynamicLinksService.new
32
+ #
33
+ # @see https://firebase.google.com/docs/dynamic-links/
34
+ class FirebaseDynamicLinksService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://firebasedynamiclinks.googleapis.com/', '',
47
+ client_name: 'google-apis-firebasedynamiclinks_v1',
48
+ client_version: Google::Apis::FirebasedynamiclinksV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Creates a managed short Dynamic Link given either a valid long Dynamic Link or
53
+ # details such as Dynamic Link domain, Android and iOS app information. The
54
+ # created short Dynamic Link will not expire. This differs from
55
+ # CreateShortDynamicLink in the following ways: - The request will also contain
56
+ # a name for the link (non unique name for the front end). - The response must
57
+ # be authenticated with an auth token (generated with the admin service account).
58
+ # - The link will appear in the FDL list of links in the console front end. The
59
+ # Dynamic Link domain in the request must be owned by requester's Firebase
60
+ # project.
61
+ # @param [Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkRequest] create_managed_short_link_request_object
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # @param [Google::Apis::RequestOptions] options
68
+ # Request-specific options
69
+ #
70
+ # @yield [result, err] Result & error if block supplied
71
+ # @yieldparam result [Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkResponse] parsed result object
72
+ # @yieldparam err [StandardError] error object if request failed
73
+ #
74
+ # @return [Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkResponse]
75
+ #
76
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
79
+ def create_managed_short_link(create_managed_short_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'v1/managedShortLinks:create', options)
81
+ command.request_representation = Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkRequest::Representation
82
+ command.request_object = create_managed_short_link_request_object
83
+ command.response_representation = Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkResponse::Representation
84
+ command.response_class = Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkResponse
85
+ command.query['fields'] = fields unless fields.nil?
86
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
87
+ execute_or_queue_command(command, &block)
88
+ end
89
+
90
+ # Creates a short Dynamic Link given either a valid long Dynamic Link or details
91
+ # such as Dynamic Link domain, Android and iOS app information. The created
92
+ # short Dynamic Link will not expire. Repeated calls with the same long Dynamic
93
+ # Link or Dynamic Link information will produce the same short Dynamic Link. The
94
+ # Dynamic Link domain in the request must be owned by requester's Firebase
95
+ # project.
96
+ # @param [Google::Apis::FirebasedynamiclinksV1::CreateShortDynamicLinkRequest] create_short_dynamic_link_request_object
97
+ # @param [String] fields
98
+ # Selector specifying which fields to include in a partial response.
99
+ # @param [String] quota_user
100
+ # Available to use for quota purposes for server-side applications. Can be any
101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
102
+ # @param [Google::Apis::RequestOptions] options
103
+ # Request-specific options
104
+ #
105
+ # @yield [result, err] Result & error if block supplied
106
+ # @yieldparam result [Google::Apis::FirebasedynamiclinksV1::CreateShortDynamicLinkResponse] parsed result object
107
+ # @yieldparam err [StandardError] error object if request failed
108
+ #
109
+ # @return [Google::Apis::FirebasedynamiclinksV1::CreateShortDynamicLinkResponse]
110
+ #
111
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
112
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
113
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
114
+ def create_short_link_short_dynamic_link(create_short_dynamic_link_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
115
+ command = make_simple_command(:post, 'v1/shortLinks', options)
116
+ command.request_representation = Google::Apis::FirebasedynamiclinksV1::CreateShortDynamicLinkRequest::Representation
117
+ command.request_object = create_short_dynamic_link_request_object
118
+ command.response_representation = Google::Apis::FirebasedynamiclinksV1::CreateShortDynamicLinkResponse::Representation
119
+ command.response_class = Google::Apis::FirebasedynamiclinksV1::CreateShortDynamicLinkResponse
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Fetches analytics stats of a short Dynamic Link for a given duration. Metrics
126
+ # include number of clicks, redirects, installs, app first opens, and app
127
+ # reopens.
128
+ # @param [String] dynamic_link
129
+ # Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz
130
+ # @param [Fixnum] duration_days
131
+ # The span of time requested in days.
132
+ # @param [String] sdk_version
133
+ # Google SDK version. Version takes the form "$major.$minor.$patch"
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::FirebasedynamiclinksV1::DynamicLinkStats] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::FirebasedynamiclinksV1::DynamicLinkStats]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def get_link_stats(dynamic_link, duration_days: nil, sdk_version: nil, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:get, 'v1/{dynamicLink}/linkStats', options)
153
+ command.response_representation = Google::Apis::FirebasedynamiclinksV1::DynamicLinkStats::Representation
154
+ command.response_class = Google::Apis::FirebasedynamiclinksV1::DynamicLinkStats
155
+ command.params['dynamicLink'] = dynamic_link unless dynamic_link.nil?
156
+ command.query['durationDays'] = duration_days unless duration_days.nil?
157
+ command.query['sdkVersion'] = sdk_version unless sdk_version.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ execute_or_queue_command(command, &block)
161
+ end
162
+
163
+ # Get iOS strong/weak-match info for post-install attribution.
164
+ # @param [Google::Apis::FirebasedynamiclinksV1::GetIosPostInstallAttributionRequest] get_ios_post_install_attribution_request_object
165
+ # @param [String] fields
166
+ # Selector specifying which fields to include in a partial response.
167
+ # @param [String] quota_user
168
+ # Available to use for quota purposes for server-side applications. Can be any
169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
170
+ # @param [Google::Apis::RequestOptions] options
171
+ # Request-specific options
172
+ #
173
+ # @yield [result, err] Result & error if block supplied
174
+ # @yieldparam result [Google::Apis::FirebasedynamiclinksV1::GetIosPostInstallAttributionResponse] parsed result object
175
+ # @yieldparam err [StandardError] error object if request failed
176
+ #
177
+ # @return [Google::Apis::FirebasedynamiclinksV1::GetIosPostInstallAttributionResponse]
178
+ #
179
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
180
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
181
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
182
+ def install_attribution(get_ios_post_install_attribution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
183
+ command = make_simple_command(:post, 'v1/installAttribution', options)
184
+ command.request_representation = Google::Apis::FirebasedynamiclinksV1::GetIosPostInstallAttributionRequest::Representation
185
+ command.request_object = get_ios_post_install_attribution_request_object
186
+ command.response_representation = Google::Apis::FirebasedynamiclinksV1::GetIosPostInstallAttributionResponse::Representation
187
+ command.response_class = Google::Apis::FirebasedynamiclinksV1::GetIosPostInstallAttributionResponse
188
+ command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ execute_or_queue_command(command, &block)
191
+ end
192
+
193
+ # Get iOS reopen attribution for app universal link open deeplinking.
194
+ # @param [Google::Apis::FirebasedynamiclinksV1::GetIosReopenAttributionRequest] get_ios_reopen_attribution_request_object
195
+ # @param [String] fields
196
+ # Selector specifying which fields to include in a partial response.
197
+ # @param [String] quota_user
198
+ # Available to use for quota purposes for server-side applications. Can be any
199
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
200
+ # @param [Google::Apis::RequestOptions] options
201
+ # Request-specific options
202
+ #
203
+ # @yield [result, err] Result & error if block supplied
204
+ # @yieldparam result [Google::Apis::FirebasedynamiclinksV1::GetIosReopenAttributionResponse] parsed result object
205
+ # @yieldparam err [StandardError] error object if request failed
206
+ #
207
+ # @return [Google::Apis::FirebasedynamiclinksV1::GetIosReopenAttributionResponse]
208
+ #
209
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
210
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
211
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
212
+ def reopen_attribution(get_ios_reopen_attribution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
213
+ command = make_simple_command(:post, 'v1/reopenAttribution', options)
214
+ command.request_representation = Google::Apis::FirebasedynamiclinksV1::GetIosReopenAttributionRequest::Representation
215
+ command.request_object = get_ios_reopen_attribution_request_object
216
+ command.response_representation = Google::Apis::FirebasedynamiclinksV1::GetIosReopenAttributionResponse::Representation
217
+ command.response_class = Google::Apis::FirebasedynamiclinksV1::GetIosReopenAttributionResponse
218
+ command.query['fields'] = fields unless fields.nil?
219
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
220
+ execute_or_queue_command(command, &block)
221
+ end
222
+
223
+ protected
224
+
225
+ def apply_command_defaults(command)
226
+ command.query['key'] = key unless key.nil?
227
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
228
+ end
229
+ end
230
+ end
231
+ end
232
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-firebasedynamiclinks_v1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ description: This is the simple REST client for Firebase Dynamic Links API V1. Simple
28
+ REST clients are Ruby client libraries that provide access to Google services via
29
+ their HTTP REST API endpoints. These libraries are generated and updated automatically
30
+ based on the discovery documents published by the service, and they handle most
31
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
32
+ use this client to access the Firebase Dynamic Links API, but note that some services
33
+ may provide a separate modern client that is easier to use.
34
+ email: googleapis-packages@google.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - ".yardopts"
40
+ - CHANGELOG.md
41
+ - LICENSE.md
42
+ - OVERVIEW.md
43
+ - lib/google-apis-firebasedynamiclinks_v1.rb
44
+ - lib/google/apis/firebasedynamiclinks_v1.rb
45
+ - lib/google/apis/firebasedynamiclinks_v1/classes.rb
46
+ - lib/google/apis/firebasedynamiclinks_v1/gem_version.rb
47
+ - lib/google/apis/firebasedynamiclinks_v1/representations.rb
48
+ - lib/google/apis/firebasedynamiclinks_v1/service.rb
49
+ homepage: https://github.com/google/google-api-ruby-client
50
+ licenses:
51
+ - Apache-2.0
52
+ metadata:
53
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-firebasedynamiclinks_v1/CHANGELOG.md
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-firebasedynamiclinks_v1/v0.1.0
56
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-firebasedynamiclinks_v1
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '2.4'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Simple REST client for Firebase Dynamic Links API V1
76
+ test_files: []