@googleapis/slides 1.3.0 → 3.0.1
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/CHANGELOG.md +44 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +328 -11
- package/build/v1.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +346 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/slides-v3.0.0...slides-v3.0.1) (2025-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **slides:** update the API ([e29bc35](https://github.com/googleapis/google-api-nodejs-client/commit/e29bc35db642950db29d8e1d7a28d940dd0ed290))
|
|
9
|
+
* **slides:** update the API ([89de22e](https://github.com/googleapis/google-api-nodejs-client/commit/89de22eb5d4a790870a23e4c380bad271cad5fbf))
|
|
10
|
+
|
|
11
|
+
## [3.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/slides-v2.0.1...slides-v3.0.0) (2025-06-30)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* upgrade to node 18
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **slides:** update the API ([e4ae19d](https://github.com/googleapis/google-api-nodejs-client/commit/e4ae19df9b9feb7da987c0bc320f36906b8313ed))
|
|
21
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
27
|
+
* **slides:** update the API ([89de22e](https://github.com/googleapis/google-api-nodejs-client/commit/89de22eb5d4a790870a23e4c380bad271cad5fbf))
|
|
28
|
+
|
|
29
|
+
## [2.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/slides-v2.0.0...slides-v2.0.1) (2025-06-04)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
35
|
+
|
|
36
|
+
## [2.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/slides-v1.3.0...slides-v2.0.0) (2025-05-29)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### ⚠ BREAKING CHANGES
|
|
40
|
+
|
|
41
|
+
* upgrade to node 18
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
46
|
+
|
|
3
47
|
## [1.3.0](https://github.com/googleapis/google-api-nodejs-client/compare/slides-v1.2.4...slides-v1.3.0) (2025-05-05)
|
|
4
48
|
|
|
5
49
|
|
package/build/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export declare function slides(options: slides_v1.Options): slides_v1.Slides;
|
|
|
9
9
|
declare const auth: AuthPlus;
|
|
10
10
|
export { auth };
|
|
11
11
|
export { slides_v1 };
|
|
12
|
-
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions,
|
|
12
|
+
export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,kCAAkC;AAElC,yDAAuE;AACvE,6BAA+B;AAiBvB,0FAjBA,cAAS,OAiBA;AAfJ,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,cAAS,CAAC,MAAM;CACrB,CAAC;AAIF,SAAgB,MAAM,CAEpB,gBAA0C;IAE1C,OAAO,IAAA,0BAAM,EAAI,QAAQ,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC/D,CAAC;AALD,wBAKC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAEZ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,kCAAkC;AAElC,yDAAuE;AACvE,6BAA+B;AAiBvB,0FAjBA,cAAS,OAiBA;AAfJ,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,cAAS,CAAC,MAAM;CACrB,CAAC;AAIF,SAAgB,MAAM,CAEpB,gBAA0C;IAE1C,OAAO,IAAA,0BAAM,EAAI,QAAQ,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC/D,CAAC;AALD,wBAKC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAEZ,uDAQ2B;AAPzB,6GAAA,QAAQ,OAAA"}
|
package/build/v1.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient,
|
|
2
|
+
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
export declare namespace slides_v1 {
|
|
5
5
|
export interface Options extends GlobalOptions {
|
|
@@ -2623,42 +2623,237 @@ export declare namespace slides_v1 {
|
|
|
2623
2623
|
constructor(context: APIRequestContext);
|
|
2624
2624
|
/**
|
|
2625
2625
|
* 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.
|
|
2626
|
+
* @example
|
|
2627
|
+
* ```js
|
|
2628
|
+
* // Before running the sample:
|
|
2629
|
+
* // - Enable the API at:
|
|
2630
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2631
|
+
* // - Login into gcloud by running:
|
|
2632
|
+
* // ```sh
|
|
2633
|
+
* // $ gcloud auth application-default login
|
|
2634
|
+
* // ```
|
|
2635
|
+
* // - Install the npm module by running:
|
|
2636
|
+
* // ```sh
|
|
2637
|
+
* // $ npm install googleapis
|
|
2638
|
+
* // ```
|
|
2639
|
+
*
|
|
2640
|
+
* const {google} = require('googleapis');
|
|
2641
|
+
* const slides = google.slides('v1');
|
|
2642
|
+
*
|
|
2643
|
+
* async function main() {
|
|
2644
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2645
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2646
|
+
* scopes: [
|
|
2647
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2648
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2649
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
2650
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2651
|
+
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
2652
|
+
* 'https://www.googleapis.com/auth/spreadsheets.readonly',
|
|
2653
|
+
* ],
|
|
2654
|
+
* });
|
|
2655
|
+
*
|
|
2656
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2657
|
+
* const authClient = await auth.getClient();
|
|
2658
|
+
* google.options({auth: authClient});
|
|
2659
|
+
*
|
|
2660
|
+
* // Do the magic
|
|
2661
|
+
* const res = await slides.presentations.batchUpdate({
|
|
2662
|
+
* // The presentation to apply the updates to.
|
|
2663
|
+
* presentationId: 'placeholder-value',
|
|
2664
|
+
*
|
|
2665
|
+
* // Request body metadata
|
|
2666
|
+
* requestBody: {
|
|
2667
|
+
* // request body parameters
|
|
2668
|
+
* // {
|
|
2669
|
+
* // "requests": [],
|
|
2670
|
+
* // "writeControl": {}
|
|
2671
|
+
* // }
|
|
2672
|
+
* },
|
|
2673
|
+
* });
|
|
2674
|
+
* console.log(res.data);
|
|
2675
|
+
*
|
|
2676
|
+
* // Example response
|
|
2677
|
+
* // {
|
|
2678
|
+
* // "presentationId": "my_presentationId",
|
|
2679
|
+
* // "replies": [],
|
|
2680
|
+
* // "writeControl": {}
|
|
2681
|
+
* // }
|
|
2682
|
+
* }
|
|
2683
|
+
*
|
|
2684
|
+
* main().catch(e => {
|
|
2685
|
+
* console.error(e);
|
|
2686
|
+
* throw e;
|
|
2687
|
+
* });
|
|
2688
|
+
*
|
|
2689
|
+
* ```
|
|
2626
2690
|
*
|
|
2627
2691
|
* @param params - Parameters for request
|
|
2628
2692
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2629
2693
|
* @param callback - Optional callback that handles the response.
|
|
2630
2694
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2631
2695
|
*/
|
|
2632
|
-
batchUpdate(params: Params$Resource$Presentations$Batchupdate, options: StreamMethodOptions):
|
|
2633
|
-
batchUpdate(params?: Params$Resource$Presentations$Batchupdate, options?: MethodOptions):
|
|
2696
|
+
batchUpdate(params: Params$Resource$Presentations$Batchupdate, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2697
|
+
batchUpdate(params?: Params$Resource$Presentations$Batchupdate, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchUpdatePresentationResponse>>;
|
|
2634
2698
|
batchUpdate(params: Params$Resource$Presentations$Batchupdate, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2635
2699
|
batchUpdate(params: Params$Resource$Presentations$Batchupdate, options: MethodOptions | BodyResponseCallback<Schema$BatchUpdatePresentationResponse>, callback: BodyResponseCallback<Schema$BatchUpdatePresentationResponse>): void;
|
|
2636
2700
|
batchUpdate(params: Params$Resource$Presentations$Batchupdate, callback: BodyResponseCallback<Schema$BatchUpdatePresentationResponse>): void;
|
|
2637
2701
|
batchUpdate(callback: BodyResponseCallback<Schema$BatchUpdatePresentationResponse>): void;
|
|
2638
2702
|
/**
|
|
2639
2703
|
* 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.
|
|
2704
|
+
* @example
|
|
2705
|
+
* ```js
|
|
2706
|
+
* // Before running the sample:
|
|
2707
|
+
* // - Enable the API at:
|
|
2708
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2709
|
+
* // - Login into gcloud by running:
|
|
2710
|
+
* // ```sh
|
|
2711
|
+
* // $ gcloud auth application-default login
|
|
2712
|
+
* // ```
|
|
2713
|
+
* // - Install the npm module by running:
|
|
2714
|
+
* // ```sh
|
|
2715
|
+
* // $ npm install googleapis
|
|
2716
|
+
* // ```
|
|
2717
|
+
*
|
|
2718
|
+
* const {google} = require('googleapis');
|
|
2719
|
+
* const slides = google.slides('v1');
|
|
2720
|
+
*
|
|
2721
|
+
* async function main() {
|
|
2722
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2723
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2724
|
+
* scopes: [
|
|
2725
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2726
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2727
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2728
|
+
* ],
|
|
2729
|
+
* });
|
|
2730
|
+
*
|
|
2731
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2732
|
+
* const authClient = await auth.getClient();
|
|
2733
|
+
* google.options({auth: authClient});
|
|
2734
|
+
*
|
|
2735
|
+
* // Do the magic
|
|
2736
|
+
* const res = await slides.presentations.create({
|
|
2737
|
+
* // Request body metadata
|
|
2738
|
+
* requestBody: {
|
|
2739
|
+
* // request body parameters
|
|
2740
|
+
* // {
|
|
2741
|
+
* // "layouts": [],
|
|
2742
|
+
* // "locale": "my_locale",
|
|
2743
|
+
* // "masters": [],
|
|
2744
|
+
* // "notesMaster": {},
|
|
2745
|
+
* // "pageSize": {},
|
|
2746
|
+
* // "presentationId": "my_presentationId",
|
|
2747
|
+
* // "revisionId": "my_revisionId",
|
|
2748
|
+
* // "slides": [],
|
|
2749
|
+
* // "title": "my_title"
|
|
2750
|
+
* // }
|
|
2751
|
+
* },
|
|
2752
|
+
* });
|
|
2753
|
+
* console.log(res.data);
|
|
2754
|
+
*
|
|
2755
|
+
* // Example response
|
|
2756
|
+
* // {
|
|
2757
|
+
* // "layouts": [],
|
|
2758
|
+
* // "locale": "my_locale",
|
|
2759
|
+
* // "masters": [],
|
|
2760
|
+
* // "notesMaster": {},
|
|
2761
|
+
* // "pageSize": {},
|
|
2762
|
+
* // "presentationId": "my_presentationId",
|
|
2763
|
+
* // "revisionId": "my_revisionId",
|
|
2764
|
+
* // "slides": [],
|
|
2765
|
+
* // "title": "my_title"
|
|
2766
|
+
* // }
|
|
2767
|
+
* }
|
|
2768
|
+
*
|
|
2769
|
+
* main().catch(e => {
|
|
2770
|
+
* console.error(e);
|
|
2771
|
+
* throw e;
|
|
2772
|
+
* });
|
|
2773
|
+
*
|
|
2774
|
+
* ```
|
|
2640
2775
|
*
|
|
2641
2776
|
* @param params - Parameters for request
|
|
2642
2777
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2643
2778
|
* @param callback - Optional callback that handles the response.
|
|
2644
2779
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2645
2780
|
*/
|
|
2646
|
-
create(params: Params$Resource$Presentations$Create, options: StreamMethodOptions):
|
|
2647
|
-
create(params?: Params$Resource$Presentations$Create, options?: MethodOptions):
|
|
2781
|
+
create(params: Params$Resource$Presentations$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2782
|
+
create(params?: Params$Resource$Presentations$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Presentation>>;
|
|
2648
2783
|
create(params: Params$Resource$Presentations$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2649
2784
|
create(params: Params$Resource$Presentations$Create, options: MethodOptions | BodyResponseCallback<Schema$Presentation>, callback: BodyResponseCallback<Schema$Presentation>): void;
|
|
2650
2785
|
create(params: Params$Resource$Presentations$Create, callback: BodyResponseCallback<Schema$Presentation>): void;
|
|
2651
2786
|
create(callback: BodyResponseCallback<Schema$Presentation>): void;
|
|
2652
2787
|
/**
|
|
2653
2788
|
* Gets the latest version of the specified presentation.
|
|
2789
|
+
* @example
|
|
2790
|
+
* ```js
|
|
2791
|
+
* // Before running the sample:
|
|
2792
|
+
* // - Enable the API at:
|
|
2793
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2794
|
+
* // - Login into gcloud by running:
|
|
2795
|
+
* // ```sh
|
|
2796
|
+
* // $ gcloud auth application-default login
|
|
2797
|
+
* // ```
|
|
2798
|
+
* // - Install the npm module by running:
|
|
2799
|
+
* // ```sh
|
|
2800
|
+
* // $ npm install googleapis
|
|
2801
|
+
* // ```
|
|
2802
|
+
*
|
|
2803
|
+
* const {google} = require('googleapis');
|
|
2804
|
+
* const slides = google.slides('v1');
|
|
2805
|
+
*
|
|
2806
|
+
* async function main() {
|
|
2807
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2808
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2809
|
+
* scopes: [
|
|
2810
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2811
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2812
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
2813
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2814
|
+
* 'https://www.googleapis.com/auth/presentations.readonly',
|
|
2815
|
+
* ],
|
|
2816
|
+
* });
|
|
2817
|
+
*
|
|
2818
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2819
|
+
* const authClient = await auth.getClient();
|
|
2820
|
+
* google.options({auth: authClient});
|
|
2821
|
+
*
|
|
2822
|
+
* // Do the magic
|
|
2823
|
+
* const res = await slides.presentations.get({
|
|
2824
|
+
* // The ID of the presentation to retrieve.
|
|
2825
|
+
* presentationId: '[^/]+',
|
|
2826
|
+
* });
|
|
2827
|
+
* console.log(res.data);
|
|
2828
|
+
*
|
|
2829
|
+
* // Example response
|
|
2830
|
+
* // {
|
|
2831
|
+
* // "layouts": [],
|
|
2832
|
+
* // "locale": "my_locale",
|
|
2833
|
+
* // "masters": [],
|
|
2834
|
+
* // "notesMaster": {},
|
|
2835
|
+
* // "pageSize": {},
|
|
2836
|
+
* // "presentationId": "my_presentationId",
|
|
2837
|
+
* // "revisionId": "my_revisionId",
|
|
2838
|
+
* // "slides": [],
|
|
2839
|
+
* // "title": "my_title"
|
|
2840
|
+
* // }
|
|
2841
|
+
* }
|
|
2842
|
+
*
|
|
2843
|
+
* main().catch(e => {
|
|
2844
|
+
* console.error(e);
|
|
2845
|
+
* throw e;
|
|
2846
|
+
* });
|
|
2847
|
+
*
|
|
2848
|
+
* ```
|
|
2654
2849
|
*
|
|
2655
2850
|
* @param params - Parameters for request
|
|
2656
2851
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2657
2852
|
* @param callback - Optional callback that handles the response.
|
|
2658
2853
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2659
2854
|
*/
|
|
2660
|
-
get(params: Params$Resource$Presentations$Get, options: StreamMethodOptions):
|
|
2661
|
-
get(params?: Params$Resource$Presentations$Get, options?: MethodOptions):
|
|
2855
|
+
get(params: Params$Resource$Presentations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2856
|
+
get(params?: Params$Resource$Presentations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Presentation>>;
|
|
2662
2857
|
get(params: Params$Resource$Presentations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2663
2858
|
get(params: Params$Resource$Presentations$Get, options: MethodOptions | BodyResponseCallback<Schema$Presentation>, callback: BodyResponseCallback<Schema$Presentation>): void;
|
|
2664
2859
|
get(params: Params$Resource$Presentations$Get, callback: BodyResponseCallback<Schema$Presentation>): void;
|
|
@@ -2691,28 +2886,150 @@ export declare namespace slides_v1 {
|
|
|
2691
2886
|
constructor(context: APIRequestContext);
|
|
2692
2887
|
/**
|
|
2693
2888
|
* Gets the latest version of the specified page in the presentation.
|
|
2889
|
+
* @example
|
|
2890
|
+
* ```js
|
|
2891
|
+
* // Before running the sample:
|
|
2892
|
+
* // - Enable the API at:
|
|
2893
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2894
|
+
* // - Login into gcloud by running:
|
|
2895
|
+
* // ```sh
|
|
2896
|
+
* // $ gcloud auth application-default login
|
|
2897
|
+
* // ```
|
|
2898
|
+
* // - Install the npm module by running:
|
|
2899
|
+
* // ```sh
|
|
2900
|
+
* // $ npm install googleapis
|
|
2901
|
+
* // ```
|
|
2902
|
+
*
|
|
2903
|
+
* const {google} = require('googleapis');
|
|
2904
|
+
* const slides = google.slides('v1');
|
|
2905
|
+
*
|
|
2906
|
+
* async function main() {
|
|
2907
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2908
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2909
|
+
* scopes: [
|
|
2910
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2911
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2912
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
2913
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2914
|
+
* 'https://www.googleapis.com/auth/presentations.readonly',
|
|
2915
|
+
* ],
|
|
2916
|
+
* });
|
|
2917
|
+
*
|
|
2918
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2919
|
+
* const authClient = await auth.getClient();
|
|
2920
|
+
* google.options({auth: authClient});
|
|
2921
|
+
*
|
|
2922
|
+
* // Do the magic
|
|
2923
|
+
* const res = await slides.presentations.pages.get({
|
|
2924
|
+
* // The object ID of the page to retrieve.
|
|
2925
|
+
* pageObjectId: 'placeholder-value',
|
|
2926
|
+
* // The ID of the presentation to retrieve.
|
|
2927
|
+
* presentationId: 'placeholder-value',
|
|
2928
|
+
* });
|
|
2929
|
+
* console.log(res.data);
|
|
2930
|
+
*
|
|
2931
|
+
* // Example response
|
|
2932
|
+
* // {
|
|
2933
|
+
* // "layoutProperties": {},
|
|
2934
|
+
* // "masterProperties": {},
|
|
2935
|
+
* // "notesProperties": {},
|
|
2936
|
+
* // "objectId": "my_objectId",
|
|
2937
|
+
* // "pageElements": [],
|
|
2938
|
+
* // "pageProperties": {},
|
|
2939
|
+
* // "pageType": "my_pageType",
|
|
2940
|
+
* // "revisionId": "my_revisionId",
|
|
2941
|
+
* // "slideProperties": {}
|
|
2942
|
+
* // }
|
|
2943
|
+
* }
|
|
2944
|
+
*
|
|
2945
|
+
* main().catch(e => {
|
|
2946
|
+
* console.error(e);
|
|
2947
|
+
* throw e;
|
|
2948
|
+
* });
|
|
2949
|
+
*
|
|
2950
|
+
* ```
|
|
2694
2951
|
*
|
|
2695
2952
|
* @param params - Parameters for request
|
|
2696
2953
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2697
2954
|
* @param callback - Optional callback that handles the response.
|
|
2698
2955
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2699
2956
|
*/
|
|
2700
|
-
get(params: Params$Resource$Presentations$Pages$Get, options: StreamMethodOptions):
|
|
2701
|
-
get(params?: Params$Resource$Presentations$Pages$Get, options?: MethodOptions):
|
|
2957
|
+
get(params: Params$Resource$Presentations$Pages$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2958
|
+
get(params?: Params$Resource$Presentations$Pages$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Page>>;
|
|
2702
2959
|
get(params: Params$Resource$Presentations$Pages$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2703
2960
|
get(params: Params$Resource$Presentations$Pages$Get, options: MethodOptions | BodyResponseCallback<Schema$Page>, callback: BodyResponseCallback<Schema$Page>): void;
|
|
2704
2961
|
get(params: Params$Resource$Presentations$Pages$Get, callback: BodyResponseCallback<Schema$Page>): void;
|
|
2705
2962
|
get(callback: BodyResponseCallback<Schema$Page>): void;
|
|
2706
2963
|
/**
|
|
2707
2964
|
* Generates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image. This request counts as an [expensive read request](https://developers.google.com/workspace/slides/limits) for quota purposes.
|
|
2965
|
+
* @example
|
|
2966
|
+
* ```js
|
|
2967
|
+
* // Before running the sample:
|
|
2968
|
+
* // - Enable the API at:
|
|
2969
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2970
|
+
* // - Login into gcloud by running:
|
|
2971
|
+
* // ```sh
|
|
2972
|
+
* // $ gcloud auth application-default login
|
|
2973
|
+
* // ```
|
|
2974
|
+
* // - Install the npm module by running:
|
|
2975
|
+
* // ```sh
|
|
2976
|
+
* // $ npm install googleapis
|
|
2977
|
+
* // ```
|
|
2978
|
+
*
|
|
2979
|
+
* const {google} = require('googleapis');
|
|
2980
|
+
* const slides = google.slides('v1');
|
|
2981
|
+
*
|
|
2982
|
+
* async function main() {
|
|
2983
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2984
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2985
|
+
* scopes: [
|
|
2986
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2987
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2988
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
2989
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2990
|
+
* 'https://www.googleapis.com/auth/presentations.readonly',
|
|
2991
|
+
* ],
|
|
2992
|
+
* });
|
|
2993
|
+
*
|
|
2994
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2995
|
+
* const authClient = await auth.getClient();
|
|
2996
|
+
* google.options({auth: authClient});
|
|
2997
|
+
*
|
|
2998
|
+
* // Do the magic
|
|
2999
|
+
* const res = await slides.presentations.pages.getThumbnail({
|
|
3000
|
+
* // The object ID of the page whose thumbnail to retrieve.
|
|
3001
|
+
* pageObjectId: 'placeholder-value',
|
|
3002
|
+
* // The ID of the presentation to retrieve.
|
|
3003
|
+
* presentationId: 'placeholder-value',
|
|
3004
|
+
* // The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG.
|
|
3005
|
+
* 'thumbnailProperties.mimeType': 'placeholder-value',
|
|
3006
|
+
* // The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image.
|
|
3007
|
+
* 'thumbnailProperties.thumbnailSize': 'placeholder-value',
|
|
3008
|
+
* });
|
|
3009
|
+
* console.log(res.data);
|
|
3010
|
+
*
|
|
3011
|
+
* // Example response
|
|
3012
|
+
* // {
|
|
3013
|
+
* // "contentUrl": "my_contentUrl",
|
|
3014
|
+
* // "height": 0,
|
|
3015
|
+
* // "width": 0
|
|
3016
|
+
* // }
|
|
3017
|
+
* }
|
|
3018
|
+
*
|
|
3019
|
+
* main().catch(e => {
|
|
3020
|
+
* console.error(e);
|
|
3021
|
+
* throw e;
|
|
3022
|
+
* });
|
|
3023
|
+
*
|
|
3024
|
+
* ```
|
|
2708
3025
|
*
|
|
2709
3026
|
* @param params - Parameters for request
|
|
2710
3027
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2711
3028
|
* @param callback - Optional callback that handles the response.
|
|
2712
3029
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2713
3030
|
*/
|
|
2714
|
-
getThumbnail(params: Params$Resource$Presentations$Pages$Getthumbnail, options: StreamMethodOptions):
|
|
2715
|
-
getThumbnail(params?: Params$Resource$Presentations$Pages$Getthumbnail, options?: MethodOptions):
|
|
3031
|
+
getThumbnail(params: Params$Resource$Presentations$Pages$Getthumbnail, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3032
|
+
getThumbnail(params?: Params$Resource$Presentations$Pages$Getthumbnail, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Thumbnail>>;
|
|
2716
3033
|
getThumbnail(params: Params$Resource$Presentations$Pages$Getthumbnail, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2717
3034
|
getThumbnail(params: Params$Resource$Presentations$Pages$Getthumbnail, options: MethodOptions | BodyResponseCallback<Schema$Thumbnail>, callback: BodyResponseCallback<Schema$Thumbnail>): void;
|
|
2718
3035
|
getThumbnail(params: Params$Resource$Presentations$Pages$Getthumbnail, callback: BodyResponseCallback<Schema$Thumbnail>): void;
|
package/build/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,SAAS,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,SAAS,CAq5GzB;AAr5GD,WAAiB,SAAS;IAgExB;;;;;;;;;;OAUG;IACH,MAAa,MAAM;QAIjB,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,aAAa,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChE,CAAC;KACF;IAZY,gBAAM,SAYlB,CAAA;IA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O,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,gCAAgC,CAAC;YACpE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CACH,OAAO;wBACP,mEAAmE,CACpE,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBAC/B,MAAM,EAAE,KAAK;oBACb,UAAU,EAAE,EAAE;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;gBAClD,UAAU,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC;gBAC9C,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAAmB,UAAU,CAAC,CAAC;aACvD;QACH,CAAC;KACF;IArTY,sCAA4B,+BAqTxC,CAAA;AAgCH,CAAC,EAr5GgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAq5GzB"}
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleapis/slides",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "slides",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "webpack"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"googleapis-common": "^
|
|
31
|
+
"googleapis-common": "^8.0.2-rc.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-documenter": "^7.8.10",
|
package/v1.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -2675,6 +2675,70 @@ export namespace slides_v1 {
|
|
|
2675
2675
|
|
|
2676
2676
|
/**
|
|
2677
2677
|
* 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.
|
|
2678
|
+
* @example
|
|
2679
|
+
* ```js
|
|
2680
|
+
* // Before running the sample:
|
|
2681
|
+
* // - Enable the API at:
|
|
2682
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2683
|
+
* // - Login into gcloud by running:
|
|
2684
|
+
* // ```sh
|
|
2685
|
+
* // $ gcloud auth application-default login
|
|
2686
|
+
* // ```
|
|
2687
|
+
* // - Install the npm module by running:
|
|
2688
|
+
* // ```sh
|
|
2689
|
+
* // $ npm install googleapis
|
|
2690
|
+
* // ```
|
|
2691
|
+
*
|
|
2692
|
+
* const {google} = require('googleapis');
|
|
2693
|
+
* const slides = google.slides('v1');
|
|
2694
|
+
*
|
|
2695
|
+
* async function main() {
|
|
2696
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2697
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2698
|
+
* scopes: [
|
|
2699
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2700
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2701
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
2702
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2703
|
+
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
2704
|
+
* 'https://www.googleapis.com/auth/spreadsheets.readonly',
|
|
2705
|
+
* ],
|
|
2706
|
+
* });
|
|
2707
|
+
*
|
|
2708
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2709
|
+
* const authClient = await auth.getClient();
|
|
2710
|
+
* google.options({auth: authClient});
|
|
2711
|
+
*
|
|
2712
|
+
* // Do the magic
|
|
2713
|
+
* const res = await slides.presentations.batchUpdate({
|
|
2714
|
+
* // The presentation to apply the updates to.
|
|
2715
|
+
* presentationId: 'placeholder-value',
|
|
2716
|
+
*
|
|
2717
|
+
* // Request body metadata
|
|
2718
|
+
* requestBody: {
|
|
2719
|
+
* // request body parameters
|
|
2720
|
+
* // {
|
|
2721
|
+
* // "requests": [],
|
|
2722
|
+
* // "writeControl": {}
|
|
2723
|
+
* // }
|
|
2724
|
+
* },
|
|
2725
|
+
* });
|
|
2726
|
+
* console.log(res.data);
|
|
2727
|
+
*
|
|
2728
|
+
* // Example response
|
|
2729
|
+
* // {
|
|
2730
|
+
* // "presentationId": "my_presentationId",
|
|
2731
|
+
* // "replies": [],
|
|
2732
|
+
* // "writeControl": {}
|
|
2733
|
+
* // }
|
|
2734
|
+
* }
|
|
2735
|
+
*
|
|
2736
|
+
* main().catch(e => {
|
|
2737
|
+
* console.error(e);
|
|
2738
|
+
* throw e;
|
|
2739
|
+
* });
|
|
2740
|
+
*
|
|
2741
|
+
* ```
|
|
2678
2742
|
*
|
|
2679
2743
|
* @param params - Parameters for request
|
|
2680
2744
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2684,11 +2748,11 @@ export namespace slides_v1 {
|
|
|
2684
2748
|
batchUpdate(
|
|
2685
2749
|
params: Params$Resource$Presentations$Batchupdate,
|
|
2686
2750
|
options: StreamMethodOptions
|
|
2687
|
-
):
|
|
2751
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2688
2752
|
batchUpdate(
|
|
2689
2753
|
params?: Params$Resource$Presentations$Batchupdate,
|
|
2690
2754
|
options?: MethodOptions
|
|
2691
|
-
):
|
|
2755
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$BatchUpdatePresentationResponse>>;
|
|
2692
2756
|
batchUpdate(
|
|
2693
2757
|
params: Params$Resource$Presentations$Batchupdate,
|
|
2694
2758
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2723,8 +2787,8 @@ export namespace slides_v1 {
|
|
|
2723
2787
|
| BodyResponseCallback<Readable>
|
|
2724
2788
|
):
|
|
2725
2789
|
| void
|
|
2726
|
-
|
|
|
2727
|
-
|
|
|
2790
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$BatchUpdatePresentationResponse>>
|
|
2791
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2728
2792
|
let params = (paramsOrCallback ||
|
|
2729
2793
|
{}) as Params$Resource$Presentations$Batchupdate;
|
|
2730
2794
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2771,6 +2835,77 @@ export namespace slides_v1 {
|
|
|
2771
2835
|
|
|
2772
2836
|
/**
|
|
2773
2837
|
* 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.
|
|
2838
|
+
* @example
|
|
2839
|
+
* ```js
|
|
2840
|
+
* // Before running the sample:
|
|
2841
|
+
* // - Enable the API at:
|
|
2842
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
2843
|
+
* // - Login into gcloud by running:
|
|
2844
|
+
* // ```sh
|
|
2845
|
+
* // $ gcloud auth application-default login
|
|
2846
|
+
* // ```
|
|
2847
|
+
* // - Install the npm module by running:
|
|
2848
|
+
* // ```sh
|
|
2849
|
+
* // $ npm install googleapis
|
|
2850
|
+
* // ```
|
|
2851
|
+
*
|
|
2852
|
+
* const {google} = require('googleapis');
|
|
2853
|
+
* const slides = google.slides('v1');
|
|
2854
|
+
*
|
|
2855
|
+
* async function main() {
|
|
2856
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2857
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2858
|
+
* scopes: [
|
|
2859
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
2860
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
2861
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
2862
|
+
* ],
|
|
2863
|
+
* });
|
|
2864
|
+
*
|
|
2865
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2866
|
+
* const authClient = await auth.getClient();
|
|
2867
|
+
* google.options({auth: authClient});
|
|
2868
|
+
*
|
|
2869
|
+
* // Do the magic
|
|
2870
|
+
* const res = await slides.presentations.create({
|
|
2871
|
+
* // Request body metadata
|
|
2872
|
+
* requestBody: {
|
|
2873
|
+
* // request body parameters
|
|
2874
|
+
* // {
|
|
2875
|
+
* // "layouts": [],
|
|
2876
|
+
* // "locale": "my_locale",
|
|
2877
|
+
* // "masters": [],
|
|
2878
|
+
* // "notesMaster": {},
|
|
2879
|
+
* // "pageSize": {},
|
|
2880
|
+
* // "presentationId": "my_presentationId",
|
|
2881
|
+
* // "revisionId": "my_revisionId",
|
|
2882
|
+
* // "slides": [],
|
|
2883
|
+
* // "title": "my_title"
|
|
2884
|
+
* // }
|
|
2885
|
+
* },
|
|
2886
|
+
* });
|
|
2887
|
+
* console.log(res.data);
|
|
2888
|
+
*
|
|
2889
|
+
* // Example response
|
|
2890
|
+
* // {
|
|
2891
|
+
* // "layouts": [],
|
|
2892
|
+
* // "locale": "my_locale",
|
|
2893
|
+
* // "masters": [],
|
|
2894
|
+
* // "notesMaster": {},
|
|
2895
|
+
* // "pageSize": {},
|
|
2896
|
+
* // "presentationId": "my_presentationId",
|
|
2897
|
+
* // "revisionId": "my_revisionId",
|
|
2898
|
+
* // "slides": [],
|
|
2899
|
+
* // "title": "my_title"
|
|
2900
|
+
* // }
|
|
2901
|
+
* }
|
|
2902
|
+
*
|
|
2903
|
+
* main().catch(e => {
|
|
2904
|
+
* console.error(e);
|
|
2905
|
+
* throw e;
|
|
2906
|
+
* });
|
|
2907
|
+
*
|
|
2908
|
+
* ```
|
|
2774
2909
|
*
|
|
2775
2910
|
* @param params - Parameters for request
|
|
2776
2911
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2780,11 +2915,11 @@ export namespace slides_v1 {
|
|
|
2780
2915
|
create(
|
|
2781
2916
|
params: Params$Resource$Presentations$Create,
|
|
2782
2917
|
options: StreamMethodOptions
|
|
2783
|
-
):
|
|
2918
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2784
2919
|
create(
|
|
2785
2920
|
params?: Params$Resource$Presentations$Create,
|
|
2786
2921
|
options?: MethodOptions
|
|
2787
|
-
):
|
|
2922
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Presentation>>;
|
|
2788
2923
|
create(
|
|
2789
2924
|
params: Params$Resource$Presentations$Create,
|
|
2790
2925
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2813,7 +2948,10 @@ export namespace slides_v1 {
|
|
|
2813
2948
|
callback?:
|
|
2814
2949
|
| BodyResponseCallback<Schema$Presentation>
|
|
2815
2950
|
| BodyResponseCallback<Readable>
|
|
2816
|
-
):
|
|
2951
|
+
):
|
|
2952
|
+
| void
|
|
2953
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Presentation>>
|
|
2954
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2817
2955
|
let params = (paramsOrCallback ||
|
|
2818
2956
|
{}) as Params$Resource$Presentations$Create;
|
|
2819
2957
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2856,6 +2994,66 @@ export namespace slides_v1 {
|
|
|
2856
2994
|
|
|
2857
2995
|
/**
|
|
2858
2996
|
* Gets the latest version of the specified presentation.
|
|
2997
|
+
* @example
|
|
2998
|
+
* ```js
|
|
2999
|
+
* // Before running the sample:
|
|
3000
|
+
* // - Enable the API at:
|
|
3001
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
3002
|
+
* // - Login into gcloud by running:
|
|
3003
|
+
* // ```sh
|
|
3004
|
+
* // $ gcloud auth application-default login
|
|
3005
|
+
* // ```
|
|
3006
|
+
* // - Install the npm module by running:
|
|
3007
|
+
* // ```sh
|
|
3008
|
+
* // $ npm install googleapis
|
|
3009
|
+
* // ```
|
|
3010
|
+
*
|
|
3011
|
+
* const {google} = require('googleapis');
|
|
3012
|
+
* const slides = google.slides('v1');
|
|
3013
|
+
*
|
|
3014
|
+
* async function main() {
|
|
3015
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3016
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3017
|
+
* scopes: [
|
|
3018
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
3019
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
3020
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
3021
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
3022
|
+
* 'https://www.googleapis.com/auth/presentations.readonly',
|
|
3023
|
+
* ],
|
|
3024
|
+
* });
|
|
3025
|
+
*
|
|
3026
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3027
|
+
* const authClient = await auth.getClient();
|
|
3028
|
+
* google.options({auth: authClient});
|
|
3029
|
+
*
|
|
3030
|
+
* // Do the magic
|
|
3031
|
+
* const res = await slides.presentations.get({
|
|
3032
|
+
* // The ID of the presentation to retrieve.
|
|
3033
|
+
* presentationId: '[^/]+',
|
|
3034
|
+
* });
|
|
3035
|
+
* console.log(res.data);
|
|
3036
|
+
*
|
|
3037
|
+
* // Example response
|
|
3038
|
+
* // {
|
|
3039
|
+
* // "layouts": [],
|
|
3040
|
+
* // "locale": "my_locale",
|
|
3041
|
+
* // "masters": [],
|
|
3042
|
+
* // "notesMaster": {},
|
|
3043
|
+
* // "pageSize": {},
|
|
3044
|
+
* // "presentationId": "my_presentationId",
|
|
3045
|
+
* // "revisionId": "my_revisionId",
|
|
3046
|
+
* // "slides": [],
|
|
3047
|
+
* // "title": "my_title"
|
|
3048
|
+
* // }
|
|
3049
|
+
* }
|
|
3050
|
+
*
|
|
3051
|
+
* main().catch(e => {
|
|
3052
|
+
* console.error(e);
|
|
3053
|
+
* throw e;
|
|
3054
|
+
* });
|
|
3055
|
+
*
|
|
3056
|
+
* ```
|
|
2859
3057
|
*
|
|
2860
3058
|
* @param params - Parameters for request
|
|
2861
3059
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2865,11 +3063,11 @@ export namespace slides_v1 {
|
|
|
2865
3063
|
get(
|
|
2866
3064
|
params: Params$Resource$Presentations$Get,
|
|
2867
3065
|
options: StreamMethodOptions
|
|
2868
|
-
):
|
|
3066
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2869
3067
|
get(
|
|
2870
3068
|
params?: Params$Resource$Presentations$Get,
|
|
2871
3069
|
options?: MethodOptions
|
|
2872
|
-
):
|
|
3070
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Presentation>>;
|
|
2873
3071
|
get(
|
|
2874
3072
|
params: Params$Resource$Presentations$Get,
|
|
2875
3073
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2898,7 +3096,10 @@ export namespace slides_v1 {
|
|
|
2898
3096
|
callback?:
|
|
2899
3097
|
| BodyResponseCallback<Schema$Presentation>
|
|
2900
3098
|
| BodyResponseCallback<Readable>
|
|
2901
|
-
):
|
|
3099
|
+
):
|
|
3100
|
+
| void
|
|
3101
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Presentation>>
|
|
3102
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2902
3103
|
let params = (paramsOrCallback ||
|
|
2903
3104
|
{}) as Params$Resource$Presentations$Get;
|
|
2904
3105
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2978,6 +3179,68 @@ export namespace slides_v1 {
|
|
|
2978
3179
|
|
|
2979
3180
|
/**
|
|
2980
3181
|
* Gets the latest version of the specified page in the presentation.
|
|
3182
|
+
* @example
|
|
3183
|
+
* ```js
|
|
3184
|
+
* // Before running the sample:
|
|
3185
|
+
* // - Enable the API at:
|
|
3186
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
3187
|
+
* // - Login into gcloud by running:
|
|
3188
|
+
* // ```sh
|
|
3189
|
+
* // $ gcloud auth application-default login
|
|
3190
|
+
* // ```
|
|
3191
|
+
* // - Install the npm module by running:
|
|
3192
|
+
* // ```sh
|
|
3193
|
+
* // $ npm install googleapis
|
|
3194
|
+
* // ```
|
|
3195
|
+
*
|
|
3196
|
+
* const {google} = require('googleapis');
|
|
3197
|
+
* const slides = google.slides('v1');
|
|
3198
|
+
*
|
|
3199
|
+
* async function main() {
|
|
3200
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3201
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3202
|
+
* scopes: [
|
|
3203
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
3204
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
3205
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
3206
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
3207
|
+
* 'https://www.googleapis.com/auth/presentations.readonly',
|
|
3208
|
+
* ],
|
|
3209
|
+
* });
|
|
3210
|
+
*
|
|
3211
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3212
|
+
* const authClient = await auth.getClient();
|
|
3213
|
+
* google.options({auth: authClient});
|
|
3214
|
+
*
|
|
3215
|
+
* // Do the magic
|
|
3216
|
+
* const res = await slides.presentations.pages.get({
|
|
3217
|
+
* // The object ID of the page to retrieve.
|
|
3218
|
+
* pageObjectId: 'placeholder-value',
|
|
3219
|
+
* // The ID of the presentation to retrieve.
|
|
3220
|
+
* presentationId: 'placeholder-value',
|
|
3221
|
+
* });
|
|
3222
|
+
* console.log(res.data);
|
|
3223
|
+
*
|
|
3224
|
+
* // Example response
|
|
3225
|
+
* // {
|
|
3226
|
+
* // "layoutProperties": {},
|
|
3227
|
+
* // "masterProperties": {},
|
|
3228
|
+
* // "notesProperties": {},
|
|
3229
|
+
* // "objectId": "my_objectId",
|
|
3230
|
+
* // "pageElements": [],
|
|
3231
|
+
* // "pageProperties": {},
|
|
3232
|
+
* // "pageType": "my_pageType",
|
|
3233
|
+
* // "revisionId": "my_revisionId",
|
|
3234
|
+
* // "slideProperties": {}
|
|
3235
|
+
* // }
|
|
3236
|
+
* }
|
|
3237
|
+
*
|
|
3238
|
+
* main().catch(e => {
|
|
3239
|
+
* console.error(e);
|
|
3240
|
+
* throw e;
|
|
3241
|
+
* });
|
|
3242
|
+
*
|
|
3243
|
+
* ```
|
|
2981
3244
|
*
|
|
2982
3245
|
* @param params - Parameters for request
|
|
2983
3246
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2987,11 +3250,11 @@ export namespace slides_v1 {
|
|
|
2987
3250
|
get(
|
|
2988
3251
|
params: Params$Resource$Presentations$Pages$Get,
|
|
2989
3252
|
options: StreamMethodOptions
|
|
2990
|
-
):
|
|
3253
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2991
3254
|
get(
|
|
2992
3255
|
params?: Params$Resource$Presentations$Pages$Get,
|
|
2993
3256
|
options?: MethodOptions
|
|
2994
|
-
):
|
|
3257
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Page>>;
|
|
2995
3258
|
get(
|
|
2996
3259
|
params: Params$Resource$Presentations$Pages$Get,
|
|
2997
3260
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -3020,7 +3283,10 @@ export namespace slides_v1 {
|
|
|
3020
3283
|
callback?:
|
|
3021
3284
|
| BodyResponseCallback<Schema$Page>
|
|
3022
3285
|
| BodyResponseCallback<Readable>
|
|
3023
|
-
):
|
|
3286
|
+
):
|
|
3287
|
+
| void
|
|
3288
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Page>>
|
|
3289
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
3024
3290
|
let params = (paramsOrCallback ||
|
|
3025
3291
|
{}) as Params$Resource$Presentations$Pages$Get;
|
|
3026
3292
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -3066,6 +3332,66 @@ export namespace slides_v1 {
|
|
|
3066
3332
|
|
|
3067
3333
|
/**
|
|
3068
3334
|
* Generates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image. This request counts as an [expensive read request](https://developers.google.com/workspace/slides/limits) for quota purposes.
|
|
3335
|
+
* @example
|
|
3336
|
+
* ```js
|
|
3337
|
+
* // Before running the sample:
|
|
3338
|
+
* // - Enable the API at:
|
|
3339
|
+
* // https://console.developers.google.com/apis/api/slides.googleapis.com
|
|
3340
|
+
* // - Login into gcloud by running:
|
|
3341
|
+
* // ```sh
|
|
3342
|
+
* // $ gcloud auth application-default login
|
|
3343
|
+
* // ```
|
|
3344
|
+
* // - Install the npm module by running:
|
|
3345
|
+
* // ```sh
|
|
3346
|
+
* // $ npm install googleapis
|
|
3347
|
+
* // ```
|
|
3348
|
+
*
|
|
3349
|
+
* const {google} = require('googleapis');
|
|
3350
|
+
* const slides = google.slides('v1');
|
|
3351
|
+
*
|
|
3352
|
+
* async function main() {
|
|
3353
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3354
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3355
|
+
* scopes: [
|
|
3356
|
+
* 'https://www.googleapis.com/auth/drive',
|
|
3357
|
+
* 'https://www.googleapis.com/auth/drive.file',
|
|
3358
|
+
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
3359
|
+
* 'https://www.googleapis.com/auth/presentations',
|
|
3360
|
+
* 'https://www.googleapis.com/auth/presentations.readonly',
|
|
3361
|
+
* ],
|
|
3362
|
+
* });
|
|
3363
|
+
*
|
|
3364
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3365
|
+
* const authClient = await auth.getClient();
|
|
3366
|
+
* google.options({auth: authClient});
|
|
3367
|
+
*
|
|
3368
|
+
* // Do the magic
|
|
3369
|
+
* const res = await slides.presentations.pages.getThumbnail({
|
|
3370
|
+
* // The object ID of the page whose thumbnail to retrieve.
|
|
3371
|
+
* pageObjectId: 'placeholder-value',
|
|
3372
|
+
* // The ID of the presentation to retrieve.
|
|
3373
|
+
* presentationId: 'placeholder-value',
|
|
3374
|
+
* // The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG.
|
|
3375
|
+
* 'thumbnailProperties.mimeType': 'placeholder-value',
|
|
3376
|
+
* // The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image.
|
|
3377
|
+
* 'thumbnailProperties.thumbnailSize': 'placeholder-value',
|
|
3378
|
+
* });
|
|
3379
|
+
* console.log(res.data);
|
|
3380
|
+
*
|
|
3381
|
+
* // Example response
|
|
3382
|
+
* // {
|
|
3383
|
+
* // "contentUrl": "my_contentUrl",
|
|
3384
|
+
* // "height": 0,
|
|
3385
|
+
* // "width": 0
|
|
3386
|
+
* // }
|
|
3387
|
+
* }
|
|
3388
|
+
*
|
|
3389
|
+
* main().catch(e => {
|
|
3390
|
+
* console.error(e);
|
|
3391
|
+
* throw e;
|
|
3392
|
+
* });
|
|
3393
|
+
*
|
|
3394
|
+
* ```
|
|
3069
3395
|
*
|
|
3070
3396
|
* @param params - Parameters for request
|
|
3071
3397
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3075,11 +3401,11 @@ export namespace slides_v1 {
|
|
|
3075
3401
|
getThumbnail(
|
|
3076
3402
|
params: Params$Resource$Presentations$Pages$Getthumbnail,
|
|
3077
3403
|
options: StreamMethodOptions
|
|
3078
|
-
):
|
|
3404
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3079
3405
|
getThumbnail(
|
|
3080
3406
|
params?: Params$Resource$Presentations$Pages$Getthumbnail,
|
|
3081
3407
|
options?: MethodOptions
|
|
3082
|
-
):
|
|
3408
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Thumbnail>>;
|
|
3083
3409
|
getThumbnail(
|
|
3084
3410
|
params: Params$Resource$Presentations$Pages$Getthumbnail,
|
|
3085
3411
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -3108,7 +3434,10 @@ export namespace slides_v1 {
|
|
|
3108
3434
|
callback?:
|
|
3109
3435
|
| BodyResponseCallback<Schema$Thumbnail>
|
|
3110
3436
|
| BodyResponseCallback<Readable>
|
|
3111
|
-
):
|
|
3437
|
+
):
|
|
3438
|
+
| void
|
|
3439
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Thumbnail>>
|
|
3440
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
3112
3441
|
let params = (paramsOrCallback ||
|
|
3113
3442
|
{}) as Params$Resource$Presentations$Pages$Getthumbnail;
|
|
3114
3443
|
let options = (optionsOrCallback || {}) as MethodOptions;
|