@maxim_mazurok/gapi.client.playdeveloperreporting-v1alpha1 0.0.20230112 → 0.0.20230115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://playdeveloperreporting.googleapis.com/$discovery/rest?version=v1alpha1
12
- // Revision: 20230112
12
+ // Revision: 20230115
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.playdeveloperreporting-v1alpha1",
3
- "version": "0.0.20230112",
3
+ "version": "0.0.20230115",
4
4
  "description": "TypeScript typings for Google Play Developer Reporting API v1alpha1",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -39,7 +39,28 @@ gapi.client.load('playdeveloperreporting', 'v1alpha1', () => {
39
39
  });
40
40
  ```
41
41
 
42
+ Don't forget to authenticate your client before sending any request to resources:
42
43
 
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // See metrics and data about the apps in your Google Play Developer account
49
+ 'https://www.googleapis.com/auth/playdeveloperreporting',
50
+ ],
51
+ immediate = true;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
43
64
 
44
65
  After that you can use Google Play Developer Reporting API resources: <!-- TODO: make this work for multiple namespaces -->
45
66
 
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230112
6
+ // Revision: 20230115
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -11,7 +11,22 @@ gapi.load('client', async () => {
11
11
  await gapi.client.load('https://playdeveloperreporting.googleapis.com/$discovery/rest?version=v1alpha1');
12
12
  /** now we can use gapi.client.playdeveloperreporting */
13
13
 
14
- run();
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See metrics and data about the apps in your Google Play Developer account */
19
+ 'https://www.googleapis.com/auth/playdeveloperreporting',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
15
30
 
16
31
  async function run() {
17
32
  /** Lists anomalies in any of the datasets. */