@maxim_mazurok/gapi.client.drive-v3 0.0.20231112 → 0.0.20231120

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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.drive-v3",
3
- "version": "0.0.20231112",
3
+ "version": "0.0.20231120",
4
4
  "description": "TypeScript typings for Google Drive API v3",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
5
9
  "license": "MIT",
6
10
  "author": {
7
- "email": "maxim@mazurok.com",
8
11
  "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
9
13
  "url": "https://maxim.mazurok.com"
10
14
  },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
- },
15
15
  "types": "index.d.ts",
16
16
  "dependencies": {
17
17
  "@types/gapi.client": "*",
package/readme.md CHANGED
@@ -25,10 +25,13 @@ gapi.load('client', () => {
25
25
  Then load api client wrapper:
26
26
 
27
27
  ```typescript
28
- gapi.client.load('https://www.googleapis.com/discovery/v1/apis/drive/v3/rest', () => {
29
- // now we can use:
30
- // gapi.client.drive
31
- });
28
+ gapi.client.load(
29
+ 'https://www.googleapis.com/discovery/v1/apis/drive/v3/rest',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.drive
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,42 +48,43 @@ Don't forget to authenticate your client before sending any request to resources
45
48
  // declare client_id registered in Google Developers Console
46
49
  var client_id = '',
47
50
  scope = [
48
- // See, edit, create, and delete all of your Google Drive files
49
- 'https://www.googleapis.com/auth/drive',
51
+ // See, edit, create, and delete all of your Google Drive files
52
+ 'https://www.googleapis.com/auth/drive',
50
53
 
51
- // See, create, and delete its own configuration data in your Google Drive
52
- 'https://www.googleapis.com/auth/drive.appdata',
54
+ // See, create, and delete its own configuration data in your Google Drive
55
+ 'https://www.googleapis.com/auth/drive.appdata',
53
56
 
54
- // See, edit, create, and delete only the specific Google Drive files you use with this app
55
- 'https://www.googleapis.com/auth/drive.file',
57
+ // See, edit, create, and delete only the specific Google Drive files you use with this app
58
+ 'https://www.googleapis.com/auth/drive.file',
56
59
 
57
- // View and manage metadata of files in your Google Drive
58
- 'https://www.googleapis.com/auth/drive.metadata',
60
+ // View and manage metadata of files in your Google Drive
61
+ 'https://www.googleapis.com/auth/drive.metadata',
59
62
 
60
- // See information about your Google Drive files
61
- 'https://www.googleapis.com/auth/drive.metadata.readonly',
63
+ // See information about your Google Drive files
64
+ 'https://www.googleapis.com/auth/drive.metadata.readonly',
62
65
 
63
- // View the photos, videos and albums in your Google Photos
64
- 'https://www.googleapis.com/auth/drive.photos.readonly',
66
+ // View the photos, videos and albums in your Google Photos
67
+ 'https://www.googleapis.com/auth/drive.photos.readonly',
65
68
 
66
- // See and download all your Google Drive files
67
- 'https://www.googleapis.com/auth/drive.readonly',
69
+ // See and download all your Google Drive files
70
+ 'https://www.googleapis.com/auth/drive.readonly',
68
71
 
69
- // Modify your Google Apps Script scripts' behavior
70
- 'https://www.googleapis.com/auth/drive.scripts',
71
- ],
72
- immediate = true;
72
+ // Modify your Google Apps Script scripts' behavior
73
+ 'https://www.googleapis.com/auth/drive.scripts',
74
+ ],
75
+ immediate = true;
73
76
  // ...
74
77
 
75
78
  gapi.auth.authorize(
76
- { client_id: client_id, scope: scope, immediate: immediate },
79
+ {client_id: client_id, scope: scope, immediate: immediate},
77
80
  authResult => {
78
81
  if (authResult && !authResult.error) {
79
- /* handle successful authorization */
82
+ /* handle successful authorization */
80
83
  } else {
81
- /* handle authorization error */
84
+ /* handle authorization error */
82
85
  }
83
- });
86
+ }
87
+ );
84
88
  ```
85
89
 
86
90
  After that you can use Google Drive API resources: <!-- TODO: make this work for multiple namespaces -->