@maxim_mazurok/gapi.client.slides-v1 0.0.20231115 → 0.0.20231205

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.slides-v1",
3
- "version": "0.0.20231115",
3
+ "version": "0.0.20231205",
4
4
  "description": "TypeScript typings for Google Slides API v1",
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://slides.googleapis.com/$discovery/rest?version=v1', () => {
29
- // now we can use:
30
- // gapi.client.slides
31
- });
28
+ gapi.client.load(
29
+ 'https://slides.googleapis.com/$discovery/rest?version=v1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.slides
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,57 +48,59 @@ 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, edit, create, and delete only the specific Google Drive files you use with this app
52
- 'https://www.googleapis.com/auth/drive.file',
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',
53
56
 
54
- // See and download all your Google Drive files
55
- 'https://www.googleapis.com/auth/drive.readonly',
57
+ // See and download all your Google Drive files
58
+ 'https://www.googleapis.com/auth/drive.readonly',
56
59
 
57
- // See, edit, create, and delete all your Google Slides presentations
58
- 'https://www.googleapis.com/auth/presentations',
60
+ // See, edit, create, and delete all your Google Slides presentations
61
+ 'https://www.googleapis.com/auth/presentations',
59
62
 
60
- // See all your Google Slides presentations
61
- 'https://www.googleapis.com/auth/presentations.readonly',
63
+ // See all your Google Slides presentations
64
+ 'https://www.googleapis.com/auth/presentations.readonly',
62
65
 
63
- // See, edit, create, and delete all your Google Sheets spreadsheets
64
- 'https://www.googleapis.com/auth/spreadsheets',
66
+ // See, edit, create, and delete all your Google Sheets spreadsheets
67
+ 'https://www.googleapis.com/auth/spreadsheets',
65
68
 
66
- // See all your Google Sheets spreadsheets
67
- 'https://www.googleapis.com/auth/spreadsheets.readonly',
68
- ],
69
- immediate = true;
69
+ // See all your Google Sheets spreadsheets
70
+ 'https://www.googleapis.com/auth/spreadsheets.readonly',
71
+ ],
72
+ immediate = true;
70
73
  // ...
71
74
 
72
75
  gapi.auth.authorize(
73
- { client_id: client_id, scope: scope, immediate: immediate },
76
+ {client_id: client_id, scope: scope, immediate: immediate},
74
77
  authResult => {
75
78
  if (authResult && !authResult.error) {
76
- /* handle successful authorization */
79
+ /* handle successful authorization */
77
80
  } else {
78
- /* handle authorization error */
81
+ /* handle authorization error */
79
82
  }
80
- });
83
+ }
84
+ );
81
85
  ```
82
86
 
83
87
  After that you can use Google Slides API resources: <!-- TODO: make this work for multiple namespaces -->
84
88
 
85
89
  ```typescript
86
-
87
90
  /*
88
91
  Applies one or more updates to the presentation. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies: the reply to the third request, and another empty reply, in that order. Because other users may be editing the presentation, the presentation might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the presentation should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.
89
92
  */
90
- await gapi.client.slides.presentations.batchUpdate({ presentationId: "presentationId", });
93
+ await gapi.client.slides.presentations.batchUpdate({
94
+ presentationId: 'presentationId',
95
+ });
91
96
 
92
97
  /*
93
98
  Creates a blank presentation using the title given in the request. If a `presentationId` is provided, it is used as the ID of the new presentation. Otherwise, a new ID is generated. Other fields in the request, including any provided content, are ignored. Returns the created presentation.
94
99
  */
95
- await gapi.client.slides.presentations.create({ });
100
+ await gapi.client.slides.presentations.create({});
96
101
 
97
102
  /*
98
103
  Gets the latest version of the specified presentation.
99
104
  */
100
- await gapi.client.slides.presentations.get({ presentationId: "presentationId", });
105
+ await gapi.client.slides.presentations.get({presentationId: 'presentationId'});
101
106
  ```