v2.d.ts
26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library';
import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { GaxiosPromise } from 'gaxios';
export declare namespace blogger_v2 {
export interface Options extends GlobalOptions {
version: 'v2';
}
interface StandardParameters {
/**
* Data format for the response.
*/
alt?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
*/
quotaUser?: string;
/**
* Deprecated. Please use quotaUser instead.
*/
userIp?: string;
}
/**
* Blogger API
*
* API for access to the data within Blogger.
*
* @example
* const {google} = require('googleapis');
* const blogger = google.blogger('v2');
*
* @namespace blogger
* @type {Function}
* @version v2
* @variation v2
* @param {object=} options Options for Blogger
*/
export class Blogger {
context: APIRequestContext;
blogs: Resource$Blogs;
comments: Resource$Comments;
pages: Resource$Pages;
posts: Resource$Posts;
users: Resource$Users;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
export interface Schema$Blog {
/**
* The description of this blog. This is displayed underneath the title.
*/
description?: string | null;
/**
* The identifier for this resource.
*/
id?: string | null;
/**
* The kind of this entry. Always blogger#blog
*/
kind?: string | null;
/**
* The locale this Blog is set to.
*/
locale?: {
country?: string;
language?: string;
variant?: string;
} | null;
/**
* The name of this blog. This is displayed as the title.
*/
name?: string | null;
/**
* The container of pages in this blog.
*/
pages?: {
selfLink?: string;
totalItems?: number;
} | null;
/**
* The container of posts in this blog.
*/
posts?: {
selfLink?: string;
totalItems?: number;
} | null;
/**
* RFC 3339 date-time when this blog was published.
*/
published?: string | null;
/**
* The API REST URL to fetch this resource from.
*/
selfLink?: string | null;
/**
* RFC 3339 date-time when this blog was last updated.
*/
updated?: string | null;
/**
* The URL where this blog is published.
*/
url?: string | null;
}
export interface Schema$BlogList {
/**
* The list of Blogs this user has Authorship or Admin rights over.
*/
items?: Schema$Blog[];
/**
* The kind of this entity. Always blogger#blogList
*/
kind?: string | null;
}
export interface Schema$Comment {
/**
* The author of this Comment.
*/
author?: {
displayName?: string;
id?: string;
image?: {
url?: string;
};
url?: string;
} | null;
/**
* Data about the blog containing this comment.
*/
blog?: {
id?: string;
} | null;
/**
* The actual content of the comment. May include HTML markup.
*/
content?: string | null;
/**
* The identifier for this resource.
*/
id?: string | null;
/**
* Data about the comment this is in reply to.
*/
inReplyTo?: {
id?: string;
} | null;
/**
* The kind of this entry. Always blogger#comment
*/
kind?: string | null;
/**
* Data about the post containing this comment.
*/
post?: {
id?: string;
} | null;
/**
* RFC 3339 date-time when this comment was published.
*/
published?: string | null;
/**
* The API REST URL to fetch this resource from.
*/
selfLink?: string | null;
/**
* RFC 3339 date-time when this comment was last updated.
*/
updated?: string | null;
}
export interface Schema$CommentList {
/**
* The List of Comments for a Post.
*/
items?: Schema$Comment[];
/**
* The kind of this entry. Always blogger#commentList
*/
kind?: string | null;
/**
* Pagination token to fetch the next page, if one exists.
*/
nextPageToken?: string | null;
/**
* Pagination token to fetch the previous page, if one exists.
*/
prevPageToken?: string | null;
}
export interface Schema$Page {
/**
* The author of this Page.
*/
author?: {
displayName?: string;
id?: string;
image?: {
url?: string;
};
url?: string;
} | null;
/**
* Data about the blog containing this Page.
*/
blog?: {
id?: string;
} | null;
/**
* The body content of this Page, in HTML.
*/
content?: string | null;
/**
* The identifier for this resource.
*/
id?: string | null;
/**
* The kind of this entity. Always blogger#page
*/
kind?: string | null;
/**
* RFC 3339 date-time when this Page was published.
*/
published?: string | null;
/**
* The API REST URL to fetch this resource from.
*/
selfLink?: string | null;
/**
* The title of this entity. This is the name displayed in the Admin user interface.
*/
title?: string | null;
/**
* RFC 3339 date-time when this Page was last updated.
*/
updated?: string | null;
/**
* The URL that this Page is displayed at.
*/
url?: string | null;
}
export interface Schema$PageList {
/**
* The list of Pages for a Blog.
*/
items?: Schema$Page[];
/**
* The kind of this entity. Always blogger#pageList
*/
kind?: string | null;
}
export interface Schema$Post {
/**
* The author of this Post.
*/
author?: {
displayName?: string;
id?: string;
image?: {
url?: string;
};
url?: string;
} | null;
/**
* Data about the blog containing this Post.
*/
blog?: {
id?: string;
} | null;
/**
* The content of the Post. May contain HTML markup.
*/
content?: string | null;
/**
* The identifier of this Post.
*/
id?: string | null;
/**
* The kind of this entity. Always blogger#post
*/
kind?: string | null;
/**
* The list of labels this Post was tagged with.
*/
labels?: string[] | null;
/**
* RFC 3339 date-time when this Post was published.
*/
published?: string | null;
/**
* The container of comments on this Post.
*/
replies?: {
selfLink?: string;
totalItems?: string;
} | null;
/**
* The API REST URL to fetch this resource from.
*/
selfLink?: string | null;
/**
* The title of the Post.
*/
title?: string | null;
/**
* RFC 3339 date-time when this Post was last updated.
*/
updated?: string | null;
/**
* The URL where this Post is displayed.
*/
url?: string | null;
}
export interface Schema$PostList {
/**
* The list of Posts for this Blog.
*/
items?: Schema$Post[];
/**
* The kind of this entity. Always blogger#postList
*/
kind?: string | null;
/**
* Pagination token to fetch the next page, if one exists.
*/
nextPageToken?: string | null;
/**
* Pagination token to fetch the previous page, if one exists.
*/
prevPageToken?: string | null;
}
export interface Schema$User {
/**
* Profile summary information.
*/
about?: string | null;
/**
* The container of blogs for this user.
*/
blogs?: {
selfLink?: string;
} | null;
/**
* The timestamp of when this profile was created, in seconds since epoch.
*/
created?: string | null;
/**
* The display name.
*/
displayName?: string | null;
/**
* The identifier for this User.
*/
id?: string | null;
/**
* The kind of this entity. Always blogger#user
*/
kind?: string | null;
/**
* This user's locale
*/
locale?: {
country?: string;
language?: string;
variant?: string;
} | null;
/**
* The API REST URL to fetch this resource from.
*/
selfLink?: string | null;
/**
* The user's profile page.
*/
url?: string | null;
}
export class Resource$Blogs {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* blogger.blogs.get
* @desc Gets one blog by id.
* @alias blogger.blogs.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId The ID of the blog to get.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Blogs$Get, options?: MethodOptions): GaxiosPromise<Schema$Blog>;
get(params: Params$Resource$Blogs$Get, options: MethodOptions | BodyResponseCallback<Schema$Blog>, callback: BodyResponseCallback<Schema$Blog>): void;
get(params: Params$Resource$Blogs$Get, callback: BodyResponseCallback<Schema$Blog>): void;
get(callback: BodyResponseCallback<Schema$Blog>): void;
}
export interface Params$Resource$Blogs$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The ID of the blog to get.
*/
blogId?: string;
}
export class Resource$Comments {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* blogger.comments.get
* @desc Gets one comment by id.
* @alias blogger.comments.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId ID of the blog to containing the comment.
* @param {string} params.commentId The ID of the comment to get.
* @param {string} params.postId ID of the post to fetch posts from.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Comments$Get, options?: MethodOptions): GaxiosPromise<Schema$Comment>;
get(params: Params$Resource$Comments$Get, options: MethodOptions | BodyResponseCallback<Schema$Comment>, callback: BodyResponseCallback<Schema$Comment>): void;
get(params: Params$Resource$Comments$Get, callback: BodyResponseCallback<Schema$Comment>): void;
get(callback: BodyResponseCallback<Schema$Comment>): void;
/**
* blogger.comments.list
* @desc Retrieves the comments for a blog, possibly filtered.
* @alias blogger.comments.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId ID of the blog to fetch comments from.
* @param {boolean=} params.fetchBodies Whether the body content of the comments is included.
* @param {integer=} params.maxResults Maximum number of comments to include in the result.
* @param {string=} params.pageToken Continuation token if request is paged.
* @param {string} params.postId ID of the post to fetch posts from.
* @param {string=} params.startDate Earliest date of comment to fetch, a date-time with RFC 3339 formatting.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Comments$List, options?: MethodOptions): GaxiosPromise<Schema$CommentList>;
list(params: Params$Resource$Comments$List, options: MethodOptions | BodyResponseCallback<Schema$CommentList>, callback: BodyResponseCallback<Schema$CommentList>): void;
list(params: Params$Resource$Comments$List, callback: BodyResponseCallback<Schema$CommentList>): void;
list(callback: BodyResponseCallback<Schema$CommentList>): void;
}
export interface Params$Resource$Comments$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the blog to containing the comment.
*/
blogId?: string;
/**
* The ID of the comment to get.
*/
commentId?: string;
/**
* ID of the post to fetch posts from.
*/
postId?: string;
}
export interface Params$Resource$Comments$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the blog to fetch comments from.
*/
blogId?: string;
/**
* Whether the body content of the comments is included.
*/
fetchBodies?: boolean;
/**
* Maximum number of comments to include in the result.
*/
maxResults?: number;
/**
* Continuation token if request is paged.
*/
pageToken?: string;
/**
* ID of the post to fetch posts from.
*/
postId?: string;
/**
* Earliest date of comment to fetch, a date-time with RFC 3339 formatting.
*/
startDate?: string;
}
export class Resource$Pages {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* blogger.pages.get
* @desc Gets one blog page by id.
* @alias blogger.pages.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId ID of the blog containing the page.
* @param {string} params.pageId The ID of the page to get.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Pages$Get, options?: MethodOptions): GaxiosPromise<Schema$Page>;
get(params: Params$Resource$Pages$Get, options: MethodOptions | BodyResponseCallback<Schema$Page>, callback: BodyResponseCallback<Schema$Page>): void;
get(params: Params$Resource$Pages$Get, callback: BodyResponseCallback<Schema$Page>): void;
get(callback: BodyResponseCallback<Schema$Page>): void;
/**
* blogger.pages.list
* @desc Retrieves pages for a blog, possibly filtered.
* @alias blogger.pages.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId ID of the blog to fetch pages from.
* @param {boolean=} params.fetchBodies Whether to retrieve the Page bodies.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Pages$List, options?: MethodOptions): GaxiosPromise<Schema$PageList>;
list(params: Params$Resource$Pages$List, options: MethodOptions | BodyResponseCallback<Schema$PageList>, callback: BodyResponseCallback<Schema$PageList>): void;
list(params: Params$Resource$Pages$List, callback: BodyResponseCallback<Schema$PageList>): void;
list(callback: BodyResponseCallback<Schema$PageList>): void;
}
export interface Params$Resource$Pages$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the blog containing the page.
*/
blogId?: string;
/**
* The ID of the page to get.
*/
pageId?: string;
}
export interface Params$Resource$Pages$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the blog to fetch pages from.
*/
blogId?: string;
/**
* Whether to retrieve the Page bodies.
*/
fetchBodies?: boolean;
}
export class Resource$Posts {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* blogger.posts.get
* @desc Get a post by id.
* @alias blogger.posts.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId ID of the blog to fetch the post from.
* @param {string} params.postId The ID of the post
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Posts$Get, options?: MethodOptions): GaxiosPromise<Schema$Post>;
get(params: Params$Resource$Posts$Get, options: MethodOptions | BodyResponseCallback<Schema$Post>, callback: BodyResponseCallback<Schema$Post>): void;
get(params: Params$Resource$Posts$Get, callback: BodyResponseCallback<Schema$Post>): void;
get(callback: BodyResponseCallback<Schema$Post>): void;
/**
* blogger.posts.list
* @desc Retrieves a list of posts, possibly filtered.
* @alias blogger.posts.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.blogId ID of the blog to fetch posts from.
* @param {boolean=} params.fetchBodies Whether the body content of posts is included.
* @param {integer=} params.maxResults Maximum number of posts to fetch.
* @param {string=} params.pageToken Continuation token if the request is paged.
* @param {string=} params.startDate Earliest post date to fetch, a date-time with RFC 3339 formatting.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Posts$List, options?: MethodOptions): GaxiosPromise<Schema$PostList>;
list(params: Params$Resource$Posts$List, options: MethodOptions | BodyResponseCallback<Schema$PostList>, callback: BodyResponseCallback<Schema$PostList>): void;
list(params: Params$Resource$Posts$List, callback: BodyResponseCallback<Schema$PostList>): void;
list(callback: BodyResponseCallback<Schema$PostList>): void;
}
export interface Params$Resource$Posts$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the blog to fetch the post from.
*/
blogId?: string;
/**
* The ID of the post
*/
postId?: string;
}
export interface Params$Resource$Posts$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the blog to fetch posts from.
*/
blogId?: string;
/**
* Whether the body content of posts is included.
*/
fetchBodies?: boolean;
/**
* Maximum number of posts to fetch.
*/
maxResults?: number;
/**
* Continuation token if the request is paged.
*/
pageToken?: string;
/**
* Earliest post date to fetch, a date-time with RFC 3339 formatting.
*/
startDate?: string;
}
export class Resource$Users {
context: APIRequestContext;
blogs: Resource$Users$Blogs;
constructor(context: APIRequestContext);
/**
* blogger.users.get
* @desc Gets one user by id.
* @alias blogger.users.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.userId The ID of the user to get.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Users$Get, options?: MethodOptions): GaxiosPromise<Schema$User>;
get(params: Params$Resource$Users$Get, options: MethodOptions | BodyResponseCallback<Schema$User>, callback: BodyResponseCallback<Schema$User>): void;
get(params: Params$Resource$Users$Get, callback: BodyResponseCallback<Schema$User>): void;
get(callback: BodyResponseCallback<Schema$User>): void;
}
export interface Params$Resource$Users$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The ID of the user to get.
*/
userId?: string;
}
export class Resource$Users$Blogs {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* blogger.users.blogs.list
* @desc Retrieves a list of blogs, possibly filtered.
* @alias blogger.users.blogs.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.userId ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Users$Blogs$List, options?: MethodOptions): GaxiosPromise<Schema$BlogList>;
list(params: Params$Resource$Users$Blogs$List, options: MethodOptions | BodyResponseCallback<Schema$BlogList>, callback: BodyResponseCallback<Schema$BlogList>): void;
list(params: Params$Resource$Users$Blogs$List, callback: BodyResponseCallback<Schema$BlogList>): void;
list(callback: BodyResponseCallback<Schema$BlogList>): void;
}
export interface Params$Resource$Users$Blogs$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.
*/
userId?: string;
}
export {};
}