1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\FirebaseDynamicLinks\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\FirebaseDynamicLinks\DynamicLinkStats;
|
---|
21 | use Google\Service\FirebaseDynamicLinks\GetIosPostInstallAttributionRequest;
|
---|
22 | use Google\Service\FirebaseDynamicLinks\GetIosPostInstallAttributionResponse;
|
---|
23 | use Google\Service\FirebaseDynamicLinks\GetIosReopenAttributionRequest;
|
---|
24 | use Google\Service\FirebaseDynamicLinks\GetIosReopenAttributionResponse;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "v1" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $firebasedynamiclinksService = new Google\Service\FirebaseDynamicLinks(...);
|
---|
31 | * $v1 = $firebasedynamiclinksService->v1;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class V1 extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Fetches analytics stats of a short Dynamic Link for a given duration. Metrics
|
---|
38 | * include number of clicks, redirects, installs, app first opens, and app
|
---|
39 | * reopens. (v1.getLinkStats)
|
---|
40 | *
|
---|
41 | * @param string $dynamicLink Dynamic Link URL. e.g.
|
---|
42 | * https://abcd.app.goo.gl/wxyz
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | *
|
---|
45 | * @opt_param string durationDays The span of time requested in days.
|
---|
46 | * @opt_param string sdkVersion Google SDK version. Version takes the form
|
---|
47 | * "$major.$minor.$patch"
|
---|
48 | * @return DynamicLinkStats
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function getLinkStats($dynamicLink, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['dynamicLink' => $dynamicLink];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('getLinkStats', [$params], DynamicLinkStats::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Get iOS strong/weak-match info for post-install attribution.
|
---|
59 | * (v1.installAttribution)
|
---|
60 | *
|
---|
61 | * @param GetIosPostInstallAttributionRequest $postBody
|
---|
62 | * @param array $optParams Optional parameters.
|
---|
63 | * @return GetIosPostInstallAttributionResponse
|
---|
64 | * @throws \Google\Service\Exception
|
---|
65 | */
|
---|
66 | public function installAttribution(GetIosPostInstallAttributionRequest $postBody, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['postBody' => $postBody];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('installAttribution', [$params], GetIosPostInstallAttributionResponse::class);
|
---|
71 | }
|
---|
72 | /**
|
---|
73 | * Get iOS reopen attribution for app universal link open deeplinking.
|
---|
74 | * (v1.reopenAttribution)
|
---|
75 | *
|
---|
76 | * @param GetIosReopenAttributionRequest $postBody
|
---|
77 | * @param array $optParams Optional parameters.
|
---|
78 | * @return GetIosReopenAttributionResponse
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function reopenAttribution(GetIosReopenAttributionRequest $postBody, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['postBody' => $postBody];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('reopenAttribution', [$params], GetIosReopenAttributionResponse::class);
|
---|
86 | }
|
---|
87 | }
|
---|
88 |
|
---|
89 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
90 | class_alias(V1::class, 'Google_Service_FirebaseDynamicLinks_Resource_V1');
|
---|