~ubuntu-branches/ubuntu/vivid/juju-core/vivid-updates

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/google-api-go-generator/testdata/blogger-3.want

  • Committer: Package Import Robot
  • Author(s): Curtis C. Hovey
  • Date: 2015-09-29 19:43:29 UTC
  • mfrom: (47.1.4 wily-proposed)
  • Revision ID: package-import@ubuntu.com-20150929194329-9y496tbic30hc7vp
Tags: 1.24.6-0ubuntu1~15.04.1
Backport of 1.24.6 from wily. (LP: #1500916, #1497087)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Package blogger provides access to the Blogger API.
 
2
//
 
3
// See https://developers.google.com/blogger/docs/3.0/getting_started
 
4
//
 
5
// Usage example:
 
6
//
 
7
//   import "google.golang.org/api/blogger/v3"
 
8
//   ...
 
9
//   bloggerService, err := blogger.New(oauthHttpClient)
 
10
package blogger
 
11
 
 
12
import (
 
13
        "bytes"
 
14
        "google.golang.org/api/googleapi"
 
15
        "encoding/json"
 
16
        "errors"
 
17
        "fmt"
 
18
        "io"
 
19
        "net/http"
 
20
        "net/url"
 
21
        "strconv"
 
22
        "strings"
 
23
)
 
24
 
 
25
// Always reference these packages, just in case the auto-generated code
 
26
// below doesn't.
 
27
var _ = bytes.NewBuffer
 
28
var _ = strconv.Itoa
 
29
var _ = fmt.Sprintf
 
30
var _ = json.NewDecoder
 
31
var _ = io.Copy
 
32
var _ = url.Parse
 
33
var _ = googleapi.Version
 
34
var _ = errors.New
 
35
var _ = strings.Replace
 
36
 
 
37
const apiId = "blogger:v3"
 
38
const apiName = "blogger"
 
39
const apiVersion = "v3"
 
40
const basePath = "https://www.googleapis.com/blogger/v3/"
 
41
 
 
42
// OAuth2 scopes used by this API.
 
43
const (
 
44
        // Manage your Blogger account
 
45
        BloggerScope = "https://www.googleapis.com/auth/blogger"
 
46
 
 
47
        // View your Blogger account
 
48
        BloggerReadonlyScope = "https://www.googleapis.com/auth/blogger.readonly"
 
49
)
 
50
 
 
51
func New(client *http.Client) (*Service, error) {
 
52
        if client == nil {
 
53
                return nil, errors.New("client is nil")
 
54
        }
 
55
        s := &Service{client: client, BasePath: basePath}
 
56
        s.BlogUserInfos = NewBlogUserInfosService(s)
 
57
        s.Blogs = NewBlogsService(s)
 
58
        s.Comments = NewCommentsService(s)
 
59
        s.PageViews = NewPageViewsService(s)
 
60
        s.Pages = NewPagesService(s)
 
61
        s.PostUserInfos = NewPostUserInfosService(s)
 
62
        s.Posts = NewPostsService(s)
 
63
        s.Users = NewUsersService(s)
 
64
        return s, nil
 
65
}
 
66
 
 
67
type Service struct {
 
68
        client   *http.Client
 
69
        BasePath string // API endpoint base URL
 
70
 
 
71
        BlogUserInfos *BlogUserInfosService
 
72
 
 
73
        Blogs *BlogsService
 
74
 
 
75
        Comments *CommentsService
 
76
 
 
77
        PageViews *PageViewsService
 
78
 
 
79
        Pages *PagesService
 
80
 
 
81
        PostUserInfos *PostUserInfosService
 
82
 
 
83
        Posts *PostsService
 
84
 
 
85
        Users *UsersService
 
86
}
 
87
 
 
88
func NewBlogUserInfosService(s *Service) *BlogUserInfosService {
 
89
        rs := &BlogUserInfosService{s: s}
 
90
        return rs
 
91
}
 
92
 
 
93
type BlogUserInfosService struct {
 
94
        s *Service
 
95
}
 
96
 
 
97
func NewBlogsService(s *Service) *BlogsService {
 
98
        rs := &BlogsService{s: s}
 
99
        return rs
 
100
}
 
101
 
 
102
type BlogsService struct {
 
103
        s *Service
 
104
}
 
105
 
 
106
func NewCommentsService(s *Service) *CommentsService {
 
107
        rs := &CommentsService{s: s}
 
108
        return rs
 
109
}
 
110
 
 
111
type CommentsService struct {
 
112
        s *Service
 
113
}
 
114
 
 
115
func NewPageViewsService(s *Service) *PageViewsService {
 
116
        rs := &PageViewsService{s: s}
 
117
        return rs
 
118
}
 
119
 
 
120
type PageViewsService struct {
 
121
        s *Service
 
122
}
 
123
 
 
124
func NewPagesService(s *Service) *PagesService {
 
125
        rs := &PagesService{s: s}
 
126
        return rs
 
127
}
 
128
 
 
129
type PagesService struct {
 
130
        s *Service
 
131
}
 
132
 
 
133
func NewPostUserInfosService(s *Service) *PostUserInfosService {
 
134
        rs := &PostUserInfosService{s: s}
 
135
        return rs
 
136
}
 
137
 
 
138
type PostUserInfosService struct {
 
139
        s *Service
 
140
}
 
141
 
 
142
func NewPostsService(s *Service) *PostsService {
 
143
        rs := &PostsService{s: s}
 
144
        return rs
 
145
}
 
146
 
 
147
type PostsService struct {
 
148
        s *Service
 
149
}
 
150
 
 
151
func NewUsersService(s *Service) *UsersService {
 
152
        rs := &UsersService{s: s}
 
153
        return rs
 
154
}
 
155
 
 
156
type UsersService struct {
 
157
        s *Service
 
158
}
 
159
 
 
160
type Blog struct {
 
161
        // CustomMetaData: The JSON custom meta-data for the Blog
 
162
        CustomMetaData string `json:"customMetaData,omitempty"`
 
163
 
 
164
        // Description: The description of this blog. This is displayed
 
165
        // underneath the title.
 
166
        Description string `json:"description,omitempty"`
 
167
 
 
168
        // Id: The identifier for this resource.
 
169
        Id string `json:"id,omitempty"`
 
170
 
 
171
        // Kind: The kind of this entry. Always blogger#blog
 
172
        Kind string `json:"kind,omitempty"`
 
173
 
 
174
        // Locale: The locale this Blog is set to.
 
175
        Locale *BlogLocale `json:"locale,omitempty"`
 
176
 
 
177
        // Name: The name of this blog. This is displayed as the title.
 
178
        Name string `json:"name,omitempty"`
 
179
 
 
180
        // Pages: The container of pages in this blog.
 
181
        Pages *BlogPages `json:"pages,omitempty"`
 
182
 
 
183
        // Posts: The container of posts in this blog.
 
184
        Posts *BlogPosts `json:"posts,omitempty"`
 
185
 
 
186
        // Published: RFC 3339 date-time when this blog was published.
 
187
        Published string `json:"published,omitempty"`
 
188
 
 
189
        // SelfLink: The API REST URL to fetch this resource from.
 
190
        SelfLink string `json:"selfLink,omitempty"`
 
191
 
 
192
        // Updated: RFC 3339 date-time when this blog was last updated.
 
193
        Updated string `json:"updated,omitempty"`
 
194
 
 
195
        // Url: The URL where this blog is published.
 
196
        Url string `json:"url,omitempty"`
 
197
}
 
198
 
 
199
type BlogLocale struct {
 
200
        // Country: The country this blog's locale is set to.
 
201
        Country string `json:"country,omitempty"`
 
202
 
 
203
        // Language: The language this blog is authored in.
 
204
        Language string `json:"language,omitempty"`
 
205
 
 
206
        // Variant: The language variant this blog is authored in.
 
207
        Variant string `json:"variant,omitempty"`
 
208
}
 
209
 
 
210
type BlogPages struct {
 
211
        // SelfLink: The URL of the container for pages in this blog.
 
212
        SelfLink string `json:"selfLink,omitempty"`
 
213
 
 
214
        // TotalItems: The count of pages in this blog.
 
215
        TotalItems int64 `json:"totalItems,omitempty"`
 
216
}
 
217
 
 
218
type BlogPosts struct {
 
219
        // Items: The List of Posts for this Blog.
 
220
        Items []*Post `json:"items,omitempty"`
 
221
 
 
222
        // SelfLink: The URL of the container for posts in this blog.
 
223
        SelfLink string `json:"selfLink,omitempty"`
 
224
 
 
225
        // TotalItems: The count of posts in this blog.
 
226
        TotalItems int64 `json:"totalItems,omitempty"`
 
227
}
 
228
 
 
229
type BlogList struct {
 
230
        // BlogUserInfos: Admin level list of blog per-user information
 
231
        BlogUserInfos []*BlogUserInfo `json:"blogUserInfos,omitempty"`
 
232
 
 
233
        // Items: The list of Blogs this user has Authorship or Admin rights
 
234
        // over.
 
235
        Items []*Blog `json:"items,omitempty"`
 
236
 
 
237
        // Kind: The kind of this entity. Always blogger#blogList
 
238
        Kind string `json:"kind,omitempty"`
 
239
}
 
240
 
 
241
type BlogPerUserInfo struct {
 
242
        // BlogId: ID of the Blog resource
 
243
        BlogId string `json:"blogId,omitempty"`
 
244
 
 
245
        // HasAdminAccess: True if the user has Admin level access to the blog.
 
246
        HasAdminAccess bool `json:"hasAdminAccess,omitempty"`
 
247
 
 
248
        // Kind: The kind of this entity. Always blogger#blogPerUserInfo
 
249
        Kind string `json:"kind,omitempty"`
 
250
 
 
251
        // PhotosAlbumKey: The Photo Album Key for the user when adding photos
 
252
        // to the blog
 
253
        PhotosAlbumKey string `json:"photosAlbumKey,omitempty"`
 
254
 
 
255
        // UserId: ID of the User
 
256
        UserId string `json:"userId,omitempty"`
 
257
}
 
258
 
 
259
type BlogUserInfo struct {
 
260
        // Blog: The Blog resource.
 
261
        Blog *Blog `json:"blog,omitempty"`
 
262
 
 
263
        // Blog_user_info: Information about a User for the Blog.
 
264
        Blog_user_info *BlogPerUserInfo `json:"blog_user_info,omitempty"`
 
265
 
 
266
        // Kind: The kind of this entity. Always blogger#blogUserInfo
 
267
        Kind string `json:"kind,omitempty"`
 
268
}
 
269
 
 
270
type Comment struct {
 
271
        // Author: The author of this Comment.
 
272
        Author *CommentAuthor `json:"author,omitempty"`
 
273
 
 
274
        // Blog: Data about the blog containing this comment.
 
275
        Blog *CommentBlog `json:"blog,omitempty"`
 
276
 
 
277
        // Content: The actual content of the comment. May include HTML markup.
 
278
        Content string `json:"content,omitempty"`
 
279
 
 
280
        // Id: The identifier for this resource.
 
281
        Id string `json:"id,omitempty"`
 
282
 
 
283
        // InReplyTo: Data about the comment this is in reply to.
 
284
        InReplyTo *CommentInReplyTo `json:"inReplyTo,omitempty"`
 
285
 
 
286
        // Kind: The kind of this entry. Always blogger#comment
 
287
        Kind string `json:"kind,omitempty"`
 
288
 
 
289
        // Post: Data about the post containing this comment.
 
290
        Post *CommentPost `json:"post,omitempty"`
 
291
 
 
292
        // Published: RFC 3339 date-time when this comment was published.
 
293
        Published string `json:"published,omitempty"`
 
294
 
 
295
        // SelfLink: The API REST URL to fetch this resource from.
 
296
        SelfLink string `json:"selfLink,omitempty"`
 
297
 
 
298
        // Status: The status of the comment (only populated for admin users)
 
299
        Status string `json:"status,omitempty"`
 
300
 
 
301
        // Updated: RFC 3339 date-time when this comment was last updated.
 
302
        Updated string `json:"updated,omitempty"`
 
303
}
 
304
 
 
305
type CommentAuthor struct {
 
306
        // DisplayName: The display name.
 
307
        DisplayName string `json:"displayName,omitempty"`
 
308
 
 
309
        // Id: The identifier of the Comment creator.
 
310
        Id string `json:"id,omitempty"`
 
311
 
 
312
        // Image: The comment creator's avatar.
 
313
        Image *CommentAuthorImage `json:"image,omitempty"`
 
314
 
 
315
        // Url: The URL of the Comment creator's Profile page.
 
316
        Url string `json:"url,omitempty"`
 
317
}
 
318
 
 
319
type CommentAuthorImage struct {
 
320
        // Url: The comment creator's avatar URL.
 
321
        Url string `json:"url,omitempty"`
 
322
}
 
323
 
 
324
type CommentBlog struct {
 
325
        // Id: The identifier of the blog containing this comment.
 
326
        Id string `json:"id,omitempty"`
 
327
}
 
328
 
 
329
type CommentInReplyTo struct {
 
330
        // Id: The identified of the parent of this comment.
 
331
        Id string `json:"id,omitempty"`
 
332
}
 
333
 
 
334
type CommentPost struct {
 
335
        // Id: The identifier of the post containing this comment.
 
336
        Id string `json:"id,omitempty"`
 
337
}
 
338
 
 
339
type CommentList struct {
 
340
        // Items: The List of Comments for a Post.
 
341
        Items []*Comment `json:"items,omitempty"`
 
342
 
 
343
        // Kind: The kind of this entry. Always blogger#commentList
 
344
        Kind string `json:"kind,omitempty"`
 
345
 
 
346
        // NextPageToken: Pagination token to fetch the next page, if one
 
347
        // exists.
 
348
        NextPageToken string `json:"nextPageToken,omitempty"`
 
349
 
 
350
        // PrevPageToken: Pagination token to fetch the previous page, if one
 
351
        // exists.
 
352
        PrevPageToken string `json:"prevPageToken,omitempty"`
 
353
}
 
354
 
 
355
type Page struct {
 
356
        // Author: The author of this Page.
 
357
        Author *PageAuthor `json:"author,omitempty"`
 
358
 
 
359
        // Blog: Data about the blog containing this Page.
 
360
        Blog *PageBlog `json:"blog,omitempty"`
 
361
 
 
362
        // Content: The body content of this Page, in HTML.
 
363
        Content string `json:"content,omitempty"`
 
364
 
 
365
        // Id: The identifier for this resource.
 
366
        Id string `json:"id,omitempty"`
 
367
 
 
368
        // Kind: The kind of this entity. Always blogger#page
 
369
        Kind string `json:"kind,omitempty"`
 
370
 
 
371
        // Published: RFC 3339 date-time when this Page was published.
 
372
        Published string `json:"published,omitempty"`
 
373
 
 
374
        // SelfLink: The API REST URL to fetch this resource from.
 
375
        SelfLink string `json:"selfLink,omitempty"`
 
376
 
 
377
        // Status: The status of the page for admin resources (either LIVE or
 
378
        // DRAFT).
 
379
        Status string `json:"status,omitempty"`
 
380
 
 
381
        // Title: The title of this entity. This is the name displayed in the
 
382
        // Admin user interface.
 
383
        Title string `json:"title,omitempty"`
 
384
 
 
385
        // Updated: RFC 3339 date-time when this Page was last updated.
 
386
        Updated string `json:"updated,omitempty"`
 
387
 
 
388
        // Url: The URL that this Page is displayed at.
 
389
        Url string `json:"url,omitempty"`
 
390
}
 
391
 
 
392
type PageAuthor struct {
 
393
        // DisplayName: The display name.
 
394
        DisplayName string `json:"displayName,omitempty"`
 
395
 
 
396
        // Id: The identifier of the Page creator.
 
397
        Id string `json:"id,omitempty"`
 
398
 
 
399
        // Image: The page author's avatar.
 
400
        Image *PageAuthorImage `json:"image,omitempty"`
 
401
 
 
402
        // Url: The URL of the Page creator's Profile page.
 
403
        Url string `json:"url,omitempty"`
 
404
}
 
405
 
 
406
type PageAuthorImage struct {
 
407
        // Url: The page author's avatar URL.
 
408
        Url string `json:"url,omitempty"`
 
409
}
 
410
 
 
411
type PageBlog struct {
 
412
        // Id: The identifier of the blog containing this page.
 
413
        Id string `json:"id,omitempty"`
 
414
}
 
415
 
 
416
type PageList struct {
 
417
        // Items: The list of Pages for a Blog.
 
418
        Items []*Page `json:"items,omitempty"`
 
419
 
 
420
        // Kind: The kind of this entity. Always blogger#pageList
 
421
        Kind string `json:"kind,omitempty"`
 
422
}
 
423
 
 
424
type Pageviews struct {
 
425
        // BlogId: Blog Id
 
426
        BlogId int64 `json:"blogId,omitempty,string"`
 
427
 
 
428
        // Counts: The container of posts in this blog.
 
429
        Counts []*PageviewsCounts `json:"counts,omitempty"`
 
430
 
 
431
        // Kind: The kind of this entry. Always blogger#page_views
 
432
        Kind string `json:"kind,omitempty"`
 
433
}
 
434
 
 
435
type PageviewsCounts struct {
 
436
        // Count: Count of page views for the given time range
 
437
        Count int64 `json:"count,omitempty,string"`
 
438
 
 
439
        // TimeRange: Time range the given count applies to
 
440
        TimeRange string `json:"timeRange,omitempty"`
 
441
}
 
442
 
 
443
type Post struct {
 
444
        // Author: The author of this Post.
 
445
        Author *PostAuthor `json:"author,omitempty"`
 
446
 
 
447
        // Blog: Data about the blog containing this Post.
 
448
        Blog *PostBlog `json:"blog,omitempty"`
 
449
 
 
450
        // Content: The content of the Post. May contain HTML markup.
 
451
        Content string `json:"content,omitempty"`
 
452
 
 
453
        // CustomMetaData: The JSON meta-data for the Post.
 
454
        CustomMetaData string `json:"customMetaData,omitempty"`
 
455
 
 
456
        // Id: The identifier of this Post.
 
457
        Id string `json:"id,omitempty"`
 
458
 
 
459
        // Images: Display image for the Post.
 
460
        Images []*PostImages `json:"images,omitempty"`
 
461
 
 
462
        // Kind: The kind of this entity. Always blogger#post
 
463
        Kind string `json:"kind,omitempty"`
 
464
 
 
465
        // Labels: The list of labels this Post was tagged with.
 
466
        Labels []string `json:"labels,omitempty"`
 
467
 
 
468
        // Location: The location for geotagged posts.
 
469
        Location *PostLocation `json:"location,omitempty"`
 
470
 
 
471
        // Published: RFC 3339 date-time when this Post was published.
 
472
        Published string `json:"published,omitempty"`
 
473
 
 
474
        // Replies: The container of comments on this Post.
 
475
        Replies *PostReplies `json:"replies,omitempty"`
 
476
 
 
477
        // SelfLink: The API REST URL to fetch this resource from.
 
478
        SelfLink string `json:"selfLink,omitempty"`
 
479
 
 
480
        // Status: Status of the post. Only set for admin-level requests
 
481
        Status string `json:"status,omitempty"`
 
482
 
 
483
        // Title: The title of the Post.
 
484
        Title string `json:"title,omitempty"`
 
485
 
 
486
        // TitleLink: The title link URL, similar to atom's related link.
 
487
        TitleLink string `json:"titleLink,omitempty"`
 
488
 
 
489
        // Updated: RFC 3339 date-time when this Post was last updated.
 
490
        Updated string `json:"updated,omitempty"`
 
491
 
 
492
        // Url: The URL where this Post is displayed.
 
493
        Url string `json:"url,omitempty"`
 
494
}
 
495
 
 
496
type PostAuthor struct {
 
497
        // DisplayName: The display name.
 
498
        DisplayName string `json:"displayName,omitempty"`
 
499
 
 
500
        // Id: The identifier of the Post creator.
 
501
        Id string `json:"id,omitempty"`
 
502
 
 
503
        // Image: The Post author's avatar.
 
504
        Image *PostAuthorImage `json:"image,omitempty"`
 
505
 
 
506
        // Url: The URL of the Post creator's Profile page.
 
507
        Url string `json:"url,omitempty"`
 
508
}
 
509
 
 
510
type PostAuthorImage struct {
 
511
        // Url: The Post author's avatar URL.
 
512
        Url string `json:"url,omitempty"`
 
513
}
 
514
 
 
515
type PostBlog struct {
 
516
        // Id: The identifier of the Blog that contains this Post.
 
517
        Id string `json:"id,omitempty"`
 
518
}
 
519
 
 
520
type PostImages struct {
 
521
        Url string `json:"url,omitempty"`
 
522
}
 
523
 
 
524
type PostLocation struct {
 
525
        // Lat: Location's latitude.
 
526
        Lat float64 `json:"lat,omitempty"`
 
527
 
 
528
        // Lng: Location's longitude.
 
529
        Lng float64 `json:"lng,omitempty"`
 
530
 
 
531
        // Name: Location name.
 
532
        Name string `json:"name,omitempty"`
 
533
 
 
534
        // Span: Location's viewport span. Can be used when rendering a map
 
535
        // preview.
 
536
        Span string `json:"span,omitempty"`
 
537
}
 
538
 
 
539
type PostReplies struct {
 
540
        // Items: The List of Comments for this Post.
 
541
        Items []*Comment `json:"items,omitempty"`
 
542
 
 
543
        // SelfLink: The URL of the comments on this post.
 
544
        SelfLink string `json:"selfLink,omitempty"`
 
545
 
 
546
        // TotalItems: The count of comments on this post.
 
547
        TotalItems int64 `json:"totalItems,omitempty,string"`
 
548
}
 
549
 
 
550
type PostList struct {
 
551
        // Items: The list of Posts for this Blog.
 
552
        Items []*Post `json:"items,omitempty"`
 
553
 
 
554
        // Kind: The kind of this entity. Always blogger#postList
 
555
        Kind string `json:"kind,omitempty"`
 
556
 
 
557
        // NextPageToken: Pagination token to fetch the next page, if one
 
558
        // exists.
 
559
        NextPageToken string `json:"nextPageToken,omitempty"`
 
560
}
 
561
 
 
562
type PostPerUserInfo struct {
 
563
        // BlogId: ID of the Blog that the post resource belongs to.
 
564
        BlogId string `json:"blogId,omitempty"`
 
565
 
 
566
        // HasEditAccess: True if the user has Author level access to the post.
 
567
        HasEditAccess bool `json:"hasEditAccess,omitempty"`
 
568
 
 
569
        // Kind: The kind of this entity. Always blogger#postPerUserInfo
 
570
        Kind string `json:"kind,omitempty"`
 
571
 
 
572
        // PostId: ID of the Post resource.
 
573
        PostId string `json:"postId,omitempty"`
 
574
 
 
575
        // UserId: ID of the User.
 
576
        UserId string `json:"userId,omitempty"`
 
577
}
 
578
 
 
579
type PostUserInfo struct {
 
580
        // Kind: The kind of this entity. Always blogger#postUserInfo
 
581
        Kind string `json:"kind,omitempty"`
 
582
 
 
583
        // Post: The Post resource.
 
584
        Post *Post `json:"post,omitempty"`
 
585
 
 
586
        // Post_user_info: Information about a User for the Post.
 
587
        Post_user_info *PostPerUserInfo `json:"post_user_info,omitempty"`
 
588
}
 
589
 
 
590
type PostUserInfosList struct {
 
591
        // Items: The list of Posts with User information for the post, for this
 
592
        // Blog.
 
593
        Items []*PostUserInfo `json:"items,omitempty"`
 
594
 
 
595
        // Kind: The kind of this entity. Always blogger#postList
 
596
        Kind string `json:"kind,omitempty"`
 
597
 
 
598
        // NextPageToken: Pagination token to fetch the next page, if one
 
599
        // exists.
 
600
        NextPageToken string `json:"nextPageToken,omitempty"`
 
601
}
 
602
 
 
603
type User struct {
 
604
        // About: Profile summary information.
 
605
        About string `json:"about,omitempty"`
 
606
 
 
607
        // Blogs: The container of blogs for this user.
 
608
        Blogs *UserBlogs `json:"blogs,omitempty"`
 
609
 
 
610
        // Created: The timestamp of when this profile was created, in seconds
 
611
        // since epoch.
 
612
        Created string `json:"created,omitempty"`
 
613
 
 
614
        // DisplayName: The display name.
 
615
        DisplayName string `json:"displayName,omitempty"`
 
616
 
 
617
        // Id: The identifier for this User.
 
618
        Id string `json:"id,omitempty"`
 
619
 
 
620
        // Kind: The kind of this entity. Always blogger#user
 
621
        Kind string `json:"kind,omitempty"`
 
622
 
 
623
        // Locale: This user's locale
 
624
        Locale *UserLocale `json:"locale,omitempty"`
 
625
 
 
626
        // SelfLink: The API REST URL to fetch this resource from.
 
627
        SelfLink string `json:"selfLink,omitempty"`
 
628
 
 
629
        // Url: The user's profile page.
 
630
        Url string `json:"url,omitempty"`
 
631
}
 
632
 
 
633
type UserBlogs struct {
 
634
        // SelfLink: The URL of the Blogs for this user.
 
635
        SelfLink string `json:"selfLink,omitempty"`
 
636
}
 
637
 
 
638
type UserLocale struct {
 
639
        // Country: The user's country setting.
 
640
        Country string `json:"country,omitempty"`
 
641
 
 
642
        // Language: The user's language setting.
 
643
        Language string `json:"language,omitempty"`
 
644
 
 
645
        // Variant: The user's language variant setting.
 
646
        Variant string `json:"variant,omitempty"`
 
647
}
 
648
 
 
649
// method id "blogger.blogUserInfos.get":
 
650
 
 
651
type BlogUserInfosGetCall struct {
 
652
        s      *Service
 
653
        userId string
 
654
        blogId string
 
655
        opt_   map[string]interface{}
 
656
}
 
657
 
 
658
// Get: Gets one blog and user info pair by blogId and userId.
 
659
func (r *BlogUserInfosService) Get(userId string, blogId string) *BlogUserInfosGetCall {
 
660
        c := &BlogUserInfosGetCall{s: r.s, opt_: make(map[string]interface{})}
 
661
        c.userId = userId
 
662
        c.blogId = blogId
 
663
        return c
 
664
}
 
665
 
 
666
// MaxPosts sets the optional parameter "maxPosts": Maximum number of
 
667
// posts to pull back with the blog.
 
668
func (c *BlogUserInfosGetCall) MaxPosts(maxPosts int64) *BlogUserInfosGetCall {
 
669
        c.opt_["maxPosts"] = maxPosts
 
670
        return c
 
671
}
 
672
 
 
673
// Fields allows partial responses to be retrieved.
 
674
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
675
// for more information.
 
676
func (c *BlogUserInfosGetCall) Fields(s ...googleapi.Field) *BlogUserInfosGetCall {
 
677
        c.opt_["fields"] = googleapi.CombineFields(s)
 
678
        return c
 
679
}
 
680
 
 
681
func (c *BlogUserInfosGetCall) Do() (*BlogUserInfo, error) {
 
682
        var body io.Reader = nil
 
683
        params := make(url.Values)
 
684
        params.Set("alt", "json")
 
685
        if v, ok := c.opt_["maxPosts"]; ok {
 
686
                params.Set("maxPosts", fmt.Sprintf("%v", v))
 
687
        }
 
688
        if v, ok := c.opt_["fields"]; ok {
 
689
                params.Set("fields", fmt.Sprintf("%v", v))
 
690
        }
 
691
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/blogs/{blogId}")
 
692
        urls += "?" + params.Encode()
 
693
        req, _ := http.NewRequest("GET", urls, body)
 
694
        googleapi.Expand(req.URL, map[string]string{
 
695
                "userId": c.userId,
 
696
                "blogId": c.blogId,
 
697
        })
 
698
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
699
        res, err := c.s.client.Do(req)
 
700
        if err != nil {
 
701
                return nil, err
 
702
        }
 
703
        defer googleapi.CloseBody(res)
 
704
        if err := googleapi.CheckResponse(res); err != nil {
 
705
                return nil, err
 
706
        }
 
707
        var ret *BlogUserInfo
 
708
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
709
                return nil, err
 
710
        }
 
711
        return ret, nil
 
712
        // {
 
713
        //   "description": "Gets one blog and user info pair by blogId and userId.",
 
714
        //   "httpMethod": "GET",
 
715
        //   "id": "blogger.blogUserInfos.get",
 
716
        //   "parameterOrder": [
 
717
        //     "userId",
 
718
        //     "blogId"
 
719
        //   ],
 
720
        //   "parameters": {
 
721
        //     "blogId": {
 
722
        //       "description": "The ID of the blog to get.",
 
723
        //       "location": "path",
 
724
        //       "required": true,
 
725
        //       "type": "string"
 
726
        //     },
 
727
        //     "maxPosts": {
 
728
        //       "description": "Maximum number of posts to pull back with the blog.",
 
729
        //       "format": "uint32",
 
730
        //       "location": "query",
 
731
        //       "type": "integer"
 
732
        //     },
 
733
        //     "userId": {
 
734
        //       "description": "ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.",
 
735
        //       "location": "path",
 
736
        //       "required": true,
 
737
        //       "type": "string"
 
738
        //     }
 
739
        //   },
 
740
        //   "path": "users/{userId}/blogs/{blogId}",
 
741
        //   "response": {
 
742
        //     "$ref": "BlogUserInfo"
 
743
        //   },
 
744
        //   "scopes": [
 
745
        //     "https://www.googleapis.com/auth/blogger",
 
746
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
747
        //   ]
 
748
        // }
 
749
 
 
750
}
 
751
 
 
752
// method id "blogger.blogs.get":
 
753
 
 
754
type BlogsGetCall struct {
 
755
        s      *Service
 
756
        blogId string
 
757
        opt_   map[string]interface{}
 
758
}
 
759
 
 
760
// Get: Gets one blog by id.
 
761
func (r *BlogsService) Get(blogId string) *BlogsGetCall {
 
762
        c := &BlogsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
763
        c.blogId = blogId
 
764
        return c
 
765
}
 
766
 
 
767
// MaxPosts sets the optional parameter "maxPosts": Maximum number of
 
768
// posts to pull back with the blog.
 
769
func (c *BlogsGetCall) MaxPosts(maxPosts int64) *BlogsGetCall {
 
770
        c.opt_["maxPosts"] = maxPosts
 
771
        return c
 
772
}
 
773
 
 
774
// Fields allows partial responses to be retrieved.
 
775
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
776
// for more information.
 
777
func (c *BlogsGetCall) Fields(s ...googleapi.Field) *BlogsGetCall {
 
778
        c.opt_["fields"] = googleapi.CombineFields(s)
 
779
        return c
 
780
}
 
781
 
 
782
func (c *BlogsGetCall) Do() (*Blog, error) {
 
783
        var body io.Reader = nil
 
784
        params := make(url.Values)
 
785
        params.Set("alt", "json")
 
786
        if v, ok := c.opt_["maxPosts"]; ok {
 
787
                params.Set("maxPosts", fmt.Sprintf("%v", v))
 
788
        }
 
789
        if v, ok := c.opt_["fields"]; ok {
 
790
                params.Set("fields", fmt.Sprintf("%v", v))
 
791
        }
 
792
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}")
 
793
        urls += "?" + params.Encode()
 
794
        req, _ := http.NewRequest("GET", urls, body)
 
795
        googleapi.Expand(req.URL, map[string]string{
 
796
                "blogId": c.blogId,
 
797
        })
 
798
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
799
        res, err := c.s.client.Do(req)
 
800
        if err != nil {
 
801
                return nil, err
 
802
        }
 
803
        defer googleapi.CloseBody(res)
 
804
        if err := googleapi.CheckResponse(res); err != nil {
 
805
                return nil, err
 
806
        }
 
807
        var ret *Blog
 
808
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
809
                return nil, err
 
810
        }
 
811
        return ret, nil
 
812
        // {
 
813
        //   "description": "Gets one blog by id.",
 
814
        //   "httpMethod": "GET",
 
815
        //   "id": "blogger.blogs.get",
 
816
        //   "parameterOrder": [
 
817
        //     "blogId"
 
818
        //   ],
 
819
        //   "parameters": {
 
820
        //     "blogId": {
 
821
        //       "description": "The ID of the blog to get.",
 
822
        //       "location": "path",
 
823
        //       "required": true,
 
824
        //       "type": "string"
 
825
        //     },
 
826
        //     "maxPosts": {
 
827
        //       "description": "Maximum number of posts to pull back with the blog.",
 
828
        //       "format": "uint32",
 
829
        //       "location": "query",
 
830
        //       "type": "integer"
 
831
        //     }
 
832
        //   },
 
833
        //   "path": "blogs/{blogId}",
 
834
        //   "response": {
 
835
        //     "$ref": "Blog"
 
836
        //   },
 
837
        //   "scopes": [
 
838
        //     "https://www.googleapis.com/auth/blogger",
 
839
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
840
        //   ]
 
841
        // }
 
842
 
 
843
}
 
844
 
 
845
// method id "blogger.blogs.getByUrl":
 
846
 
 
847
type BlogsGetByUrlCall struct {
 
848
        s    *Service
 
849
        url  string
 
850
        opt_ map[string]interface{}
 
851
}
 
852
 
 
853
// GetByUrl: Retrieve a Blog by URL.
 
854
func (r *BlogsService) GetByUrl(url string) *BlogsGetByUrlCall {
 
855
        c := &BlogsGetByUrlCall{s: r.s, opt_: make(map[string]interface{})}
 
856
        c.url = url
 
857
        return c
 
858
}
 
859
 
 
860
// Fields allows partial responses to be retrieved.
 
861
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
862
// for more information.
 
863
func (c *BlogsGetByUrlCall) Fields(s ...googleapi.Field) *BlogsGetByUrlCall {
 
864
        c.opt_["fields"] = googleapi.CombineFields(s)
 
865
        return c
 
866
}
 
867
 
 
868
func (c *BlogsGetByUrlCall) Do() (*Blog, error) {
 
869
        var body io.Reader = nil
 
870
        params := make(url.Values)
 
871
        params.Set("alt", "json")
 
872
        params.Set("url", fmt.Sprintf("%v", c.url))
 
873
        if v, ok := c.opt_["fields"]; ok {
 
874
                params.Set("fields", fmt.Sprintf("%v", v))
 
875
        }
 
876
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/byurl")
 
877
        urls += "?" + params.Encode()
 
878
        req, _ := http.NewRequest("GET", urls, body)
 
879
        googleapi.SetOpaque(req.URL)
 
880
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
881
        res, err := c.s.client.Do(req)
 
882
        if err != nil {
 
883
                return nil, err
 
884
        }
 
885
        defer googleapi.CloseBody(res)
 
886
        if err := googleapi.CheckResponse(res); err != nil {
 
887
                return nil, err
 
888
        }
 
889
        var ret *Blog
 
890
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
891
                return nil, err
 
892
        }
 
893
        return ret, nil
 
894
        // {
 
895
        //   "description": "Retrieve a Blog by URL.",
 
896
        //   "httpMethod": "GET",
 
897
        //   "id": "blogger.blogs.getByUrl",
 
898
        //   "parameterOrder": [
 
899
        //     "url"
 
900
        //   ],
 
901
        //   "parameters": {
 
902
        //     "url": {
 
903
        //       "description": "The URL of the blog to retrieve.",
 
904
        //       "location": "query",
 
905
        //       "required": true,
 
906
        //       "type": "string"
 
907
        //     }
 
908
        //   },
 
909
        //   "path": "blogs/byurl",
 
910
        //   "response": {
 
911
        //     "$ref": "Blog"
 
912
        //   },
 
913
        //   "scopes": [
 
914
        //     "https://www.googleapis.com/auth/blogger",
 
915
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
916
        //   ]
 
917
        // }
 
918
 
 
919
}
 
920
 
 
921
// method id "blogger.blogs.listByUser":
 
922
 
 
923
type BlogsListByUserCall struct {
 
924
        s      *Service
 
925
        userId string
 
926
        opt_   map[string]interface{}
 
927
}
 
928
 
 
929
// ListByUser: Retrieves a list of blogs, possibly filtered.
 
930
func (r *BlogsService) ListByUser(userId string) *BlogsListByUserCall {
 
931
        c := &BlogsListByUserCall{s: r.s, opt_: make(map[string]interface{})}
 
932
        c.userId = userId
 
933
        return c
 
934
}
 
935
 
 
936
// FetchUserInfo sets the optional parameter "fetchUserInfo": Whether
 
937
// the response is a list of blogs with per-user information instead of
 
938
// just blogs.
 
939
func (c *BlogsListByUserCall) FetchUserInfo(fetchUserInfo bool) *BlogsListByUserCall {
 
940
        c.opt_["fetchUserInfo"] = fetchUserInfo
 
941
        return c
 
942
}
 
943
 
 
944
// View sets the optional parameter "view":
 
945
func (c *BlogsListByUserCall) View(view string) *BlogsListByUserCall {
 
946
        c.opt_["view"] = view
 
947
        return c
 
948
}
 
949
 
 
950
// Fields allows partial responses to be retrieved.
 
951
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
952
// for more information.
 
953
func (c *BlogsListByUserCall) Fields(s ...googleapi.Field) *BlogsListByUserCall {
 
954
        c.opt_["fields"] = googleapi.CombineFields(s)
 
955
        return c
 
956
}
 
957
 
 
958
func (c *BlogsListByUserCall) Do() (*BlogList, error) {
 
959
        var body io.Reader = nil
 
960
        params := make(url.Values)
 
961
        params.Set("alt", "json")
 
962
        if v, ok := c.opt_["fetchUserInfo"]; ok {
 
963
                params.Set("fetchUserInfo", fmt.Sprintf("%v", v))
 
964
        }
 
965
        if v, ok := c.opt_["view"]; ok {
 
966
                params.Set("view", fmt.Sprintf("%v", v))
 
967
        }
 
968
        if v, ok := c.opt_["fields"]; ok {
 
969
                params.Set("fields", fmt.Sprintf("%v", v))
 
970
        }
 
971
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/blogs")
 
972
        urls += "?" + params.Encode()
 
973
        req, _ := http.NewRequest("GET", urls, body)
 
974
        googleapi.Expand(req.URL, map[string]string{
 
975
                "userId": c.userId,
 
976
        })
 
977
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
978
        res, err := c.s.client.Do(req)
 
979
        if err != nil {
 
980
                return nil, err
 
981
        }
 
982
        defer googleapi.CloseBody(res)
 
983
        if err := googleapi.CheckResponse(res); err != nil {
 
984
                return nil, err
 
985
        }
 
986
        var ret *BlogList
 
987
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
988
                return nil, err
 
989
        }
 
990
        return ret, nil
 
991
        // {
 
992
        //   "description": "Retrieves a list of blogs, possibly filtered.",
 
993
        //   "httpMethod": "GET",
 
994
        //   "id": "blogger.blogs.listByUser",
 
995
        //   "parameterOrder": [
 
996
        //     "userId"
 
997
        //   ],
 
998
        //   "parameters": {
 
999
        //     "fetchUserInfo": {
 
1000
        //       "description": "Whether the response is a list of blogs with per-user information instead of just blogs.",
 
1001
        //       "location": "query",
 
1002
        //       "type": "boolean"
 
1003
        //     },
 
1004
        //     "userId": {
 
1005
        //       "description": "ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.",
 
1006
        //       "location": "path",
 
1007
        //       "required": true,
 
1008
        //       "type": "string"
 
1009
        //     },
 
1010
        //     "view": {
 
1011
        //       "enum": [
 
1012
        //         "ADMIN",
 
1013
        //         "AUTHOR",
 
1014
        //         "READER"
 
1015
        //       ],
 
1016
        //       "enumDescriptions": [
 
1017
        //         "Admin level detail",
 
1018
        //         "Author level detail",
 
1019
        //         "Admin level detail"
 
1020
        //       ],
 
1021
        //       "location": "query",
 
1022
        //       "type": "string"
 
1023
        //     }
 
1024
        //   },
 
1025
        //   "path": "users/{userId}/blogs",
 
1026
        //   "response": {
 
1027
        //     "$ref": "BlogList"
 
1028
        //   },
 
1029
        //   "scopes": [
 
1030
        //     "https://www.googleapis.com/auth/blogger",
 
1031
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
1032
        //   ]
 
1033
        // }
 
1034
 
 
1035
}
 
1036
 
 
1037
// method id "blogger.comments.approve":
 
1038
 
 
1039
type CommentsApproveCall struct {
 
1040
        s         *Service
 
1041
        blogId    string
 
1042
        postId    string
 
1043
        commentId string
 
1044
        opt_      map[string]interface{}
 
1045
}
 
1046
 
 
1047
// Approve: Marks a comment as not spam.
 
1048
func (r *CommentsService) Approve(blogId string, postId string, commentId string) *CommentsApproveCall {
 
1049
        c := &CommentsApproveCall{s: r.s, opt_: make(map[string]interface{})}
 
1050
        c.blogId = blogId
 
1051
        c.postId = postId
 
1052
        c.commentId = commentId
 
1053
        return c
 
1054
}
 
1055
 
 
1056
// Fields allows partial responses to be retrieved.
 
1057
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1058
// for more information.
 
1059
func (c *CommentsApproveCall) Fields(s ...googleapi.Field) *CommentsApproveCall {
 
1060
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1061
        return c
 
1062
}
 
1063
 
 
1064
func (c *CommentsApproveCall) Do() (*Comment, error) {
 
1065
        var body io.Reader = nil
 
1066
        params := make(url.Values)
 
1067
        params.Set("alt", "json")
 
1068
        if v, ok := c.opt_["fields"]; ok {
 
1069
                params.Set("fields", fmt.Sprintf("%v", v))
 
1070
        }
 
1071
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/comments/{commentId}/approve")
 
1072
        urls += "?" + params.Encode()
 
1073
        req, _ := http.NewRequest("POST", urls, body)
 
1074
        googleapi.Expand(req.URL, map[string]string{
 
1075
                "blogId":    c.blogId,
 
1076
                "postId":    c.postId,
 
1077
                "commentId": c.commentId,
 
1078
        })
 
1079
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1080
        res, err := c.s.client.Do(req)
 
1081
        if err != nil {
 
1082
                return nil, err
 
1083
        }
 
1084
        defer googleapi.CloseBody(res)
 
1085
        if err := googleapi.CheckResponse(res); err != nil {
 
1086
                return nil, err
 
1087
        }
 
1088
        var ret *Comment
 
1089
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1090
                return nil, err
 
1091
        }
 
1092
        return ret, nil
 
1093
        // {
 
1094
        //   "description": "Marks a comment as not spam.",
 
1095
        //   "httpMethod": "POST",
 
1096
        //   "id": "blogger.comments.approve",
 
1097
        //   "parameterOrder": [
 
1098
        //     "blogId",
 
1099
        //     "postId",
 
1100
        //     "commentId"
 
1101
        //   ],
 
1102
        //   "parameters": {
 
1103
        //     "blogId": {
 
1104
        //       "description": "The Id of the Blog.",
 
1105
        //       "location": "path",
 
1106
        //       "required": true,
 
1107
        //       "type": "string"
 
1108
        //     },
 
1109
        //     "commentId": {
 
1110
        //       "description": "The ID of the comment to mark as not spam.",
 
1111
        //       "location": "path",
 
1112
        //       "required": true,
 
1113
        //       "type": "string"
 
1114
        //     },
 
1115
        //     "postId": {
 
1116
        //       "description": "The ID of the Post.",
 
1117
        //       "location": "path",
 
1118
        //       "required": true,
 
1119
        //       "type": "string"
 
1120
        //     }
 
1121
        //   },
 
1122
        //   "path": "blogs/{blogId}/posts/{postId}/comments/{commentId}/approve",
 
1123
        //   "response": {
 
1124
        //     "$ref": "Comment"
 
1125
        //   },
 
1126
        //   "scopes": [
 
1127
        //     "https://www.googleapis.com/auth/blogger"
 
1128
        //   ]
 
1129
        // }
 
1130
 
 
1131
}
 
1132
 
 
1133
// method id "blogger.comments.delete":
 
1134
 
 
1135
type CommentsDeleteCall struct {
 
1136
        s         *Service
 
1137
        blogId    string
 
1138
        postId    string
 
1139
        commentId string
 
1140
        opt_      map[string]interface{}
 
1141
}
 
1142
 
 
1143
// Delete: Delete a comment by id.
 
1144
func (r *CommentsService) Delete(blogId string, postId string, commentId string) *CommentsDeleteCall {
 
1145
        c := &CommentsDeleteCall{s: r.s, opt_: make(map[string]interface{})}
 
1146
        c.blogId = blogId
 
1147
        c.postId = postId
 
1148
        c.commentId = commentId
 
1149
        return c
 
1150
}
 
1151
 
 
1152
// Fields allows partial responses to be retrieved.
 
1153
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1154
// for more information.
 
1155
func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
 
1156
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1157
        return c
 
1158
}
 
1159
 
 
1160
func (c *CommentsDeleteCall) Do() error {
 
1161
        var body io.Reader = nil
 
1162
        params := make(url.Values)
 
1163
        params.Set("alt", "json")
 
1164
        if v, ok := c.opt_["fields"]; ok {
 
1165
                params.Set("fields", fmt.Sprintf("%v", v))
 
1166
        }
 
1167
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/comments/{commentId}")
 
1168
        urls += "?" + params.Encode()
 
1169
        req, _ := http.NewRequest("DELETE", urls, body)
 
1170
        googleapi.Expand(req.URL, map[string]string{
 
1171
                "blogId":    c.blogId,
 
1172
                "postId":    c.postId,
 
1173
                "commentId": c.commentId,
 
1174
        })
 
1175
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1176
        res, err := c.s.client.Do(req)
 
1177
        if err != nil {
 
1178
                return err
 
1179
        }
 
1180
        defer googleapi.CloseBody(res)
 
1181
        if err := googleapi.CheckResponse(res); err != nil {
 
1182
                return err
 
1183
        }
 
1184
        return nil
 
1185
        // {
 
1186
        //   "description": "Delete a comment by id.",
 
1187
        //   "httpMethod": "DELETE",
 
1188
        //   "id": "blogger.comments.delete",
 
1189
        //   "parameterOrder": [
 
1190
        //     "blogId",
 
1191
        //     "postId",
 
1192
        //     "commentId"
 
1193
        //   ],
 
1194
        //   "parameters": {
 
1195
        //     "blogId": {
 
1196
        //       "description": "The Id of the Blog.",
 
1197
        //       "location": "path",
 
1198
        //       "required": true,
 
1199
        //       "type": "string"
 
1200
        //     },
 
1201
        //     "commentId": {
 
1202
        //       "description": "The ID of the comment to delete.",
 
1203
        //       "location": "path",
 
1204
        //       "required": true,
 
1205
        //       "type": "string"
 
1206
        //     },
 
1207
        //     "postId": {
 
1208
        //       "description": "The ID of the Post.",
 
1209
        //       "location": "path",
 
1210
        //       "required": true,
 
1211
        //       "type": "string"
 
1212
        //     }
 
1213
        //   },
 
1214
        //   "path": "blogs/{blogId}/posts/{postId}/comments/{commentId}",
 
1215
        //   "scopes": [
 
1216
        //     "https://www.googleapis.com/auth/blogger"
 
1217
        //   ]
 
1218
        // }
 
1219
 
 
1220
}
 
1221
 
 
1222
// method id "blogger.comments.get":
 
1223
 
 
1224
type CommentsGetCall struct {
 
1225
        s         *Service
 
1226
        blogId    string
 
1227
        postId    string
 
1228
        commentId string
 
1229
        opt_      map[string]interface{}
 
1230
}
 
1231
 
 
1232
// Get: Gets one comment by id.
 
1233
func (r *CommentsService) Get(blogId string, postId string, commentId string) *CommentsGetCall {
 
1234
        c := &CommentsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1235
        c.blogId = blogId
 
1236
        c.postId = postId
 
1237
        c.commentId = commentId
 
1238
        return c
 
1239
}
 
1240
 
 
1241
// Fields allows partial responses to be retrieved.
 
1242
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1243
// for more information.
 
1244
func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
 
1245
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1246
        return c
 
1247
}
 
1248
 
 
1249
func (c *CommentsGetCall) Do() (*Comment, error) {
 
1250
        var body io.Reader = nil
 
1251
        params := make(url.Values)
 
1252
        params.Set("alt", "json")
 
1253
        if v, ok := c.opt_["fields"]; ok {
 
1254
                params.Set("fields", fmt.Sprintf("%v", v))
 
1255
        }
 
1256
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/comments/{commentId}")
 
1257
        urls += "?" + params.Encode()
 
1258
        req, _ := http.NewRequest("GET", urls, body)
 
1259
        googleapi.Expand(req.URL, map[string]string{
 
1260
                "blogId":    c.blogId,
 
1261
                "postId":    c.postId,
 
1262
                "commentId": c.commentId,
 
1263
        })
 
1264
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1265
        res, err := c.s.client.Do(req)
 
1266
        if err != nil {
 
1267
                return nil, err
 
1268
        }
 
1269
        defer googleapi.CloseBody(res)
 
1270
        if err := googleapi.CheckResponse(res); err != nil {
 
1271
                return nil, err
 
1272
        }
 
1273
        var ret *Comment
 
1274
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1275
                return nil, err
 
1276
        }
 
1277
        return ret, nil
 
1278
        // {
 
1279
        //   "description": "Gets one comment by id.",
 
1280
        //   "httpMethod": "GET",
 
1281
        //   "id": "blogger.comments.get",
 
1282
        //   "parameterOrder": [
 
1283
        //     "blogId",
 
1284
        //     "postId",
 
1285
        //     "commentId"
 
1286
        //   ],
 
1287
        //   "parameters": {
 
1288
        //     "blogId": {
 
1289
        //       "description": "ID of the blog to containing the comment.",
 
1290
        //       "location": "path",
 
1291
        //       "required": true,
 
1292
        //       "type": "string"
 
1293
        //     },
 
1294
        //     "commentId": {
 
1295
        //       "description": "The ID of the comment to get.",
 
1296
        //       "location": "path",
 
1297
        //       "required": true,
 
1298
        //       "type": "string"
 
1299
        //     },
 
1300
        //     "postId": {
 
1301
        //       "description": "ID of the post to fetch posts from.",
 
1302
        //       "location": "path",
 
1303
        //       "required": true,
 
1304
        //       "type": "string"
 
1305
        //     }
 
1306
        //   },
 
1307
        //   "path": "blogs/{blogId}/posts/{postId}/comments/{commentId}",
 
1308
        //   "response": {
 
1309
        //     "$ref": "Comment"
 
1310
        //   },
 
1311
        //   "scopes": [
 
1312
        //     "https://www.googleapis.com/auth/blogger",
 
1313
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
1314
        //   ]
 
1315
        // }
 
1316
 
 
1317
}
 
1318
 
 
1319
// method id "blogger.comments.list":
 
1320
 
 
1321
type CommentsListCall struct {
 
1322
        s      *Service
 
1323
        blogId string
 
1324
        postId string
 
1325
        opt_   map[string]interface{}
 
1326
}
 
1327
 
 
1328
// List: Retrieves the comments for a post, possibly filtered.
 
1329
func (r *CommentsService) List(blogId string, postId string) *CommentsListCall {
 
1330
        c := &CommentsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1331
        c.blogId = blogId
 
1332
        c.postId = postId
 
1333
        return c
 
1334
}
 
1335
 
 
1336
// EndDate sets the optional parameter "endDate": Latest date of comment
 
1337
// to fetch, a date-time with RFC 3339 formatting.
 
1338
func (c *CommentsListCall) EndDate(endDate string) *CommentsListCall {
 
1339
        c.opt_["endDate"] = endDate
 
1340
        return c
 
1341
}
 
1342
 
 
1343
// FetchBodies sets the optional parameter "fetchBodies": Whether the
 
1344
// body content of the comments is included.
 
1345
func (c *CommentsListCall) FetchBodies(fetchBodies bool) *CommentsListCall {
 
1346
        c.opt_["fetchBodies"] = fetchBodies
 
1347
        return c
 
1348
}
 
1349
 
 
1350
// MaxResults sets the optional parameter "maxResults": Maximum number
 
1351
// of comments to include in the result.
 
1352
func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
 
1353
        c.opt_["maxResults"] = maxResults
 
1354
        return c
 
1355
}
 
1356
 
 
1357
// PageToken sets the optional parameter "pageToken": Continuation token
 
1358
// if request is paged.
 
1359
func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
 
1360
        c.opt_["pageToken"] = pageToken
 
1361
        return c
 
1362
}
 
1363
 
 
1364
// StartDate sets the optional parameter "startDate": Earliest date of
 
1365
// comment to fetch, a date-time with RFC 3339 formatting.
 
1366
func (c *CommentsListCall) StartDate(startDate string) *CommentsListCall {
 
1367
        c.opt_["startDate"] = startDate
 
1368
        return c
 
1369
}
 
1370
 
 
1371
// Statuses sets the optional parameter "statuses":
 
1372
func (c *CommentsListCall) Statuses(statuses string) *CommentsListCall {
 
1373
        c.opt_["statuses"] = statuses
 
1374
        return c
 
1375
}
 
1376
 
 
1377
// View sets the optional parameter "view":
 
1378
func (c *CommentsListCall) View(view string) *CommentsListCall {
 
1379
        c.opt_["view"] = view
 
1380
        return c
 
1381
}
 
1382
 
 
1383
// Fields allows partial responses to be retrieved.
 
1384
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1385
// for more information.
 
1386
func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
 
1387
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1388
        return c
 
1389
}
 
1390
 
 
1391
func (c *CommentsListCall) Do() (*CommentList, error) {
 
1392
        var body io.Reader = nil
 
1393
        params := make(url.Values)
 
1394
        params.Set("alt", "json")
 
1395
        if v, ok := c.opt_["endDate"]; ok {
 
1396
                params.Set("endDate", fmt.Sprintf("%v", v))
 
1397
        }
 
1398
        if v, ok := c.opt_["fetchBodies"]; ok {
 
1399
                params.Set("fetchBodies", fmt.Sprintf("%v", v))
 
1400
        }
 
1401
        if v, ok := c.opt_["maxResults"]; ok {
 
1402
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1403
        }
 
1404
        if v, ok := c.opt_["pageToken"]; ok {
 
1405
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1406
        }
 
1407
        if v, ok := c.opt_["startDate"]; ok {
 
1408
                params.Set("startDate", fmt.Sprintf("%v", v))
 
1409
        }
 
1410
        if v, ok := c.opt_["statuses"]; ok {
 
1411
                params.Set("statuses", fmt.Sprintf("%v", v))
 
1412
        }
 
1413
        if v, ok := c.opt_["view"]; ok {
 
1414
                params.Set("view", fmt.Sprintf("%v", v))
 
1415
        }
 
1416
        if v, ok := c.opt_["fields"]; ok {
 
1417
                params.Set("fields", fmt.Sprintf("%v", v))
 
1418
        }
 
1419
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/comments")
 
1420
        urls += "?" + params.Encode()
 
1421
        req, _ := http.NewRequest("GET", urls, body)
 
1422
        googleapi.Expand(req.URL, map[string]string{
 
1423
                "blogId": c.blogId,
 
1424
                "postId": c.postId,
 
1425
        })
 
1426
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1427
        res, err := c.s.client.Do(req)
 
1428
        if err != nil {
 
1429
                return nil, err
 
1430
        }
 
1431
        defer googleapi.CloseBody(res)
 
1432
        if err := googleapi.CheckResponse(res); err != nil {
 
1433
                return nil, err
 
1434
        }
 
1435
        var ret *CommentList
 
1436
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1437
                return nil, err
 
1438
        }
 
1439
        return ret, nil
 
1440
        // {
 
1441
        //   "description": "Retrieves the comments for a post, possibly filtered.",
 
1442
        //   "httpMethod": "GET",
 
1443
        //   "id": "blogger.comments.list",
 
1444
        //   "parameterOrder": [
 
1445
        //     "blogId",
 
1446
        //     "postId"
 
1447
        //   ],
 
1448
        //   "parameters": {
 
1449
        //     "blogId": {
 
1450
        //       "description": "ID of the blog to fetch comments from.",
 
1451
        //       "location": "path",
 
1452
        //       "required": true,
 
1453
        //       "type": "string"
 
1454
        //     },
 
1455
        //     "endDate": {
 
1456
        //       "description": "Latest date of comment to fetch, a date-time with RFC 3339 formatting.",
 
1457
        //       "format": "date-time",
 
1458
        //       "location": "query",
 
1459
        //       "type": "string"
 
1460
        //     },
 
1461
        //     "fetchBodies": {
 
1462
        //       "description": "Whether the body content of the comments is included.",
 
1463
        //       "location": "query",
 
1464
        //       "type": "boolean"
 
1465
        //     },
 
1466
        //     "maxResults": {
 
1467
        //       "description": "Maximum number of comments to include in the result.",
 
1468
        //       "format": "uint32",
 
1469
        //       "location": "query",
 
1470
        //       "type": "integer"
 
1471
        //     },
 
1472
        //     "pageToken": {
 
1473
        //       "description": "Continuation token if request is paged.",
 
1474
        //       "location": "query",
 
1475
        //       "type": "string"
 
1476
        //     },
 
1477
        //     "postId": {
 
1478
        //       "description": "ID of the post to fetch posts from.",
 
1479
        //       "location": "path",
 
1480
        //       "required": true,
 
1481
        //       "type": "string"
 
1482
        //     },
 
1483
        //     "startDate": {
 
1484
        //       "description": "Earliest date of comment to fetch, a date-time with RFC 3339 formatting.",
 
1485
        //       "format": "date-time",
 
1486
        //       "location": "query",
 
1487
        //       "type": "string"
 
1488
        //     },
 
1489
        //     "statuses": {
 
1490
        //       "enum": [
 
1491
        //         "emptied",
 
1492
        //         "live",
 
1493
        //         "pending",
 
1494
        //         "spam"
 
1495
        //       ],
 
1496
        //       "enumDescriptions": [
 
1497
        //         "Comments that have had their content removed",
 
1498
        //         "Comments that are publicly visible",
 
1499
        //         "Comments that are awaiting administrator approval",
 
1500
        //         "Comments marked as spam by the administrator"
 
1501
        //       ],
 
1502
        //       "location": "query",
 
1503
        //       "repeated": true,
 
1504
        //       "type": "string"
 
1505
        //     },
 
1506
        //     "view": {
 
1507
        //       "enum": [
 
1508
        //         "ADMIN",
 
1509
        //         "AUTHOR",
 
1510
        //         "READER"
 
1511
        //       ],
 
1512
        //       "enumDescriptions": [
 
1513
        //         "Admin level detail",
 
1514
        //         "Author level detail",
 
1515
        //         "Admin level detail"
 
1516
        //       ],
 
1517
        //       "location": "query",
 
1518
        //       "type": "string"
 
1519
        //     }
 
1520
        //   },
 
1521
        //   "path": "blogs/{blogId}/posts/{postId}/comments",
 
1522
        //   "response": {
 
1523
        //     "$ref": "CommentList"
 
1524
        //   },
 
1525
        //   "scopes": [
 
1526
        //     "https://www.googleapis.com/auth/blogger",
 
1527
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
1528
        //   ]
 
1529
        // }
 
1530
 
 
1531
}
 
1532
 
 
1533
// method id "blogger.comments.listByBlog":
 
1534
 
 
1535
type CommentsListByBlogCall struct {
 
1536
        s      *Service
 
1537
        blogId string
 
1538
        opt_   map[string]interface{}
 
1539
}
 
1540
 
 
1541
// ListByBlog: Retrieves the comments for a blog, across all posts,
 
1542
// possibly filtered.
 
1543
func (r *CommentsService) ListByBlog(blogId string) *CommentsListByBlogCall {
 
1544
        c := &CommentsListByBlogCall{s: r.s, opt_: make(map[string]interface{})}
 
1545
        c.blogId = blogId
 
1546
        return c
 
1547
}
 
1548
 
 
1549
// EndDate sets the optional parameter "endDate": Latest date of comment
 
1550
// to fetch, a date-time with RFC 3339 formatting.
 
1551
func (c *CommentsListByBlogCall) EndDate(endDate string) *CommentsListByBlogCall {
 
1552
        c.opt_["endDate"] = endDate
 
1553
        return c
 
1554
}
 
1555
 
 
1556
// FetchBodies sets the optional parameter "fetchBodies": Whether the
 
1557
// body content of the comments is included.
 
1558
func (c *CommentsListByBlogCall) FetchBodies(fetchBodies bool) *CommentsListByBlogCall {
 
1559
        c.opt_["fetchBodies"] = fetchBodies
 
1560
        return c
 
1561
}
 
1562
 
 
1563
// MaxResults sets the optional parameter "maxResults": Maximum number
 
1564
// of comments to include in the result.
 
1565
func (c *CommentsListByBlogCall) MaxResults(maxResults int64) *CommentsListByBlogCall {
 
1566
        c.opt_["maxResults"] = maxResults
 
1567
        return c
 
1568
}
 
1569
 
 
1570
// PageToken sets the optional parameter "pageToken": Continuation token
 
1571
// if request is paged.
 
1572
func (c *CommentsListByBlogCall) PageToken(pageToken string) *CommentsListByBlogCall {
 
1573
        c.opt_["pageToken"] = pageToken
 
1574
        return c
 
1575
}
 
1576
 
 
1577
// StartDate sets the optional parameter "startDate": Earliest date of
 
1578
// comment to fetch, a date-time with RFC 3339 formatting.
 
1579
func (c *CommentsListByBlogCall) StartDate(startDate string) *CommentsListByBlogCall {
 
1580
        c.opt_["startDate"] = startDate
 
1581
        return c
 
1582
}
 
1583
 
 
1584
// Fields allows partial responses to be retrieved.
 
1585
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1586
// for more information.
 
1587
func (c *CommentsListByBlogCall) Fields(s ...googleapi.Field) *CommentsListByBlogCall {
 
1588
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1589
        return c
 
1590
}
 
1591
 
 
1592
func (c *CommentsListByBlogCall) Do() (*CommentList, error) {
 
1593
        var body io.Reader = nil
 
1594
        params := make(url.Values)
 
1595
        params.Set("alt", "json")
 
1596
        if v, ok := c.opt_["endDate"]; ok {
 
1597
                params.Set("endDate", fmt.Sprintf("%v", v))
 
1598
        }
 
1599
        if v, ok := c.opt_["fetchBodies"]; ok {
 
1600
                params.Set("fetchBodies", fmt.Sprintf("%v", v))
 
1601
        }
 
1602
        if v, ok := c.opt_["maxResults"]; ok {
 
1603
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1604
        }
 
1605
        if v, ok := c.opt_["pageToken"]; ok {
 
1606
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1607
        }
 
1608
        if v, ok := c.opt_["startDate"]; ok {
 
1609
                params.Set("startDate", fmt.Sprintf("%v", v))
 
1610
        }
 
1611
        if v, ok := c.opt_["fields"]; ok {
 
1612
                params.Set("fields", fmt.Sprintf("%v", v))
 
1613
        }
 
1614
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/comments")
 
1615
        urls += "?" + params.Encode()
 
1616
        req, _ := http.NewRequest("GET", urls, body)
 
1617
        googleapi.Expand(req.URL, map[string]string{
 
1618
                "blogId": c.blogId,
 
1619
        })
 
1620
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1621
        res, err := c.s.client.Do(req)
 
1622
        if err != nil {
 
1623
                return nil, err
 
1624
        }
 
1625
        defer googleapi.CloseBody(res)
 
1626
        if err := googleapi.CheckResponse(res); err != nil {
 
1627
                return nil, err
 
1628
        }
 
1629
        var ret *CommentList
 
1630
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1631
                return nil, err
 
1632
        }
 
1633
        return ret, nil
 
1634
        // {
 
1635
        //   "description": "Retrieves the comments for a blog, across all posts, possibly filtered.",
 
1636
        //   "httpMethod": "GET",
 
1637
        //   "id": "blogger.comments.listByBlog",
 
1638
        //   "parameterOrder": [
 
1639
        //     "blogId"
 
1640
        //   ],
 
1641
        //   "parameters": {
 
1642
        //     "blogId": {
 
1643
        //       "description": "ID of the blog to fetch comments from.",
 
1644
        //       "location": "path",
 
1645
        //       "required": true,
 
1646
        //       "type": "string"
 
1647
        //     },
 
1648
        //     "endDate": {
 
1649
        //       "description": "Latest date of comment to fetch, a date-time with RFC 3339 formatting.",
 
1650
        //       "format": "date-time",
 
1651
        //       "location": "query",
 
1652
        //       "type": "string"
 
1653
        //     },
 
1654
        //     "fetchBodies": {
 
1655
        //       "description": "Whether the body content of the comments is included.",
 
1656
        //       "location": "query",
 
1657
        //       "type": "boolean"
 
1658
        //     },
 
1659
        //     "maxResults": {
 
1660
        //       "description": "Maximum number of comments to include in the result.",
 
1661
        //       "format": "uint32",
 
1662
        //       "location": "query",
 
1663
        //       "type": "integer"
 
1664
        //     },
 
1665
        //     "pageToken": {
 
1666
        //       "description": "Continuation token if request is paged.",
 
1667
        //       "location": "query",
 
1668
        //       "type": "string"
 
1669
        //     },
 
1670
        //     "startDate": {
 
1671
        //       "description": "Earliest date of comment to fetch, a date-time with RFC 3339 formatting.",
 
1672
        //       "format": "date-time",
 
1673
        //       "location": "query",
 
1674
        //       "type": "string"
 
1675
        //     }
 
1676
        //   },
 
1677
        //   "path": "blogs/{blogId}/comments",
 
1678
        //   "response": {
 
1679
        //     "$ref": "CommentList"
 
1680
        //   },
 
1681
        //   "scopes": [
 
1682
        //     "https://www.googleapis.com/auth/blogger",
 
1683
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
1684
        //   ]
 
1685
        // }
 
1686
 
 
1687
}
 
1688
 
 
1689
// method id "blogger.comments.markAsSpam":
 
1690
 
 
1691
type CommentsMarkAsSpamCall struct {
 
1692
        s         *Service
 
1693
        blogId    string
 
1694
        postId    string
 
1695
        commentId string
 
1696
        opt_      map[string]interface{}
 
1697
}
 
1698
 
 
1699
// MarkAsSpam: Marks a comment as spam.
 
1700
func (r *CommentsService) MarkAsSpam(blogId string, postId string, commentId string) *CommentsMarkAsSpamCall {
 
1701
        c := &CommentsMarkAsSpamCall{s: r.s, opt_: make(map[string]interface{})}
 
1702
        c.blogId = blogId
 
1703
        c.postId = postId
 
1704
        c.commentId = commentId
 
1705
        return c
 
1706
}
 
1707
 
 
1708
// Fields allows partial responses to be retrieved.
 
1709
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1710
// for more information.
 
1711
func (c *CommentsMarkAsSpamCall) Fields(s ...googleapi.Field) *CommentsMarkAsSpamCall {
 
1712
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1713
        return c
 
1714
}
 
1715
 
 
1716
func (c *CommentsMarkAsSpamCall) Do() (*Comment, error) {
 
1717
        var body io.Reader = nil
 
1718
        params := make(url.Values)
 
1719
        params.Set("alt", "json")
 
1720
        if v, ok := c.opt_["fields"]; ok {
 
1721
                params.Set("fields", fmt.Sprintf("%v", v))
 
1722
        }
 
1723
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/comments/{commentId}/spam")
 
1724
        urls += "?" + params.Encode()
 
1725
        req, _ := http.NewRequest("POST", urls, body)
 
1726
        googleapi.Expand(req.URL, map[string]string{
 
1727
                "blogId":    c.blogId,
 
1728
                "postId":    c.postId,
 
1729
                "commentId": c.commentId,
 
1730
        })
 
1731
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1732
        res, err := c.s.client.Do(req)
 
1733
        if err != nil {
 
1734
                return nil, err
 
1735
        }
 
1736
        defer googleapi.CloseBody(res)
 
1737
        if err := googleapi.CheckResponse(res); err != nil {
 
1738
                return nil, err
 
1739
        }
 
1740
        var ret *Comment
 
1741
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1742
                return nil, err
 
1743
        }
 
1744
        return ret, nil
 
1745
        // {
 
1746
        //   "description": "Marks a comment as spam.",
 
1747
        //   "httpMethod": "POST",
 
1748
        //   "id": "blogger.comments.markAsSpam",
 
1749
        //   "parameterOrder": [
 
1750
        //     "blogId",
 
1751
        //     "postId",
 
1752
        //     "commentId"
 
1753
        //   ],
 
1754
        //   "parameters": {
 
1755
        //     "blogId": {
 
1756
        //       "description": "The Id of the Blog.",
 
1757
        //       "location": "path",
 
1758
        //       "required": true,
 
1759
        //       "type": "string"
 
1760
        //     },
 
1761
        //     "commentId": {
 
1762
        //       "description": "The ID of the comment to mark as spam.",
 
1763
        //       "location": "path",
 
1764
        //       "required": true,
 
1765
        //       "type": "string"
 
1766
        //     },
 
1767
        //     "postId": {
 
1768
        //       "description": "The ID of the Post.",
 
1769
        //       "location": "path",
 
1770
        //       "required": true,
 
1771
        //       "type": "string"
 
1772
        //     }
 
1773
        //   },
 
1774
        //   "path": "blogs/{blogId}/posts/{postId}/comments/{commentId}/spam",
 
1775
        //   "response": {
 
1776
        //     "$ref": "Comment"
 
1777
        //   },
 
1778
        //   "scopes": [
 
1779
        //     "https://www.googleapis.com/auth/blogger"
 
1780
        //   ]
 
1781
        // }
 
1782
 
 
1783
}
 
1784
 
 
1785
// method id "blogger.comments.removeContent":
 
1786
 
 
1787
type CommentsRemoveContentCall struct {
 
1788
        s         *Service
 
1789
        blogId    string
 
1790
        postId    string
 
1791
        commentId string
 
1792
        opt_      map[string]interface{}
 
1793
}
 
1794
 
 
1795
// RemoveContent: Removes the content of a comment.
 
1796
func (r *CommentsService) RemoveContent(blogId string, postId string, commentId string) *CommentsRemoveContentCall {
 
1797
        c := &CommentsRemoveContentCall{s: r.s, opt_: make(map[string]interface{})}
 
1798
        c.blogId = blogId
 
1799
        c.postId = postId
 
1800
        c.commentId = commentId
 
1801
        return c
 
1802
}
 
1803
 
 
1804
// Fields allows partial responses to be retrieved.
 
1805
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1806
// for more information.
 
1807
func (c *CommentsRemoveContentCall) Fields(s ...googleapi.Field) *CommentsRemoveContentCall {
 
1808
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1809
        return c
 
1810
}
 
1811
 
 
1812
func (c *CommentsRemoveContentCall) Do() (*Comment, error) {
 
1813
        var body io.Reader = nil
 
1814
        params := make(url.Values)
 
1815
        params.Set("alt", "json")
 
1816
        if v, ok := c.opt_["fields"]; ok {
 
1817
                params.Set("fields", fmt.Sprintf("%v", v))
 
1818
        }
 
1819
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent")
 
1820
        urls += "?" + params.Encode()
 
1821
        req, _ := http.NewRequest("POST", urls, body)
 
1822
        googleapi.Expand(req.URL, map[string]string{
 
1823
                "blogId":    c.blogId,
 
1824
                "postId":    c.postId,
 
1825
                "commentId": c.commentId,
 
1826
        })
 
1827
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1828
        res, err := c.s.client.Do(req)
 
1829
        if err != nil {
 
1830
                return nil, err
 
1831
        }
 
1832
        defer googleapi.CloseBody(res)
 
1833
        if err := googleapi.CheckResponse(res); err != nil {
 
1834
                return nil, err
 
1835
        }
 
1836
        var ret *Comment
 
1837
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1838
                return nil, err
 
1839
        }
 
1840
        return ret, nil
 
1841
        // {
 
1842
        //   "description": "Removes the content of a comment.",
 
1843
        //   "httpMethod": "POST",
 
1844
        //   "id": "blogger.comments.removeContent",
 
1845
        //   "parameterOrder": [
 
1846
        //     "blogId",
 
1847
        //     "postId",
 
1848
        //     "commentId"
 
1849
        //   ],
 
1850
        //   "parameters": {
 
1851
        //     "blogId": {
 
1852
        //       "description": "The Id of the Blog.",
 
1853
        //       "location": "path",
 
1854
        //       "required": true,
 
1855
        //       "type": "string"
 
1856
        //     },
 
1857
        //     "commentId": {
 
1858
        //       "description": "The ID of the comment to delete content from.",
 
1859
        //       "location": "path",
 
1860
        //       "required": true,
 
1861
        //       "type": "string"
 
1862
        //     },
 
1863
        //     "postId": {
 
1864
        //       "description": "The ID of the Post.",
 
1865
        //       "location": "path",
 
1866
        //       "required": true,
 
1867
        //       "type": "string"
 
1868
        //     }
 
1869
        //   },
 
1870
        //   "path": "blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent",
 
1871
        //   "response": {
 
1872
        //     "$ref": "Comment"
 
1873
        //   },
 
1874
        //   "scopes": [
 
1875
        //     "https://www.googleapis.com/auth/blogger"
 
1876
        //   ]
 
1877
        // }
 
1878
 
 
1879
}
 
1880
 
 
1881
// method id "blogger.pageViews.get":
 
1882
 
 
1883
type PageViewsGetCall struct {
 
1884
        s      *Service
 
1885
        blogId string
 
1886
        opt_   map[string]interface{}
 
1887
}
 
1888
 
 
1889
// Get: Retrieve pageview stats for a Blog.
 
1890
func (r *PageViewsService) Get(blogId string) *PageViewsGetCall {
 
1891
        c := &PageViewsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1892
        c.blogId = blogId
 
1893
        return c
 
1894
}
 
1895
 
 
1896
// Range sets the optional parameter "range":
 
1897
func (c *PageViewsGetCall) Range(range_ string) *PageViewsGetCall {
 
1898
        c.opt_["range"] = range_
 
1899
        return c
 
1900
}
 
1901
 
 
1902
// Fields allows partial responses to be retrieved.
 
1903
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1904
// for more information.
 
1905
func (c *PageViewsGetCall) Fields(s ...googleapi.Field) *PageViewsGetCall {
 
1906
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1907
        return c
 
1908
}
 
1909
 
 
1910
func (c *PageViewsGetCall) Do() (*Pageviews, error) {
 
1911
        var body io.Reader = nil
 
1912
        params := make(url.Values)
 
1913
        params.Set("alt", "json")
 
1914
        if v, ok := c.opt_["range"]; ok {
 
1915
                params.Set("range", fmt.Sprintf("%v", v))
 
1916
        }
 
1917
        if v, ok := c.opt_["fields"]; ok {
 
1918
                params.Set("fields", fmt.Sprintf("%v", v))
 
1919
        }
 
1920
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pageviews")
 
1921
        urls += "?" + params.Encode()
 
1922
        req, _ := http.NewRequest("GET", urls, body)
 
1923
        googleapi.Expand(req.URL, map[string]string{
 
1924
                "blogId": c.blogId,
 
1925
        })
 
1926
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1927
        res, err := c.s.client.Do(req)
 
1928
        if err != nil {
 
1929
                return nil, err
 
1930
        }
 
1931
        defer googleapi.CloseBody(res)
 
1932
        if err := googleapi.CheckResponse(res); err != nil {
 
1933
                return nil, err
 
1934
        }
 
1935
        var ret *Pageviews
 
1936
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1937
                return nil, err
 
1938
        }
 
1939
        return ret, nil
 
1940
        // {
 
1941
        //   "description": "Retrieve pageview stats for a Blog.",
 
1942
        //   "httpMethod": "GET",
 
1943
        //   "id": "blogger.pageViews.get",
 
1944
        //   "parameterOrder": [
 
1945
        //     "blogId"
 
1946
        //   ],
 
1947
        //   "parameters": {
 
1948
        //     "blogId": {
 
1949
        //       "description": "The ID of the blog to get.",
 
1950
        //       "location": "path",
 
1951
        //       "required": true,
 
1952
        //       "type": "string"
 
1953
        //     },
 
1954
        //     "range": {
 
1955
        //       "enum": [
 
1956
        //         "30DAYS",
 
1957
        //         "7DAYS",
 
1958
        //         "all"
 
1959
        //       ],
 
1960
        //       "enumDescriptions": [
 
1961
        //         "Page view counts from the last thirty days.",
 
1962
        //         "Page view counts from the last seven days.",
 
1963
        //         "Total page view counts from all time."
 
1964
        //       ],
 
1965
        //       "location": "query",
 
1966
        //       "repeated": true,
 
1967
        //       "type": "string"
 
1968
        //     }
 
1969
        //   },
 
1970
        //   "path": "blogs/{blogId}/pageviews",
 
1971
        //   "response": {
 
1972
        //     "$ref": "Pageviews"
 
1973
        //   },
 
1974
        //   "scopes": [
 
1975
        //     "https://www.googleapis.com/auth/blogger"
 
1976
        //   ]
 
1977
        // }
 
1978
 
 
1979
}
 
1980
 
 
1981
// method id "blogger.pages.delete":
 
1982
 
 
1983
type PagesDeleteCall struct {
 
1984
        s      *Service
 
1985
        blogId string
 
1986
        pageId string
 
1987
        opt_   map[string]interface{}
 
1988
}
 
1989
 
 
1990
// Delete: Delete a page by id.
 
1991
func (r *PagesService) Delete(blogId string, pageId string) *PagesDeleteCall {
 
1992
        c := &PagesDeleteCall{s: r.s, opt_: make(map[string]interface{})}
 
1993
        c.blogId = blogId
 
1994
        c.pageId = pageId
 
1995
        return c
 
1996
}
 
1997
 
 
1998
// Fields allows partial responses to be retrieved.
 
1999
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2000
// for more information.
 
2001
func (c *PagesDeleteCall) Fields(s ...googleapi.Field) *PagesDeleteCall {
 
2002
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2003
        return c
 
2004
}
 
2005
 
 
2006
func (c *PagesDeleteCall) Do() error {
 
2007
        var body io.Reader = nil
 
2008
        params := make(url.Values)
 
2009
        params.Set("alt", "json")
 
2010
        if v, ok := c.opt_["fields"]; ok {
 
2011
                params.Set("fields", fmt.Sprintf("%v", v))
 
2012
        }
 
2013
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pages/{pageId}")
 
2014
        urls += "?" + params.Encode()
 
2015
        req, _ := http.NewRequest("DELETE", urls, body)
 
2016
        googleapi.Expand(req.URL, map[string]string{
 
2017
                "blogId": c.blogId,
 
2018
                "pageId": c.pageId,
 
2019
        })
 
2020
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2021
        res, err := c.s.client.Do(req)
 
2022
        if err != nil {
 
2023
                return err
 
2024
        }
 
2025
        defer googleapi.CloseBody(res)
 
2026
        if err := googleapi.CheckResponse(res); err != nil {
 
2027
                return err
 
2028
        }
 
2029
        return nil
 
2030
        // {
 
2031
        //   "description": "Delete a page by id.",
 
2032
        //   "httpMethod": "DELETE",
 
2033
        //   "id": "blogger.pages.delete",
 
2034
        //   "parameterOrder": [
 
2035
        //     "blogId",
 
2036
        //     "pageId"
 
2037
        //   ],
 
2038
        //   "parameters": {
 
2039
        //     "blogId": {
 
2040
        //       "description": "The Id of the Blog.",
 
2041
        //       "location": "path",
 
2042
        //       "required": true,
 
2043
        //       "type": "string"
 
2044
        //     },
 
2045
        //     "pageId": {
 
2046
        //       "description": "The ID of the Page.",
 
2047
        //       "location": "path",
 
2048
        //       "required": true,
 
2049
        //       "type": "string"
 
2050
        //     }
 
2051
        //   },
 
2052
        //   "path": "blogs/{blogId}/pages/{pageId}",
 
2053
        //   "scopes": [
 
2054
        //     "https://www.googleapis.com/auth/blogger"
 
2055
        //   ]
 
2056
        // }
 
2057
 
 
2058
}
 
2059
 
 
2060
// method id "blogger.pages.get":
 
2061
 
 
2062
type PagesGetCall struct {
 
2063
        s      *Service
 
2064
        blogId string
 
2065
        pageId string
 
2066
        opt_   map[string]interface{}
 
2067
}
 
2068
 
 
2069
// Get: Gets one blog page by id.
 
2070
func (r *PagesService) Get(blogId string, pageId string) *PagesGetCall {
 
2071
        c := &PagesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2072
        c.blogId = blogId
 
2073
        c.pageId = pageId
 
2074
        return c
 
2075
}
 
2076
 
 
2077
// View sets the optional parameter "view":
 
2078
func (c *PagesGetCall) View(view string) *PagesGetCall {
 
2079
        c.opt_["view"] = view
 
2080
        return c
 
2081
}
 
2082
 
 
2083
// Fields allows partial responses to be retrieved.
 
2084
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2085
// for more information.
 
2086
func (c *PagesGetCall) Fields(s ...googleapi.Field) *PagesGetCall {
 
2087
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2088
        return c
 
2089
}
 
2090
 
 
2091
func (c *PagesGetCall) Do() (*Page, error) {
 
2092
        var body io.Reader = nil
 
2093
        params := make(url.Values)
 
2094
        params.Set("alt", "json")
 
2095
        if v, ok := c.opt_["view"]; ok {
 
2096
                params.Set("view", fmt.Sprintf("%v", v))
 
2097
        }
 
2098
        if v, ok := c.opt_["fields"]; ok {
 
2099
                params.Set("fields", fmt.Sprintf("%v", v))
 
2100
        }
 
2101
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pages/{pageId}")
 
2102
        urls += "?" + params.Encode()
 
2103
        req, _ := http.NewRequest("GET", urls, body)
 
2104
        googleapi.Expand(req.URL, map[string]string{
 
2105
                "blogId": c.blogId,
 
2106
                "pageId": c.pageId,
 
2107
        })
 
2108
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2109
        res, err := c.s.client.Do(req)
 
2110
        if err != nil {
 
2111
                return nil, err
 
2112
        }
 
2113
        defer googleapi.CloseBody(res)
 
2114
        if err := googleapi.CheckResponse(res); err != nil {
 
2115
                return nil, err
 
2116
        }
 
2117
        var ret *Page
 
2118
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2119
                return nil, err
 
2120
        }
 
2121
        return ret, nil
 
2122
        // {
 
2123
        //   "description": "Gets one blog page by id.",
 
2124
        //   "httpMethod": "GET",
 
2125
        //   "id": "blogger.pages.get",
 
2126
        //   "parameterOrder": [
 
2127
        //     "blogId",
 
2128
        //     "pageId"
 
2129
        //   ],
 
2130
        //   "parameters": {
 
2131
        //     "blogId": {
 
2132
        //       "description": "ID of the blog containing the page.",
 
2133
        //       "location": "path",
 
2134
        //       "required": true,
 
2135
        //       "type": "string"
 
2136
        //     },
 
2137
        //     "pageId": {
 
2138
        //       "description": "The ID of the page to get.",
 
2139
        //       "location": "path",
 
2140
        //       "required": true,
 
2141
        //       "type": "string"
 
2142
        //     },
 
2143
        //     "view": {
 
2144
        //       "enum": [
 
2145
        //         "ADMIN",
 
2146
        //         "AUTHOR",
 
2147
        //         "READER"
 
2148
        //       ],
 
2149
        //       "enumDescriptions": [
 
2150
        //         "Admin level detail",
 
2151
        //         "Author level detail",
 
2152
        //         "Admin level detail"
 
2153
        //       ],
 
2154
        //       "location": "query",
 
2155
        //       "type": "string"
 
2156
        //     }
 
2157
        //   },
 
2158
        //   "path": "blogs/{blogId}/pages/{pageId}",
 
2159
        //   "response": {
 
2160
        //     "$ref": "Page"
 
2161
        //   },
 
2162
        //   "scopes": [
 
2163
        //     "https://www.googleapis.com/auth/blogger",
 
2164
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
2165
        //   ]
 
2166
        // }
 
2167
 
 
2168
}
 
2169
 
 
2170
// method id "blogger.pages.insert":
 
2171
 
 
2172
type PagesInsertCall struct {
 
2173
        s      *Service
 
2174
        blogId string
 
2175
        page   *Page
 
2176
        opt_   map[string]interface{}
 
2177
}
 
2178
 
 
2179
// Insert: Add a page.
 
2180
func (r *PagesService) Insert(blogId string, page *Page) *PagesInsertCall {
 
2181
        c := &PagesInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
2182
        c.blogId = blogId
 
2183
        c.page = page
 
2184
        return c
 
2185
}
 
2186
 
 
2187
// Fields allows partial responses to be retrieved.
 
2188
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2189
// for more information.
 
2190
func (c *PagesInsertCall) Fields(s ...googleapi.Field) *PagesInsertCall {
 
2191
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2192
        return c
 
2193
}
 
2194
 
 
2195
func (c *PagesInsertCall) Do() (*Page, error) {
 
2196
        var body io.Reader = nil
 
2197
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
 
2198
        if err != nil {
 
2199
                return nil, err
 
2200
        }
 
2201
        ctype := "application/json"
 
2202
        params := make(url.Values)
 
2203
        params.Set("alt", "json")
 
2204
        if v, ok := c.opt_["fields"]; ok {
 
2205
                params.Set("fields", fmt.Sprintf("%v", v))
 
2206
        }
 
2207
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pages")
 
2208
        urls += "?" + params.Encode()
 
2209
        req, _ := http.NewRequest("POST", urls, body)
 
2210
        googleapi.Expand(req.URL, map[string]string{
 
2211
                "blogId": c.blogId,
 
2212
        })
 
2213
        req.Header.Set("Content-Type", ctype)
 
2214
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2215
        res, err := c.s.client.Do(req)
 
2216
        if err != nil {
 
2217
                return nil, err
 
2218
        }
 
2219
        defer googleapi.CloseBody(res)
 
2220
        if err := googleapi.CheckResponse(res); err != nil {
 
2221
                return nil, err
 
2222
        }
 
2223
        var ret *Page
 
2224
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2225
                return nil, err
 
2226
        }
 
2227
        return ret, nil
 
2228
        // {
 
2229
        //   "description": "Add a page.",
 
2230
        //   "httpMethod": "POST",
 
2231
        //   "id": "blogger.pages.insert",
 
2232
        //   "parameterOrder": [
 
2233
        //     "blogId"
 
2234
        //   ],
 
2235
        //   "parameters": {
 
2236
        //     "blogId": {
 
2237
        //       "description": "ID of the blog to add the page to.",
 
2238
        //       "location": "path",
 
2239
        //       "required": true,
 
2240
        //       "type": "string"
 
2241
        //     }
 
2242
        //   },
 
2243
        //   "path": "blogs/{blogId}/pages",
 
2244
        //   "request": {
 
2245
        //     "$ref": "Page"
 
2246
        //   },
 
2247
        //   "response": {
 
2248
        //     "$ref": "Page"
 
2249
        //   },
 
2250
        //   "scopes": [
 
2251
        //     "https://www.googleapis.com/auth/blogger"
 
2252
        //   ]
 
2253
        // }
 
2254
 
 
2255
}
 
2256
 
 
2257
// method id "blogger.pages.list":
 
2258
 
 
2259
type PagesListCall struct {
 
2260
        s      *Service
 
2261
        blogId string
 
2262
        opt_   map[string]interface{}
 
2263
}
 
2264
 
 
2265
// List: Retrieves the pages for a blog, optionally including non-LIVE
 
2266
// statuses.
 
2267
func (r *PagesService) List(blogId string) *PagesListCall {
 
2268
        c := &PagesListCall{s: r.s, opt_: make(map[string]interface{})}
 
2269
        c.blogId = blogId
 
2270
        return c
 
2271
}
 
2272
 
 
2273
// FetchBodies sets the optional parameter "fetchBodies": Whether to
 
2274
// retrieve the Page bodies.
 
2275
func (c *PagesListCall) FetchBodies(fetchBodies bool) *PagesListCall {
 
2276
        c.opt_["fetchBodies"] = fetchBodies
 
2277
        return c
 
2278
}
 
2279
 
 
2280
// Statuses sets the optional parameter "statuses":
 
2281
func (c *PagesListCall) Statuses(statuses string) *PagesListCall {
 
2282
        c.opt_["statuses"] = statuses
 
2283
        return c
 
2284
}
 
2285
 
 
2286
// View sets the optional parameter "view":
 
2287
func (c *PagesListCall) View(view string) *PagesListCall {
 
2288
        c.opt_["view"] = view
 
2289
        return c
 
2290
}
 
2291
 
 
2292
// Fields allows partial responses to be retrieved.
 
2293
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2294
// for more information.
 
2295
func (c *PagesListCall) Fields(s ...googleapi.Field) *PagesListCall {
 
2296
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2297
        return c
 
2298
}
 
2299
 
 
2300
func (c *PagesListCall) Do() (*PageList, error) {
 
2301
        var body io.Reader = nil
 
2302
        params := make(url.Values)
 
2303
        params.Set("alt", "json")
 
2304
        if v, ok := c.opt_["fetchBodies"]; ok {
 
2305
                params.Set("fetchBodies", fmt.Sprintf("%v", v))
 
2306
        }
 
2307
        if v, ok := c.opt_["statuses"]; ok {
 
2308
                params.Set("statuses", fmt.Sprintf("%v", v))
 
2309
        }
 
2310
        if v, ok := c.opt_["view"]; ok {
 
2311
                params.Set("view", fmt.Sprintf("%v", v))
 
2312
        }
 
2313
        if v, ok := c.opt_["fields"]; ok {
 
2314
                params.Set("fields", fmt.Sprintf("%v", v))
 
2315
        }
 
2316
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pages")
 
2317
        urls += "?" + params.Encode()
 
2318
        req, _ := http.NewRequest("GET", urls, body)
 
2319
        googleapi.Expand(req.URL, map[string]string{
 
2320
                "blogId": c.blogId,
 
2321
        })
 
2322
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2323
        res, err := c.s.client.Do(req)
 
2324
        if err != nil {
 
2325
                return nil, err
 
2326
        }
 
2327
        defer googleapi.CloseBody(res)
 
2328
        if err := googleapi.CheckResponse(res); err != nil {
 
2329
                return nil, err
 
2330
        }
 
2331
        var ret *PageList
 
2332
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2333
                return nil, err
 
2334
        }
 
2335
        return ret, nil
 
2336
        // {
 
2337
        //   "description": "Retrieves the pages for a blog, optionally including non-LIVE statuses.",
 
2338
        //   "httpMethod": "GET",
 
2339
        //   "id": "blogger.pages.list",
 
2340
        //   "parameterOrder": [
 
2341
        //     "blogId"
 
2342
        //   ],
 
2343
        //   "parameters": {
 
2344
        //     "blogId": {
 
2345
        //       "description": "ID of the blog to fetch pages from.",
 
2346
        //       "location": "path",
 
2347
        //       "required": true,
 
2348
        //       "type": "string"
 
2349
        //     },
 
2350
        //     "fetchBodies": {
 
2351
        //       "description": "Whether to retrieve the Page bodies.",
 
2352
        //       "location": "query",
 
2353
        //       "type": "boolean"
 
2354
        //     },
 
2355
        //     "statuses": {
 
2356
        //       "enum": [
 
2357
        //         "draft",
 
2358
        //         "imported",
 
2359
        //         "live"
 
2360
        //       ],
 
2361
        //       "enumDescriptions": [
 
2362
        //         "Draft (unpublished) Pages",
 
2363
        //         "Pages that have had their content removed",
 
2364
        //         "Pages that are publicly visible"
 
2365
        //       ],
 
2366
        //       "location": "query",
 
2367
        //       "repeated": true,
 
2368
        //       "type": "string"
 
2369
        //     },
 
2370
        //     "view": {
 
2371
        //       "enum": [
 
2372
        //         "ADMIN",
 
2373
        //         "AUTHOR",
 
2374
        //         "READER"
 
2375
        //       ],
 
2376
        //       "enumDescriptions": [
 
2377
        //         "Admin level detail",
 
2378
        //         "Author level detail",
 
2379
        //         "Admin level detail"
 
2380
        //       ],
 
2381
        //       "location": "query",
 
2382
        //       "type": "string"
 
2383
        //     }
 
2384
        //   },
 
2385
        //   "path": "blogs/{blogId}/pages",
 
2386
        //   "response": {
 
2387
        //     "$ref": "PageList"
 
2388
        //   },
 
2389
        //   "scopes": [
 
2390
        //     "https://www.googleapis.com/auth/blogger",
 
2391
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
2392
        //   ]
 
2393
        // }
 
2394
 
 
2395
}
 
2396
 
 
2397
// method id "blogger.pages.patch":
 
2398
 
 
2399
type PagesPatchCall struct {
 
2400
        s      *Service
 
2401
        blogId string
 
2402
        pageId string
 
2403
        page   *Page
 
2404
        opt_   map[string]interface{}
 
2405
}
 
2406
 
 
2407
// Patch: Update a page. This method supports patch semantics.
 
2408
func (r *PagesService) Patch(blogId string, pageId string, page *Page) *PagesPatchCall {
 
2409
        c := &PagesPatchCall{s: r.s, opt_: make(map[string]interface{})}
 
2410
        c.blogId = blogId
 
2411
        c.pageId = pageId
 
2412
        c.page = page
 
2413
        return c
 
2414
}
 
2415
 
 
2416
// Fields allows partial responses to be retrieved.
 
2417
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2418
// for more information.
 
2419
func (c *PagesPatchCall) Fields(s ...googleapi.Field) *PagesPatchCall {
 
2420
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2421
        return c
 
2422
}
 
2423
 
 
2424
func (c *PagesPatchCall) Do() (*Page, error) {
 
2425
        var body io.Reader = nil
 
2426
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
 
2427
        if err != nil {
 
2428
                return nil, err
 
2429
        }
 
2430
        ctype := "application/json"
 
2431
        params := make(url.Values)
 
2432
        params.Set("alt", "json")
 
2433
        if v, ok := c.opt_["fields"]; ok {
 
2434
                params.Set("fields", fmt.Sprintf("%v", v))
 
2435
        }
 
2436
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pages/{pageId}")
 
2437
        urls += "?" + params.Encode()
 
2438
        req, _ := http.NewRequest("PATCH", urls, body)
 
2439
        googleapi.Expand(req.URL, map[string]string{
 
2440
                "blogId": c.blogId,
 
2441
                "pageId": c.pageId,
 
2442
        })
 
2443
        req.Header.Set("Content-Type", ctype)
 
2444
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2445
        res, err := c.s.client.Do(req)
 
2446
        if err != nil {
 
2447
                return nil, err
 
2448
        }
 
2449
        defer googleapi.CloseBody(res)
 
2450
        if err := googleapi.CheckResponse(res); err != nil {
 
2451
                return nil, err
 
2452
        }
 
2453
        var ret *Page
 
2454
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2455
                return nil, err
 
2456
        }
 
2457
        return ret, nil
 
2458
        // {
 
2459
        //   "description": "Update a page. This method supports patch semantics.",
 
2460
        //   "httpMethod": "PATCH",
 
2461
        //   "id": "blogger.pages.patch",
 
2462
        //   "parameterOrder": [
 
2463
        //     "blogId",
 
2464
        //     "pageId"
 
2465
        //   ],
 
2466
        //   "parameters": {
 
2467
        //     "blogId": {
 
2468
        //       "description": "The ID of the Blog.",
 
2469
        //       "location": "path",
 
2470
        //       "required": true,
 
2471
        //       "type": "string"
 
2472
        //     },
 
2473
        //     "pageId": {
 
2474
        //       "description": "The ID of the Page.",
 
2475
        //       "location": "path",
 
2476
        //       "required": true,
 
2477
        //       "type": "string"
 
2478
        //     }
 
2479
        //   },
 
2480
        //   "path": "blogs/{blogId}/pages/{pageId}",
 
2481
        //   "request": {
 
2482
        //     "$ref": "Page"
 
2483
        //   },
 
2484
        //   "response": {
 
2485
        //     "$ref": "Page"
 
2486
        //   },
 
2487
        //   "scopes": [
 
2488
        //     "https://www.googleapis.com/auth/blogger"
 
2489
        //   ]
 
2490
        // }
 
2491
 
 
2492
}
 
2493
 
 
2494
// method id "blogger.pages.update":
 
2495
 
 
2496
type PagesUpdateCall struct {
 
2497
        s      *Service
 
2498
        blogId string
 
2499
        pageId string
 
2500
        page   *Page
 
2501
        opt_   map[string]interface{}
 
2502
}
 
2503
 
 
2504
// Update: Update a page.
 
2505
func (r *PagesService) Update(blogId string, pageId string, page *Page) *PagesUpdateCall {
 
2506
        c := &PagesUpdateCall{s: r.s, opt_: make(map[string]interface{})}
 
2507
        c.blogId = blogId
 
2508
        c.pageId = pageId
 
2509
        c.page = page
 
2510
        return c
 
2511
}
 
2512
 
 
2513
// Fields allows partial responses to be retrieved.
 
2514
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2515
// for more information.
 
2516
func (c *PagesUpdateCall) Fields(s ...googleapi.Field) *PagesUpdateCall {
 
2517
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2518
        return c
 
2519
}
 
2520
 
 
2521
func (c *PagesUpdateCall) Do() (*Page, error) {
 
2522
        var body io.Reader = nil
 
2523
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
 
2524
        if err != nil {
 
2525
                return nil, err
 
2526
        }
 
2527
        ctype := "application/json"
 
2528
        params := make(url.Values)
 
2529
        params.Set("alt", "json")
 
2530
        if v, ok := c.opt_["fields"]; ok {
 
2531
                params.Set("fields", fmt.Sprintf("%v", v))
 
2532
        }
 
2533
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/pages/{pageId}")
 
2534
        urls += "?" + params.Encode()
 
2535
        req, _ := http.NewRequest("PUT", urls, body)
 
2536
        googleapi.Expand(req.URL, map[string]string{
 
2537
                "blogId": c.blogId,
 
2538
                "pageId": c.pageId,
 
2539
        })
 
2540
        req.Header.Set("Content-Type", ctype)
 
2541
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2542
        res, err := c.s.client.Do(req)
 
2543
        if err != nil {
 
2544
                return nil, err
 
2545
        }
 
2546
        defer googleapi.CloseBody(res)
 
2547
        if err := googleapi.CheckResponse(res); err != nil {
 
2548
                return nil, err
 
2549
        }
 
2550
        var ret *Page
 
2551
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2552
                return nil, err
 
2553
        }
 
2554
        return ret, nil
 
2555
        // {
 
2556
        //   "description": "Update a page.",
 
2557
        //   "httpMethod": "PUT",
 
2558
        //   "id": "blogger.pages.update",
 
2559
        //   "parameterOrder": [
 
2560
        //     "blogId",
 
2561
        //     "pageId"
 
2562
        //   ],
 
2563
        //   "parameters": {
 
2564
        //     "blogId": {
 
2565
        //       "description": "The ID of the Blog.",
 
2566
        //       "location": "path",
 
2567
        //       "required": true,
 
2568
        //       "type": "string"
 
2569
        //     },
 
2570
        //     "pageId": {
 
2571
        //       "description": "The ID of the Page.",
 
2572
        //       "location": "path",
 
2573
        //       "required": true,
 
2574
        //       "type": "string"
 
2575
        //     }
 
2576
        //   },
 
2577
        //   "path": "blogs/{blogId}/pages/{pageId}",
 
2578
        //   "request": {
 
2579
        //     "$ref": "Page"
 
2580
        //   },
 
2581
        //   "response": {
 
2582
        //     "$ref": "Page"
 
2583
        //   },
 
2584
        //   "scopes": [
 
2585
        //     "https://www.googleapis.com/auth/blogger"
 
2586
        //   ]
 
2587
        // }
 
2588
 
 
2589
}
 
2590
 
 
2591
// method id "blogger.postUserInfos.get":
 
2592
 
 
2593
type PostUserInfosGetCall struct {
 
2594
        s      *Service
 
2595
        userId string
 
2596
        blogId string
 
2597
        postId string
 
2598
        opt_   map[string]interface{}
 
2599
}
 
2600
 
 
2601
// Get: Gets one post and user info pair by postId and userId.
 
2602
func (r *PostUserInfosService) Get(userId string, blogId string, postId string) *PostUserInfosGetCall {
 
2603
        c := &PostUserInfosGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2604
        c.userId = userId
 
2605
        c.blogId = blogId
 
2606
        c.postId = postId
 
2607
        return c
 
2608
}
 
2609
 
 
2610
// MaxComments sets the optional parameter "maxComments": Maximum number
 
2611
// of comments to pull back on a post.
 
2612
func (c *PostUserInfosGetCall) MaxComments(maxComments int64) *PostUserInfosGetCall {
 
2613
        c.opt_["maxComments"] = maxComments
 
2614
        return c
 
2615
}
 
2616
 
 
2617
// Fields allows partial responses to be retrieved.
 
2618
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2619
// for more information.
 
2620
func (c *PostUserInfosGetCall) Fields(s ...googleapi.Field) *PostUserInfosGetCall {
 
2621
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2622
        return c
 
2623
}
 
2624
 
 
2625
func (c *PostUserInfosGetCall) Do() (*PostUserInfo, error) {
 
2626
        var body io.Reader = nil
 
2627
        params := make(url.Values)
 
2628
        params.Set("alt", "json")
 
2629
        if v, ok := c.opt_["maxComments"]; ok {
 
2630
                params.Set("maxComments", fmt.Sprintf("%v", v))
 
2631
        }
 
2632
        if v, ok := c.opt_["fields"]; ok {
 
2633
                params.Set("fields", fmt.Sprintf("%v", v))
 
2634
        }
 
2635
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/blogs/{blogId}/posts/{postId}")
 
2636
        urls += "?" + params.Encode()
 
2637
        req, _ := http.NewRequest("GET", urls, body)
 
2638
        googleapi.Expand(req.URL, map[string]string{
 
2639
                "userId": c.userId,
 
2640
                "blogId": c.blogId,
 
2641
                "postId": c.postId,
 
2642
        })
 
2643
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2644
        res, err := c.s.client.Do(req)
 
2645
        if err != nil {
 
2646
                return nil, err
 
2647
        }
 
2648
        defer googleapi.CloseBody(res)
 
2649
        if err := googleapi.CheckResponse(res); err != nil {
 
2650
                return nil, err
 
2651
        }
 
2652
        var ret *PostUserInfo
 
2653
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2654
                return nil, err
 
2655
        }
 
2656
        return ret, nil
 
2657
        // {
 
2658
        //   "description": "Gets one post and user info pair by postId and userId.",
 
2659
        //   "httpMethod": "GET",
 
2660
        //   "id": "blogger.postUserInfos.get",
 
2661
        //   "parameterOrder": [
 
2662
        //     "userId",
 
2663
        //     "blogId",
 
2664
        //     "postId"
 
2665
        //   ],
 
2666
        //   "parameters": {
 
2667
        //     "blogId": {
 
2668
        //       "description": "The ID of the blog.",
 
2669
        //       "location": "path",
 
2670
        //       "required": true,
 
2671
        //       "type": "string"
 
2672
        //     },
 
2673
        //     "maxComments": {
 
2674
        //       "description": "Maximum number of comments to pull back on a post.",
 
2675
        //       "format": "uint32",
 
2676
        //       "location": "query",
 
2677
        //       "type": "integer"
 
2678
        //     },
 
2679
        //     "postId": {
 
2680
        //       "description": "The ID of the post to get.",
 
2681
        //       "location": "path",
 
2682
        //       "required": true,
 
2683
        //       "type": "string"
 
2684
        //     },
 
2685
        //     "userId": {
 
2686
        //       "description": "ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.",
 
2687
        //       "location": "path",
 
2688
        //       "required": true,
 
2689
        //       "type": "string"
 
2690
        //     }
 
2691
        //   },
 
2692
        //   "path": "users/{userId}/blogs/{blogId}/posts/{postId}",
 
2693
        //   "response": {
 
2694
        //     "$ref": "PostUserInfo"
 
2695
        //   },
 
2696
        //   "scopes": [
 
2697
        //     "https://www.googleapis.com/auth/blogger",
 
2698
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
2699
        //   ]
 
2700
        // }
 
2701
 
 
2702
}
 
2703
 
 
2704
// method id "blogger.postUserInfos.list":
 
2705
 
 
2706
type PostUserInfosListCall struct {
 
2707
        s      *Service
 
2708
        userId string
 
2709
        blogId string
 
2710
        opt_   map[string]interface{}
 
2711
}
 
2712
 
 
2713
// List: Retrieves a list of post and user info pairs, possibly
 
2714
// filtered.
 
2715
func (r *PostUserInfosService) List(userId string, blogId string) *PostUserInfosListCall {
 
2716
        c := &PostUserInfosListCall{s: r.s, opt_: make(map[string]interface{})}
 
2717
        c.userId = userId
 
2718
        c.blogId = blogId
 
2719
        return c
 
2720
}
 
2721
 
 
2722
// EndDate sets the optional parameter "endDate": Latest post date to
 
2723
// fetch, a date-time with RFC 3339 formatting.
 
2724
func (c *PostUserInfosListCall) EndDate(endDate string) *PostUserInfosListCall {
 
2725
        c.opt_["endDate"] = endDate
 
2726
        return c
 
2727
}
 
2728
 
 
2729
// FetchBodies sets the optional parameter "fetchBodies": Whether the
 
2730
// body content of posts is included.
 
2731
func (c *PostUserInfosListCall) FetchBodies(fetchBodies bool) *PostUserInfosListCall {
 
2732
        c.opt_["fetchBodies"] = fetchBodies
 
2733
        return c
 
2734
}
 
2735
 
 
2736
// Labels sets the optional parameter "labels": Comma-separated list of
 
2737
// labels to search for.
 
2738
func (c *PostUserInfosListCall) Labels(labels string) *PostUserInfosListCall {
 
2739
        c.opt_["labels"] = labels
 
2740
        return c
 
2741
}
 
2742
 
 
2743
// MaxResults sets the optional parameter "maxResults": Maximum number
 
2744
// of posts to fetch.
 
2745
func (c *PostUserInfosListCall) MaxResults(maxResults int64) *PostUserInfosListCall {
 
2746
        c.opt_["maxResults"] = maxResults
 
2747
        return c
 
2748
}
 
2749
 
 
2750
// OrderBy sets the optional parameter "orderBy": Sort search results
 
2751
func (c *PostUserInfosListCall) OrderBy(orderBy string) *PostUserInfosListCall {
 
2752
        c.opt_["orderBy"] = orderBy
 
2753
        return c
 
2754
}
 
2755
 
 
2756
// PageToken sets the optional parameter "pageToken": Continuation token
 
2757
// if the request is paged.
 
2758
func (c *PostUserInfosListCall) PageToken(pageToken string) *PostUserInfosListCall {
 
2759
        c.opt_["pageToken"] = pageToken
 
2760
        return c
 
2761
}
 
2762
 
 
2763
// StartDate sets the optional parameter "startDate": Earliest post date
 
2764
// to fetch, a date-time with RFC 3339 formatting.
 
2765
func (c *PostUserInfosListCall) StartDate(startDate string) *PostUserInfosListCall {
 
2766
        c.opt_["startDate"] = startDate
 
2767
        return c
 
2768
}
 
2769
 
 
2770
// Statuses sets the optional parameter "statuses":
 
2771
func (c *PostUserInfosListCall) Statuses(statuses string) *PostUserInfosListCall {
 
2772
        c.opt_["statuses"] = statuses
 
2773
        return c
 
2774
}
 
2775
 
 
2776
// View sets the optional parameter "view":
 
2777
func (c *PostUserInfosListCall) View(view string) *PostUserInfosListCall {
 
2778
        c.opt_["view"] = view
 
2779
        return c
 
2780
}
 
2781
 
 
2782
// Fields allows partial responses to be retrieved.
 
2783
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2784
// for more information.
 
2785
func (c *PostUserInfosListCall) Fields(s ...googleapi.Field) *PostUserInfosListCall {
 
2786
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2787
        return c
 
2788
}
 
2789
 
 
2790
func (c *PostUserInfosListCall) Do() (*PostUserInfosList, error) {
 
2791
        var body io.Reader = nil
 
2792
        params := make(url.Values)
 
2793
        params.Set("alt", "json")
 
2794
        if v, ok := c.opt_["endDate"]; ok {
 
2795
                params.Set("endDate", fmt.Sprintf("%v", v))
 
2796
        }
 
2797
        if v, ok := c.opt_["fetchBodies"]; ok {
 
2798
                params.Set("fetchBodies", fmt.Sprintf("%v", v))
 
2799
        }
 
2800
        if v, ok := c.opt_["labels"]; ok {
 
2801
                params.Set("labels", fmt.Sprintf("%v", v))
 
2802
        }
 
2803
        if v, ok := c.opt_["maxResults"]; ok {
 
2804
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
2805
        }
 
2806
        if v, ok := c.opt_["orderBy"]; ok {
 
2807
                params.Set("orderBy", fmt.Sprintf("%v", v))
 
2808
        }
 
2809
        if v, ok := c.opt_["pageToken"]; ok {
 
2810
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
2811
        }
 
2812
        if v, ok := c.opt_["startDate"]; ok {
 
2813
                params.Set("startDate", fmt.Sprintf("%v", v))
 
2814
        }
 
2815
        if v, ok := c.opt_["statuses"]; ok {
 
2816
                params.Set("statuses", fmt.Sprintf("%v", v))
 
2817
        }
 
2818
        if v, ok := c.opt_["view"]; ok {
 
2819
                params.Set("view", fmt.Sprintf("%v", v))
 
2820
        }
 
2821
        if v, ok := c.opt_["fields"]; ok {
 
2822
                params.Set("fields", fmt.Sprintf("%v", v))
 
2823
        }
 
2824
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/blogs/{blogId}/posts")
 
2825
        urls += "?" + params.Encode()
 
2826
        req, _ := http.NewRequest("GET", urls, body)
 
2827
        googleapi.Expand(req.URL, map[string]string{
 
2828
                "userId": c.userId,
 
2829
                "blogId": c.blogId,
 
2830
        })
 
2831
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2832
        res, err := c.s.client.Do(req)
 
2833
        if err != nil {
 
2834
                return nil, err
 
2835
        }
 
2836
        defer googleapi.CloseBody(res)
 
2837
        if err := googleapi.CheckResponse(res); err != nil {
 
2838
                return nil, err
 
2839
        }
 
2840
        var ret *PostUserInfosList
 
2841
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2842
                return nil, err
 
2843
        }
 
2844
        return ret, nil
 
2845
        // {
 
2846
        //   "description": "Retrieves a list of post and user info pairs, possibly filtered.",
 
2847
        //   "httpMethod": "GET",
 
2848
        //   "id": "blogger.postUserInfos.list",
 
2849
        //   "parameterOrder": [
 
2850
        //     "userId",
 
2851
        //     "blogId"
 
2852
        //   ],
 
2853
        //   "parameters": {
 
2854
        //     "blogId": {
 
2855
        //       "description": "ID of the blog to fetch posts from.",
 
2856
        //       "location": "path",
 
2857
        //       "required": true,
 
2858
        //       "type": "string"
 
2859
        //     },
 
2860
        //     "endDate": {
 
2861
        //       "description": "Latest post date to fetch, a date-time with RFC 3339 formatting.",
 
2862
        //       "format": "date-time",
 
2863
        //       "location": "query",
 
2864
        //       "type": "string"
 
2865
        //     },
 
2866
        //     "fetchBodies": {
 
2867
        //       "description": "Whether the body content of posts is included.",
 
2868
        //       "location": "query",
 
2869
        //       "type": "boolean"
 
2870
        //     },
 
2871
        //     "labels": {
 
2872
        //       "description": "Comma-separated list of labels to search for.",
 
2873
        //       "location": "query",
 
2874
        //       "type": "string"
 
2875
        //     },
 
2876
        //     "maxResults": {
 
2877
        //       "description": "Maximum number of posts to fetch.",
 
2878
        //       "format": "uint32",
 
2879
        //       "location": "query",
 
2880
        //       "type": "integer"
 
2881
        //     },
 
2882
        //     "orderBy": {
 
2883
        //       "default": "PUBLISHED",
 
2884
        //       "description": "Sort search results",
 
2885
        //       "enum": [
 
2886
        //         "published",
 
2887
        //         "updated"
 
2888
        //       ],
 
2889
        //       "enumDescriptions": [
 
2890
        //         "Order by the date the post was published",
 
2891
        //         "Order by the date the post was last updated"
 
2892
        //       ],
 
2893
        //       "location": "query",
 
2894
        //       "type": "string"
 
2895
        //     },
 
2896
        //     "pageToken": {
 
2897
        //       "description": "Continuation token if the request is paged.",
 
2898
        //       "location": "query",
 
2899
        //       "type": "string"
 
2900
        //     },
 
2901
        //     "startDate": {
 
2902
        //       "description": "Earliest post date to fetch, a date-time with RFC 3339 formatting.",
 
2903
        //       "format": "date-time",
 
2904
        //       "location": "query",
 
2905
        //       "type": "string"
 
2906
        //     },
 
2907
        //     "statuses": {
 
2908
        //       "enum": [
 
2909
        //         "draft",
 
2910
        //         "live",
 
2911
        //         "scheduled"
 
2912
        //       ],
 
2913
        //       "enumDescriptions": [
 
2914
        //         "Draft posts",
 
2915
        //         "Published posts",
 
2916
        //         "Posts that are scheduled to publish in future."
 
2917
        //       ],
 
2918
        //       "location": "query",
 
2919
        //       "repeated": true,
 
2920
        //       "type": "string"
 
2921
        //     },
 
2922
        //     "userId": {
 
2923
        //       "description": "ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier.",
 
2924
        //       "location": "path",
 
2925
        //       "required": true,
 
2926
        //       "type": "string"
 
2927
        //     },
 
2928
        //     "view": {
 
2929
        //       "enum": [
 
2930
        //         "ADMIN",
 
2931
        //         "AUTHOR",
 
2932
        //         "READER"
 
2933
        //       ],
 
2934
        //       "enumDescriptions": [
 
2935
        //         "Admin level detail",
 
2936
        //         "Author level detail",
 
2937
        //         "Reader level detail"
 
2938
        //       ],
 
2939
        //       "location": "query",
 
2940
        //       "type": "string"
 
2941
        //     }
 
2942
        //   },
 
2943
        //   "path": "users/{userId}/blogs/{blogId}/posts",
 
2944
        //   "response": {
 
2945
        //     "$ref": "PostUserInfosList"
 
2946
        //   },
 
2947
        //   "scopes": [
 
2948
        //     "https://www.googleapis.com/auth/blogger",
 
2949
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
2950
        //   ]
 
2951
        // }
 
2952
 
 
2953
}
 
2954
 
 
2955
// method id "blogger.posts.delete":
 
2956
 
 
2957
type PostsDeleteCall struct {
 
2958
        s      *Service
 
2959
        blogId string
 
2960
        postId string
 
2961
        opt_   map[string]interface{}
 
2962
}
 
2963
 
 
2964
// Delete: Delete a post by id.
 
2965
func (r *PostsService) Delete(blogId string, postId string) *PostsDeleteCall {
 
2966
        c := &PostsDeleteCall{s: r.s, opt_: make(map[string]interface{})}
 
2967
        c.blogId = blogId
 
2968
        c.postId = postId
 
2969
        return c
 
2970
}
 
2971
 
 
2972
// Fields allows partial responses to be retrieved.
 
2973
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2974
// for more information.
 
2975
func (c *PostsDeleteCall) Fields(s ...googleapi.Field) *PostsDeleteCall {
 
2976
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2977
        return c
 
2978
}
 
2979
 
 
2980
func (c *PostsDeleteCall) Do() error {
 
2981
        var body io.Reader = nil
 
2982
        params := make(url.Values)
 
2983
        params.Set("alt", "json")
 
2984
        if v, ok := c.opt_["fields"]; ok {
 
2985
                params.Set("fields", fmt.Sprintf("%v", v))
 
2986
        }
 
2987
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}")
 
2988
        urls += "?" + params.Encode()
 
2989
        req, _ := http.NewRequest("DELETE", urls, body)
 
2990
        googleapi.Expand(req.URL, map[string]string{
 
2991
                "blogId": c.blogId,
 
2992
                "postId": c.postId,
 
2993
        })
 
2994
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2995
        res, err := c.s.client.Do(req)
 
2996
        if err != nil {
 
2997
                return err
 
2998
        }
 
2999
        defer googleapi.CloseBody(res)
 
3000
        if err := googleapi.CheckResponse(res); err != nil {
 
3001
                return err
 
3002
        }
 
3003
        return nil
 
3004
        // {
 
3005
        //   "description": "Delete a post by id.",
 
3006
        //   "httpMethod": "DELETE",
 
3007
        //   "id": "blogger.posts.delete",
 
3008
        //   "parameterOrder": [
 
3009
        //     "blogId",
 
3010
        //     "postId"
 
3011
        //   ],
 
3012
        //   "parameters": {
 
3013
        //     "blogId": {
 
3014
        //       "description": "The Id of the Blog.",
 
3015
        //       "location": "path",
 
3016
        //       "required": true,
 
3017
        //       "type": "string"
 
3018
        //     },
 
3019
        //     "postId": {
 
3020
        //       "description": "The ID of the Post.",
 
3021
        //       "location": "path",
 
3022
        //       "required": true,
 
3023
        //       "type": "string"
 
3024
        //     }
 
3025
        //   },
 
3026
        //   "path": "blogs/{blogId}/posts/{postId}",
 
3027
        //   "scopes": [
 
3028
        //     "https://www.googleapis.com/auth/blogger"
 
3029
        //   ]
 
3030
        // }
 
3031
 
 
3032
}
 
3033
 
 
3034
// method id "blogger.posts.get":
 
3035
 
 
3036
type PostsGetCall struct {
 
3037
        s      *Service
 
3038
        blogId string
 
3039
        postId string
 
3040
        opt_   map[string]interface{}
 
3041
}
 
3042
 
 
3043
// Get: Get a post by id.
 
3044
func (r *PostsService) Get(blogId string, postId string) *PostsGetCall {
 
3045
        c := &PostsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
3046
        c.blogId = blogId
 
3047
        c.postId = postId
 
3048
        return c
 
3049
}
 
3050
 
 
3051
// MaxComments sets the optional parameter "maxComments": Maximum number
 
3052
// of comments to pull back on a post.
 
3053
func (c *PostsGetCall) MaxComments(maxComments int64) *PostsGetCall {
 
3054
        c.opt_["maxComments"] = maxComments
 
3055
        return c
 
3056
}
 
3057
 
 
3058
// View sets the optional parameter "view":
 
3059
func (c *PostsGetCall) View(view string) *PostsGetCall {
 
3060
        c.opt_["view"] = view
 
3061
        return c
 
3062
}
 
3063
 
 
3064
// Fields allows partial responses to be retrieved.
 
3065
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3066
// for more information.
 
3067
func (c *PostsGetCall) Fields(s ...googleapi.Field) *PostsGetCall {
 
3068
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3069
        return c
 
3070
}
 
3071
 
 
3072
func (c *PostsGetCall) Do() (*Post, error) {
 
3073
        var body io.Reader = nil
 
3074
        params := make(url.Values)
 
3075
        params.Set("alt", "json")
 
3076
        if v, ok := c.opt_["maxComments"]; ok {
 
3077
                params.Set("maxComments", fmt.Sprintf("%v", v))
 
3078
        }
 
3079
        if v, ok := c.opt_["view"]; ok {
 
3080
                params.Set("view", fmt.Sprintf("%v", v))
 
3081
        }
 
3082
        if v, ok := c.opt_["fields"]; ok {
 
3083
                params.Set("fields", fmt.Sprintf("%v", v))
 
3084
        }
 
3085
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}")
 
3086
        urls += "?" + params.Encode()
 
3087
        req, _ := http.NewRequest("GET", urls, body)
 
3088
        googleapi.Expand(req.URL, map[string]string{
 
3089
                "blogId": c.blogId,
 
3090
                "postId": c.postId,
 
3091
        })
 
3092
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3093
        res, err := c.s.client.Do(req)
 
3094
        if err != nil {
 
3095
                return nil, err
 
3096
        }
 
3097
        defer googleapi.CloseBody(res)
 
3098
        if err := googleapi.CheckResponse(res); err != nil {
 
3099
                return nil, err
 
3100
        }
 
3101
        var ret *Post
 
3102
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3103
                return nil, err
 
3104
        }
 
3105
        return ret, nil
 
3106
        // {
 
3107
        //   "description": "Get a post by id.",
 
3108
        //   "httpMethod": "GET",
 
3109
        //   "id": "blogger.posts.get",
 
3110
        //   "parameterOrder": [
 
3111
        //     "blogId",
 
3112
        //     "postId"
 
3113
        //   ],
 
3114
        //   "parameters": {
 
3115
        //     "blogId": {
 
3116
        //       "description": "ID of the blog to fetch the post from.",
 
3117
        //       "location": "path",
 
3118
        //       "required": true,
 
3119
        //       "type": "string"
 
3120
        //     },
 
3121
        //     "maxComments": {
 
3122
        //       "description": "Maximum number of comments to pull back on a post.",
 
3123
        //       "format": "uint32",
 
3124
        //       "location": "query",
 
3125
        //       "type": "integer"
 
3126
        //     },
 
3127
        //     "postId": {
 
3128
        //       "description": "The ID of the post",
 
3129
        //       "location": "path",
 
3130
        //       "required": true,
 
3131
        //       "type": "string"
 
3132
        //     },
 
3133
        //     "view": {
 
3134
        //       "enum": [
 
3135
        //         "ADMIN",
 
3136
        //         "AUTHOR",
 
3137
        //         "READER"
 
3138
        //       ],
 
3139
        //       "enumDescriptions": [
 
3140
        //         "Admin level detail",
 
3141
        //         "Author level detail",
 
3142
        //         "Admin level detail"
 
3143
        //       ],
 
3144
        //       "location": "query",
 
3145
        //       "type": "string"
 
3146
        //     }
 
3147
        //   },
 
3148
        //   "path": "blogs/{blogId}/posts/{postId}",
 
3149
        //   "response": {
 
3150
        //     "$ref": "Post"
 
3151
        //   },
 
3152
        //   "scopes": [
 
3153
        //     "https://www.googleapis.com/auth/blogger",
 
3154
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
3155
        //   ]
 
3156
        // }
 
3157
 
 
3158
}
 
3159
 
 
3160
// method id "blogger.posts.getByPath":
 
3161
 
 
3162
type PostsGetByPathCall struct {
 
3163
        s      *Service
 
3164
        blogId string
 
3165
        path   string
 
3166
        opt_   map[string]interface{}
 
3167
}
 
3168
 
 
3169
// GetByPath: Retrieve a Post by Path.
 
3170
func (r *PostsService) GetByPath(blogId string, path string) *PostsGetByPathCall {
 
3171
        c := &PostsGetByPathCall{s: r.s, opt_: make(map[string]interface{})}
 
3172
        c.blogId = blogId
 
3173
        c.path = path
 
3174
        return c
 
3175
}
 
3176
 
 
3177
// MaxComments sets the optional parameter "maxComments": Maximum number
 
3178
// of comments to pull back on a post.
 
3179
func (c *PostsGetByPathCall) MaxComments(maxComments int64) *PostsGetByPathCall {
 
3180
        c.opt_["maxComments"] = maxComments
 
3181
        return c
 
3182
}
 
3183
 
 
3184
// View sets the optional parameter "view":
 
3185
func (c *PostsGetByPathCall) View(view string) *PostsGetByPathCall {
 
3186
        c.opt_["view"] = view
 
3187
        return c
 
3188
}
 
3189
 
 
3190
// Fields allows partial responses to be retrieved.
 
3191
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3192
// for more information.
 
3193
func (c *PostsGetByPathCall) Fields(s ...googleapi.Field) *PostsGetByPathCall {
 
3194
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3195
        return c
 
3196
}
 
3197
 
 
3198
func (c *PostsGetByPathCall) Do() (*Post, error) {
 
3199
        var body io.Reader = nil
 
3200
        params := make(url.Values)
 
3201
        params.Set("alt", "json")
 
3202
        params.Set("path", fmt.Sprintf("%v", c.path))
 
3203
        if v, ok := c.opt_["maxComments"]; ok {
 
3204
                params.Set("maxComments", fmt.Sprintf("%v", v))
 
3205
        }
 
3206
        if v, ok := c.opt_["view"]; ok {
 
3207
                params.Set("view", fmt.Sprintf("%v", v))
 
3208
        }
 
3209
        if v, ok := c.opt_["fields"]; ok {
 
3210
                params.Set("fields", fmt.Sprintf("%v", v))
 
3211
        }
 
3212
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/bypath")
 
3213
        urls += "?" + params.Encode()
 
3214
        req, _ := http.NewRequest("GET", urls, body)
 
3215
        googleapi.Expand(req.URL, map[string]string{
 
3216
                "blogId": c.blogId,
 
3217
        })
 
3218
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3219
        res, err := c.s.client.Do(req)
 
3220
        if err != nil {
 
3221
                return nil, err
 
3222
        }
 
3223
        defer googleapi.CloseBody(res)
 
3224
        if err := googleapi.CheckResponse(res); err != nil {
 
3225
                return nil, err
 
3226
        }
 
3227
        var ret *Post
 
3228
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3229
                return nil, err
 
3230
        }
 
3231
        return ret, nil
 
3232
        // {
 
3233
        //   "description": "Retrieve a Post by Path.",
 
3234
        //   "httpMethod": "GET",
 
3235
        //   "id": "blogger.posts.getByPath",
 
3236
        //   "parameterOrder": [
 
3237
        //     "blogId",
 
3238
        //     "path"
 
3239
        //   ],
 
3240
        //   "parameters": {
 
3241
        //     "blogId": {
 
3242
        //       "description": "ID of the blog to fetch the post from.",
 
3243
        //       "location": "path",
 
3244
        //       "required": true,
 
3245
        //       "type": "string"
 
3246
        //     },
 
3247
        //     "maxComments": {
 
3248
        //       "description": "Maximum number of comments to pull back on a post.",
 
3249
        //       "format": "uint32",
 
3250
        //       "location": "query",
 
3251
        //       "type": "integer"
 
3252
        //     },
 
3253
        //     "path": {
 
3254
        //       "description": "Path of the Post to retrieve.",
 
3255
        //       "location": "query",
 
3256
        //       "required": true,
 
3257
        //       "type": "string"
 
3258
        //     },
 
3259
        //     "view": {
 
3260
        //       "enum": [
 
3261
        //         "ADMIN",
 
3262
        //         "AUTHOR",
 
3263
        //         "READER"
 
3264
        //       ],
 
3265
        //       "enumDescriptions": [
 
3266
        //         "Admin level detail",
 
3267
        //         "Author level detail",
 
3268
        //         "Admin level detail"
 
3269
        //       ],
 
3270
        //       "location": "query",
 
3271
        //       "type": "string"
 
3272
        //     }
 
3273
        //   },
 
3274
        //   "path": "blogs/{blogId}/posts/bypath",
 
3275
        //   "response": {
 
3276
        //     "$ref": "Post"
 
3277
        //   },
 
3278
        //   "scopes": [
 
3279
        //     "https://www.googleapis.com/auth/blogger",
 
3280
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
3281
        //   ]
 
3282
        // }
 
3283
 
 
3284
}
 
3285
 
 
3286
// method id "blogger.posts.insert":
 
3287
 
 
3288
type PostsInsertCall struct {
 
3289
        s      *Service
 
3290
        blogId string
 
3291
        post   *Post
 
3292
        opt_   map[string]interface{}
 
3293
}
 
3294
 
 
3295
// Insert: Add a post.
 
3296
func (r *PostsService) Insert(blogId string, post *Post) *PostsInsertCall {
 
3297
        c := &PostsInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
3298
        c.blogId = blogId
 
3299
        c.post = post
 
3300
        return c
 
3301
}
 
3302
 
 
3303
// IsDraft sets the optional parameter "isDraft": Whether to create the
 
3304
// post as a draft
 
3305
func (c *PostsInsertCall) IsDraft(isDraft bool) *PostsInsertCall {
 
3306
        c.opt_["isDraft"] = isDraft
 
3307
        return c
 
3308
}
 
3309
 
 
3310
// Fields allows partial responses to be retrieved.
 
3311
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3312
// for more information.
 
3313
func (c *PostsInsertCall) Fields(s ...googleapi.Field) *PostsInsertCall {
 
3314
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3315
        return c
 
3316
}
 
3317
 
 
3318
func (c *PostsInsertCall) Do() (*Post, error) {
 
3319
        var body io.Reader = nil
 
3320
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
 
3321
        if err != nil {
 
3322
                return nil, err
 
3323
        }
 
3324
        ctype := "application/json"
 
3325
        params := make(url.Values)
 
3326
        params.Set("alt", "json")
 
3327
        if v, ok := c.opt_["isDraft"]; ok {
 
3328
                params.Set("isDraft", fmt.Sprintf("%v", v))
 
3329
        }
 
3330
        if v, ok := c.opt_["fields"]; ok {
 
3331
                params.Set("fields", fmt.Sprintf("%v", v))
 
3332
        }
 
3333
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts")
 
3334
        urls += "?" + params.Encode()
 
3335
        req, _ := http.NewRequest("POST", urls, body)
 
3336
        googleapi.Expand(req.URL, map[string]string{
 
3337
                "blogId": c.blogId,
 
3338
        })
 
3339
        req.Header.Set("Content-Type", ctype)
 
3340
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3341
        res, err := c.s.client.Do(req)
 
3342
        if err != nil {
 
3343
                return nil, err
 
3344
        }
 
3345
        defer googleapi.CloseBody(res)
 
3346
        if err := googleapi.CheckResponse(res); err != nil {
 
3347
                return nil, err
 
3348
        }
 
3349
        var ret *Post
 
3350
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3351
                return nil, err
 
3352
        }
 
3353
        return ret, nil
 
3354
        // {
 
3355
        //   "description": "Add a post.",
 
3356
        //   "httpMethod": "POST",
 
3357
        //   "id": "blogger.posts.insert",
 
3358
        //   "parameterOrder": [
 
3359
        //     "blogId"
 
3360
        //   ],
 
3361
        //   "parameters": {
 
3362
        //     "blogId": {
 
3363
        //       "description": "ID of the blog to add the post to.",
 
3364
        //       "location": "path",
 
3365
        //       "required": true,
 
3366
        //       "type": "string"
 
3367
        //     },
 
3368
        //     "isDraft": {
 
3369
        //       "description": "Whether to create the post as a draft",
 
3370
        //       "location": "query",
 
3371
        //       "type": "boolean"
 
3372
        //     }
 
3373
        //   },
 
3374
        //   "path": "blogs/{blogId}/posts",
 
3375
        //   "request": {
 
3376
        //     "$ref": "Post"
 
3377
        //   },
 
3378
        //   "response": {
 
3379
        //     "$ref": "Post"
 
3380
        //   },
 
3381
        //   "scopes": [
 
3382
        //     "https://www.googleapis.com/auth/blogger"
 
3383
        //   ]
 
3384
        // }
 
3385
 
 
3386
}
 
3387
 
 
3388
// method id "blogger.posts.list":
 
3389
 
 
3390
type PostsListCall struct {
 
3391
        s      *Service
 
3392
        blogId string
 
3393
        opt_   map[string]interface{}
 
3394
}
 
3395
 
 
3396
// List: Retrieves a list of posts, possibly filtered.
 
3397
func (r *PostsService) List(blogId string) *PostsListCall {
 
3398
        c := &PostsListCall{s: r.s, opt_: make(map[string]interface{})}
 
3399
        c.blogId = blogId
 
3400
        return c
 
3401
}
 
3402
 
 
3403
// EndDate sets the optional parameter "endDate": Latest post date to
 
3404
// fetch, a date-time with RFC 3339 formatting.
 
3405
func (c *PostsListCall) EndDate(endDate string) *PostsListCall {
 
3406
        c.opt_["endDate"] = endDate
 
3407
        return c
 
3408
}
 
3409
 
 
3410
// FetchBodies sets the optional parameter "fetchBodies": Whether the
 
3411
// body content of posts is included (default: true). This should be set
 
3412
// to false when the post bodies are not required, to help minimize
 
3413
// traffic.
 
3414
func (c *PostsListCall) FetchBodies(fetchBodies bool) *PostsListCall {
 
3415
        c.opt_["fetchBodies"] = fetchBodies
 
3416
        return c
 
3417
}
 
3418
 
 
3419
// FetchImages sets the optional parameter "fetchImages": Whether image
 
3420
// URL metadata for each post is included.
 
3421
func (c *PostsListCall) FetchImages(fetchImages bool) *PostsListCall {
 
3422
        c.opt_["fetchImages"] = fetchImages
 
3423
        return c
 
3424
}
 
3425
 
 
3426
// Labels sets the optional parameter "labels": Comma-separated list of
 
3427
// labels to search for.
 
3428
func (c *PostsListCall) Labels(labels string) *PostsListCall {
 
3429
        c.opt_["labels"] = labels
 
3430
        return c
 
3431
}
 
3432
 
 
3433
// MaxResults sets the optional parameter "maxResults": Maximum number
 
3434
// of posts to fetch.
 
3435
func (c *PostsListCall) MaxResults(maxResults int64) *PostsListCall {
 
3436
        c.opt_["maxResults"] = maxResults
 
3437
        return c
 
3438
}
 
3439
 
 
3440
// OrderBy sets the optional parameter "orderBy": Sort search results
 
3441
func (c *PostsListCall) OrderBy(orderBy string) *PostsListCall {
 
3442
        c.opt_["orderBy"] = orderBy
 
3443
        return c
 
3444
}
 
3445
 
 
3446
// PageToken sets the optional parameter "pageToken": Continuation token
 
3447
// if the request is paged.
 
3448
func (c *PostsListCall) PageToken(pageToken string) *PostsListCall {
 
3449
        c.opt_["pageToken"] = pageToken
 
3450
        return c
 
3451
}
 
3452
 
 
3453
// StartDate sets the optional parameter "startDate": Earliest post date
 
3454
// to fetch, a date-time with RFC 3339 formatting.
 
3455
func (c *PostsListCall) StartDate(startDate string) *PostsListCall {
 
3456
        c.opt_["startDate"] = startDate
 
3457
        return c
 
3458
}
 
3459
 
 
3460
// Statuses sets the optional parameter "statuses":
 
3461
func (c *PostsListCall) Statuses(statuses string) *PostsListCall {
 
3462
        c.opt_["statuses"] = statuses
 
3463
        return c
 
3464
}
 
3465
 
 
3466
// View sets the optional parameter "view":
 
3467
func (c *PostsListCall) View(view string) *PostsListCall {
 
3468
        c.opt_["view"] = view
 
3469
        return c
 
3470
}
 
3471
 
 
3472
// Fields allows partial responses to be retrieved.
 
3473
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3474
// for more information.
 
3475
func (c *PostsListCall) Fields(s ...googleapi.Field) *PostsListCall {
 
3476
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3477
        return c
 
3478
}
 
3479
 
 
3480
func (c *PostsListCall) Do() (*PostList, error) {
 
3481
        var body io.Reader = nil
 
3482
        params := make(url.Values)
 
3483
        params.Set("alt", "json")
 
3484
        if v, ok := c.opt_["endDate"]; ok {
 
3485
                params.Set("endDate", fmt.Sprintf("%v", v))
 
3486
        }
 
3487
        if v, ok := c.opt_["fetchBodies"]; ok {
 
3488
                params.Set("fetchBodies", fmt.Sprintf("%v", v))
 
3489
        }
 
3490
        if v, ok := c.opt_["fetchImages"]; ok {
 
3491
                params.Set("fetchImages", fmt.Sprintf("%v", v))
 
3492
        }
 
3493
        if v, ok := c.opt_["labels"]; ok {
 
3494
                params.Set("labels", fmt.Sprintf("%v", v))
 
3495
        }
 
3496
        if v, ok := c.opt_["maxResults"]; ok {
 
3497
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
3498
        }
 
3499
        if v, ok := c.opt_["orderBy"]; ok {
 
3500
                params.Set("orderBy", fmt.Sprintf("%v", v))
 
3501
        }
 
3502
        if v, ok := c.opt_["pageToken"]; ok {
 
3503
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
3504
        }
 
3505
        if v, ok := c.opt_["startDate"]; ok {
 
3506
                params.Set("startDate", fmt.Sprintf("%v", v))
 
3507
        }
 
3508
        if v, ok := c.opt_["statuses"]; ok {
 
3509
                params.Set("statuses", fmt.Sprintf("%v", v))
 
3510
        }
 
3511
        if v, ok := c.opt_["view"]; ok {
 
3512
                params.Set("view", fmt.Sprintf("%v", v))
 
3513
        }
 
3514
        if v, ok := c.opt_["fields"]; ok {
 
3515
                params.Set("fields", fmt.Sprintf("%v", v))
 
3516
        }
 
3517
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts")
 
3518
        urls += "?" + params.Encode()
 
3519
        req, _ := http.NewRequest("GET", urls, body)
 
3520
        googleapi.Expand(req.URL, map[string]string{
 
3521
                "blogId": c.blogId,
 
3522
        })
 
3523
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3524
        res, err := c.s.client.Do(req)
 
3525
        if err != nil {
 
3526
                return nil, err
 
3527
        }
 
3528
        defer googleapi.CloseBody(res)
 
3529
        if err := googleapi.CheckResponse(res); err != nil {
 
3530
                return nil, err
 
3531
        }
 
3532
        var ret *PostList
 
3533
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3534
                return nil, err
 
3535
        }
 
3536
        return ret, nil
 
3537
        // {
 
3538
        //   "description": "Retrieves a list of posts, possibly filtered.",
 
3539
        //   "httpMethod": "GET",
 
3540
        //   "id": "blogger.posts.list",
 
3541
        //   "parameterOrder": [
 
3542
        //     "blogId"
 
3543
        //   ],
 
3544
        //   "parameters": {
 
3545
        //     "blogId": {
 
3546
        //       "description": "ID of the blog to fetch posts from.",
 
3547
        //       "location": "path",
 
3548
        //       "required": true,
 
3549
        //       "type": "string"
 
3550
        //     },
 
3551
        //     "endDate": {
 
3552
        //       "description": "Latest post date to fetch, a date-time with RFC 3339 formatting.",
 
3553
        //       "format": "date-time",
 
3554
        //       "location": "query",
 
3555
        //       "type": "string"
 
3556
        //     },
 
3557
        //     "fetchBodies": {
 
3558
        //       "default": "true",
 
3559
        //       "description": "Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic.",
 
3560
        //       "location": "query",
 
3561
        //       "type": "boolean"
 
3562
        //     },
 
3563
        //     "fetchImages": {
 
3564
        //       "description": "Whether image URL metadata for each post is included.",
 
3565
        //       "location": "query",
 
3566
        //       "type": "boolean"
 
3567
        //     },
 
3568
        //     "labels": {
 
3569
        //       "description": "Comma-separated list of labels to search for.",
 
3570
        //       "location": "query",
 
3571
        //       "type": "string"
 
3572
        //     },
 
3573
        //     "maxResults": {
 
3574
        //       "description": "Maximum number of posts to fetch.",
 
3575
        //       "format": "uint32",
 
3576
        //       "location": "query",
 
3577
        //       "type": "integer"
 
3578
        //     },
 
3579
        //     "orderBy": {
 
3580
        //       "default": "PUBLISHED",
 
3581
        //       "description": "Sort search results",
 
3582
        //       "enum": [
 
3583
        //         "published",
 
3584
        //         "updated"
 
3585
        //       ],
 
3586
        //       "enumDescriptions": [
 
3587
        //         "Order by the date the post was published",
 
3588
        //         "Order by the date the post was last updated"
 
3589
        //       ],
 
3590
        //       "location": "query",
 
3591
        //       "type": "string"
 
3592
        //     },
 
3593
        //     "pageToken": {
 
3594
        //       "description": "Continuation token if the request is paged.",
 
3595
        //       "location": "query",
 
3596
        //       "type": "string"
 
3597
        //     },
 
3598
        //     "startDate": {
 
3599
        //       "description": "Earliest post date to fetch, a date-time with RFC 3339 formatting.",
 
3600
        //       "format": "date-time",
 
3601
        //       "location": "query",
 
3602
        //       "type": "string"
 
3603
        //     },
 
3604
        //     "statuses": {
 
3605
        //       "enum": [
 
3606
        //         "draft",
 
3607
        //         "live",
 
3608
        //         "scheduled"
 
3609
        //       ],
 
3610
        //       "enumDescriptions": [
 
3611
        //         "Draft posts",
 
3612
        //         "Published posts",
 
3613
        //         "Posts that are scheduled to publish in future."
 
3614
        //       ],
 
3615
        //       "location": "query",
 
3616
        //       "repeated": true,
 
3617
        //       "type": "string"
 
3618
        //     },
 
3619
        //     "view": {
 
3620
        //       "enum": [
 
3621
        //         "ADMIN",
 
3622
        //         "AUTHOR",
 
3623
        //         "READER"
 
3624
        //       ],
 
3625
        //       "enumDescriptions": [
 
3626
        //         "Admin level detail",
 
3627
        //         "Author level detail",
 
3628
        //         "Reader level detail"
 
3629
        //       ],
 
3630
        //       "location": "query",
 
3631
        //       "type": "string"
 
3632
        //     }
 
3633
        //   },
 
3634
        //   "path": "blogs/{blogId}/posts",
 
3635
        //   "response": {
 
3636
        //     "$ref": "PostList"
 
3637
        //   },
 
3638
        //   "scopes": [
 
3639
        //     "https://www.googleapis.com/auth/blogger",
 
3640
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
3641
        //   ]
 
3642
        // }
 
3643
 
 
3644
}
 
3645
 
 
3646
// method id "blogger.posts.patch":
 
3647
 
 
3648
type PostsPatchCall struct {
 
3649
        s      *Service
 
3650
        blogId string
 
3651
        postId string
 
3652
        post   *Post
 
3653
        opt_   map[string]interface{}
 
3654
}
 
3655
 
 
3656
// Patch: Update a post. This method supports patch semantics.
 
3657
func (r *PostsService) Patch(blogId string, postId string, post *Post) *PostsPatchCall {
 
3658
        c := &PostsPatchCall{s: r.s, opt_: make(map[string]interface{})}
 
3659
        c.blogId = blogId
 
3660
        c.postId = postId
 
3661
        c.post = post
 
3662
        return c
 
3663
}
 
3664
 
 
3665
// Fields allows partial responses to be retrieved.
 
3666
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3667
// for more information.
 
3668
func (c *PostsPatchCall) Fields(s ...googleapi.Field) *PostsPatchCall {
 
3669
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3670
        return c
 
3671
}
 
3672
 
 
3673
func (c *PostsPatchCall) Do() (*Post, error) {
 
3674
        var body io.Reader = nil
 
3675
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
 
3676
        if err != nil {
 
3677
                return nil, err
 
3678
        }
 
3679
        ctype := "application/json"
 
3680
        params := make(url.Values)
 
3681
        params.Set("alt", "json")
 
3682
        if v, ok := c.opt_["fields"]; ok {
 
3683
                params.Set("fields", fmt.Sprintf("%v", v))
 
3684
        }
 
3685
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}")
 
3686
        urls += "?" + params.Encode()
 
3687
        req, _ := http.NewRequest("PATCH", urls, body)
 
3688
        googleapi.Expand(req.URL, map[string]string{
 
3689
                "blogId": c.blogId,
 
3690
                "postId": c.postId,
 
3691
        })
 
3692
        req.Header.Set("Content-Type", ctype)
 
3693
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3694
        res, err := c.s.client.Do(req)
 
3695
        if err != nil {
 
3696
                return nil, err
 
3697
        }
 
3698
        defer googleapi.CloseBody(res)
 
3699
        if err := googleapi.CheckResponse(res); err != nil {
 
3700
                return nil, err
 
3701
        }
 
3702
        var ret *Post
 
3703
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3704
                return nil, err
 
3705
        }
 
3706
        return ret, nil
 
3707
        // {
 
3708
        //   "description": "Update a post. This method supports patch semantics.",
 
3709
        //   "httpMethod": "PATCH",
 
3710
        //   "id": "blogger.posts.patch",
 
3711
        //   "parameterOrder": [
 
3712
        //     "blogId",
 
3713
        //     "postId"
 
3714
        //   ],
 
3715
        //   "parameters": {
 
3716
        //     "blogId": {
 
3717
        //       "description": "The ID of the Blog.",
 
3718
        //       "location": "path",
 
3719
        //       "required": true,
 
3720
        //       "type": "string"
 
3721
        //     },
 
3722
        //     "postId": {
 
3723
        //       "description": "The ID of the Post.",
 
3724
        //       "location": "path",
 
3725
        //       "required": true,
 
3726
        //       "type": "string"
 
3727
        //     }
 
3728
        //   },
 
3729
        //   "path": "blogs/{blogId}/posts/{postId}",
 
3730
        //   "request": {
 
3731
        //     "$ref": "Post"
 
3732
        //   },
 
3733
        //   "response": {
 
3734
        //     "$ref": "Post"
 
3735
        //   },
 
3736
        //   "scopes": [
 
3737
        //     "https://www.googleapis.com/auth/blogger"
 
3738
        //   ]
 
3739
        // }
 
3740
 
 
3741
}
 
3742
 
 
3743
// method id "blogger.posts.publish":
 
3744
 
 
3745
type PostsPublishCall struct {
 
3746
        s      *Service
 
3747
        blogId string
 
3748
        postId string
 
3749
        opt_   map[string]interface{}
 
3750
}
 
3751
 
 
3752
// Publish: Publish a draft post.
 
3753
func (r *PostsService) Publish(blogId string, postId string) *PostsPublishCall {
 
3754
        c := &PostsPublishCall{s: r.s, opt_: make(map[string]interface{})}
 
3755
        c.blogId = blogId
 
3756
        c.postId = postId
 
3757
        return c
 
3758
}
 
3759
 
 
3760
// PublishDate sets the optional parameter "publishDate": The date and
 
3761
// time to schedule the publishing of the Blog.
 
3762
func (c *PostsPublishCall) PublishDate(publishDate string) *PostsPublishCall {
 
3763
        c.opt_["publishDate"] = publishDate
 
3764
        return c
 
3765
}
 
3766
 
 
3767
// Fields allows partial responses to be retrieved.
 
3768
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3769
// for more information.
 
3770
func (c *PostsPublishCall) Fields(s ...googleapi.Field) *PostsPublishCall {
 
3771
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3772
        return c
 
3773
}
 
3774
 
 
3775
func (c *PostsPublishCall) Do() (*Post, error) {
 
3776
        var body io.Reader = nil
 
3777
        params := make(url.Values)
 
3778
        params.Set("alt", "json")
 
3779
        if v, ok := c.opt_["publishDate"]; ok {
 
3780
                params.Set("publishDate", fmt.Sprintf("%v", v))
 
3781
        }
 
3782
        if v, ok := c.opt_["fields"]; ok {
 
3783
                params.Set("fields", fmt.Sprintf("%v", v))
 
3784
        }
 
3785
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/publish")
 
3786
        urls += "?" + params.Encode()
 
3787
        req, _ := http.NewRequest("POST", urls, body)
 
3788
        googleapi.Expand(req.URL, map[string]string{
 
3789
                "blogId": c.blogId,
 
3790
                "postId": c.postId,
 
3791
        })
 
3792
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3793
        res, err := c.s.client.Do(req)
 
3794
        if err != nil {
 
3795
                return nil, err
 
3796
        }
 
3797
        defer googleapi.CloseBody(res)
 
3798
        if err := googleapi.CheckResponse(res); err != nil {
 
3799
                return nil, err
 
3800
        }
 
3801
        var ret *Post
 
3802
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3803
                return nil, err
 
3804
        }
 
3805
        return ret, nil
 
3806
        // {
 
3807
        //   "description": "Publish a draft post.",
 
3808
        //   "httpMethod": "POST",
 
3809
        //   "id": "blogger.posts.publish",
 
3810
        //   "parameterOrder": [
 
3811
        //     "blogId",
 
3812
        //     "postId"
 
3813
        //   ],
 
3814
        //   "parameters": {
 
3815
        //     "blogId": {
 
3816
        //       "description": "The ID of the Blog.",
 
3817
        //       "location": "path",
 
3818
        //       "required": true,
 
3819
        //       "type": "string"
 
3820
        //     },
 
3821
        //     "postId": {
 
3822
        //       "description": "The ID of the Post.",
 
3823
        //       "location": "path",
 
3824
        //       "required": true,
 
3825
        //       "type": "string"
 
3826
        //     },
 
3827
        //     "publishDate": {
 
3828
        //       "description": "The date and time to schedule the publishing of the Blog.",
 
3829
        //       "format": "date-time",
 
3830
        //       "location": "query",
 
3831
        //       "type": "string"
 
3832
        //     }
 
3833
        //   },
 
3834
        //   "path": "blogs/{blogId}/posts/{postId}/publish",
 
3835
        //   "response": {
 
3836
        //     "$ref": "Post"
 
3837
        //   },
 
3838
        //   "scopes": [
 
3839
        //     "https://www.googleapis.com/auth/blogger"
 
3840
        //   ]
 
3841
        // }
 
3842
 
 
3843
}
 
3844
 
 
3845
// method id "blogger.posts.revert":
 
3846
 
 
3847
type PostsRevertCall struct {
 
3848
        s      *Service
 
3849
        blogId string
 
3850
        postId string
 
3851
        opt_   map[string]interface{}
 
3852
}
 
3853
 
 
3854
// Revert: Revert a published or scheduled post to draft state.
 
3855
func (r *PostsService) Revert(blogId string, postId string) *PostsRevertCall {
 
3856
        c := &PostsRevertCall{s: r.s, opt_: make(map[string]interface{})}
 
3857
        c.blogId = blogId
 
3858
        c.postId = postId
 
3859
        return c
 
3860
}
 
3861
 
 
3862
// Fields allows partial responses to be retrieved.
 
3863
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3864
// for more information.
 
3865
func (c *PostsRevertCall) Fields(s ...googleapi.Field) *PostsRevertCall {
 
3866
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3867
        return c
 
3868
}
 
3869
 
 
3870
func (c *PostsRevertCall) Do() (*Post, error) {
 
3871
        var body io.Reader = nil
 
3872
        params := make(url.Values)
 
3873
        params.Set("alt", "json")
 
3874
        if v, ok := c.opt_["fields"]; ok {
 
3875
                params.Set("fields", fmt.Sprintf("%v", v))
 
3876
        }
 
3877
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}/revert")
 
3878
        urls += "?" + params.Encode()
 
3879
        req, _ := http.NewRequest("POST", urls, body)
 
3880
        googleapi.Expand(req.URL, map[string]string{
 
3881
                "blogId": c.blogId,
 
3882
                "postId": c.postId,
 
3883
        })
 
3884
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3885
        res, err := c.s.client.Do(req)
 
3886
        if err != nil {
 
3887
                return nil, err
 
3888
        }
 
3889
        defer googleapi.CloseBody(res)
 
3890
        if err := googleapi.CheckResponse(res); err != nil {
 
3891
                return nil, err
 
3892
        }
 
3893
        var ret *Post
 
3894
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3895
                return nil, err
 
3896
        }
 
3897
        return ret, nil
 
3898
        // {
 
3899
        //   "description": "Revert a published or scheduled post to draft state.",
 
3900
        //   "httpMethod": "POST",
 
3901
        //   "id": "blogger.posts.revert",
 
3902
        //   "parameterOrder": [
 
3903
        //     "blogId",
 
3904
        //     "postId"
 
3905
        //   ],
 
3906
        //   "parameters": {
 
3907
        //     "blogId": {
 
3908
        //       "description": "The ID of the Blog.",
 
3909
        //       "location": "path",
 
3910
        //       "required": true,
 
3911
        //       "type": "string"
 
3912
        //     },
 
3913
        //     "postId": {
 
3914
        //       "description": "The ID of the Post.",
 
3915
        //       "location": "path",
 
3916
        //       "required": true,
 
3917
        //       "type": "string"
 
3918
        //     }
 
3919
        //   },
 
3920
        //   "path": "blogs/{blogId}/posts/{postId}/revert",
 
3921
        //   "response": {
 
3922
        //     "$ref": "Post"
 
3923
        //   },
 
3924
        //   "scopes": [
 
3925
        //     "https://www.googleapis.com/auth/blogger"
 
3926
        //   ]
 
3927
        // }
 
3928
 
 
3929
}
 
3930
 
 
3931
// method id "blogger.posts.search":
 
3932
 
 
3933
type PostsSearchCall struct {
 
3934
        s      *Service
 
3935
        blogId string
 
3936
        q      string
 
3937
        opt_   map[string]interface{}
 
3938
}
 
3939
 
 
3940
// Search: Search for a post.
 
3941
func (r *PostsService) Search(blogId string, q string) *PostsSearchCall {
 
3942
        c := &PostsSearchCall{s: r.s, opt_: make(map[string]interface{})}
 
3943
        c.blogId = blogId
 
3944
        c.q = q
 
3945
        return c
 
3946
}
 
3947
 
 
3948
// FetchBodies sets the optional parameter "fetchBodies": Whether the
 
3949
// body content of posts is included (default: true). This should be set
 
3950
// to false when the post bodies are not required, to help minimize
 
3951
// traffic.
 
3952
func (c *PostsSearchCall) FetchBodies(fetchBodies bool) *PostsSearchCall {
 
3953
        c.opt_["fetchBodies"] = fetchBodies
 
3954
        return c
 
3955
}
 
3956
 
 
3957
// OrderBy sets the optional parameter "orderBy": Sort search results
 
3958
func (c *PostsSearchCall) OrderBy(orderBy string) *PostsSearchCall {
 
3959
        c.opt_["orderBy"] = orderBy
 
3960
        return c
 
3961
}
 
3962
 
 
3963
// Fields allows partial responses to be retrieved.
 
3964
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3965
// for more information.
 
3966
func (c *PostsSearchCall) Fields(s ...googleapi.Field) *PostsSearchCall {
 
3967
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3968
        return c
 
3969
}
 
3970
 
 
3971
func (c *PostsSearchCall) Do() (*PostList, error) {
 
3972
        var body io.Reader = nil
 
3973
        params := make(url.Values)
 
3974
        params.Set("alt", "json")
 
3975
        params.Set("q", fmt.Sprintf("%v", c.q))
 
3976
        if v, ok := c.opt_["fetchBodies"]; ok {
 
3977
                params.Set("fetchBodies", fmt.Sprintf("%v", v))
 
3978
        }
 
3979
        if v, ok := c.opt_["orderBy"]; ok {
 
3980
                params.Set("orderBy", fmt.Sprintf("%v", v))
 
3981
        }
 
3982
        if v, ok := c.opt_["fields"]; ok {
 
3983
                params.Set("fields", fmt.Sprintf("%v", v))
 
3984
        }
 
3985
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/search")
 
3986
        urls += "?" + params.Encode()
 
3987
        req, _ := http.NewRequest("GET", urls, body)
 
3988
        googleapi.Expand(req.URL, map[string]string{
 
3989
                "blogId": c.blogId,
 
3990
        })
 
3991
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3992
        res, err := c.s.client.Do(req)
 
3993
        if err != nil {
 
3994
                return nil, err
 
3995
        }
 
3996
        defer googleapi.CloseBody(res)
 
3997
        if err := googleapi.CheckResponse(res); err != nil {
 
3998
                return nil, err
 
3999
        }
 
4000
        var ret *PostList
 
4001
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4002
                return nil, err
 
4003
        }
 
4004
        return ret, nil
 
4005
        // {
 
4006
        //   "description": "Search for a post.",
 
4007
        //   "httpMethod": "GET",
 
4008
        //   "id": "blogger.posts.search",
 
4009
        //   "parameterOrder": [
 
4010
        //     "blogId",
 
4011
        //     "q"
 
4012
        //   ],
 
4013
        //   "parameters": {
 
4014
        //     "blogId": {
 
4015
        //       "description": "ID of the blog to fetch the post from.",
 
4016
        //       "location": "path",
 
4017
        //       "required": true,
 
4018
        //       "type": "string"
 
4019
        //     },
 
4020
        //     "fetchBodies": {
 
4021
        //       "default": "true",
 
4022
        //       "description": "Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic.",
 
4023
        //       "location": "query",
 
4024
        //       "type": "boolean"
 
4025
        //     },
 
4026
        //     "orderBy": {
 
4027
        //       "default": "PUBLISHED",
 
4028
        //       "description": "Sort search results",
 
4029
        //       "enum": [
 
4030
        //         "published",
 
4031
        //         "updated"
 
4032
        //       ],
 
4033
        //       "enumDescriptions": [
 
4034
        //         "Order by the date the post was published",
 
4035
        //         "Order by the date the post was last updated"
 
4036
        //       ],
 
4037
        //       "location": "query",
 
4038
        //       "type": "string"
 
4039
        //     },
 
4040
        //     "q": {
 
4041
        //       "description": "Query terms to search this blog for matching posts.",
 
4042
        //       "location": "query",
 
4043
        //       "required": true,
 
4044
        //       "type": "string"
 
4045
        //     }
 
4046
        //   },
 
4047
        //   "path": "blogs/{blogId}/posts/search",
 
4048
        //   "response": {
 
4049
        //     "$ref": "PostList"
 
4050
        //   },
 
4051
        //   "scopes": [
 
4052
        //     "https://www.googleapis.com/auth/blogger",
 
4053
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
4054
        //   ]
 
4055
        // }
 
4056
 
 
4057
}
 
4058
 
 
4059
// method id "blogger.posts.update":
 
4060
 
 
4061
type PostsUpdateCall struct {
 
4062
        s      *Service
 
4063
        blogId string
 
4064
        postId string
 
4065
        post   *Post
 
4066
        opt_   map[string]interface{}
 
4067
}
 
4068
 
 
4069
// Update: Update a post.
 
4070
func (r *PostsService) Update(blogId string, postId string, post *Post) *PostsUpdateCall {
 
4071
        c := &PostsUpdateCall{s: r.s, opt_: make(map[string]interface{})}
 
4072
        c.blogId = blogId
 
4073
        c.postId = postId
 
4074
        c.post = post
 
4075
        return c
 
4076
}
 
4077
 
 
4078
// Fields allows partial responses to be retrieved.
 
4079
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4080
// for more information.
 
4081
func (c *PostsUpdateCall) Fields(s ...googleapi.Field) *PostsUpdateCall {
 
4082
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4083
        return c
 
4084
}
 
4085
 
 
4086
func (c *PostsUpdateCall) Do() (*Post, error) {
 
4087
        var body io.Reader = nil
 
4088
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
 
4089
        if err != nil {
 
4090
                return nil, err
 
4091
        }
 
4092
        ctype := "application/json"
 
4093
        params := make(url.Values)
 
4094
        params.Set("alt", "json")
 
4095
        if v, ok := c.opt_["fields"]; ok {
 
4096
                params.Set("fields", fmt.Sprintf("%v", v))
 
4097
        }
 
4098
        urls := googleapi.ResolveRelative(c.s.BasePath, "blogs/{blogId}/posts/{postId}")
 
4099
        urls += "?" + params.Encode()
 
4100
        req, _ := http.NewRequest("PUT", urls, body)
 
4101
        googleapi.Expand(req.URL, map[string]string{
 
4102
                "blogId": c.blogId,
 
4103
                "postId": c.postId,
 
4104
        })
 
4105
        req.Header.Set("Content-Type", ctype)
 
4106
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4107
        res, err := c.s.client.Do(req)
 
4108
        if err != nil {
 
4109
                return nil, err
 
4110
        }
 
4111
        defer googleapi.CloseBody(res)
 
4112
        if err := googleapi.CheckResponse(res); err != nil {
 
4113
                return nil, err
 
4114
        }
 
4115
        var ret *Post
 
4116
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4117
                return nil, err
 
4118
        }
 
4119
        return ret, nil
 
4120
        // {
 
4121
        //   "description": "Update a post.",
 
4122
        //   "httpMethod": "PUT",
 
4123
        //   "id": "blogger.posts.update",
 
4124
        //   "parameterOrder": [
 
4125
        //     "blogId",
 
4126
        //     "postId"
 
4127
        //   ],
 
4128
        //   "parameters": {
 
4129
        //     "blogId": {
 
4130
        //       "description": "The ID of the Blog.",
 
4131
        //       "location": "path",
 
4132
        //       "required": true,
 
4133
        //       "type": "string"
 
4134
        //     },
 
4135
        //     "postId": {
 
4136
        //       "description": "The ID of the Post.",
 
4137
        //       "location": "path",
 
4138
        //       "required": true,
 
4139
        //       "type": "string"
 
4140
        //     }
 
4141
        //   },
 
4142
        //   "path": "blogs/{blogId}/posts/{postId}",
 
4143
        //   "request": {
 
4144
        //     "$ref": "Post"
 
4145
        //   },
 
4146
        //   "response": {
 
4147
        //     "$ref": "Post"
 
4148
        //   },
 
4149
        //   "scopes": [
 
4150
        //     "https://www.googleapis.com/auth/blogger"
 
4151
        //   ]
 
4152
        // }
 
4153
 
 
4154
}
 
4155
 
 
4156
// method id "blogger.users.get":
 
4157
 
 
4158
type UsersGetCall struct {
 
4159
        s      *Service
 
4160
        userId string
 
4161
        opt_   map[string]interface{}
 
4162
}
 
4163
 
 
4164
// Get: Gets one user by id.
 
4165
func (r *UsersService) Get(userId string) *UsersGetCall {
 
4166
        c := &UsersGetCall{s: r.s, opt_: make(map[string]interface{})}
 
4167
        c.userId = userId
 
4168
        return c
 
4169
}
 
4170
 
 
4171
// Fields allows partial responses to be retrieved.
 
4172
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4173
// for more information.
 
4174
func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
 
4175
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4176
        return c
 
4177
}
 
4178
 
 
4179
func (c *UsersGetCall) Do() (*User, error) {
 
4180
        var body io.Reader = nil
 
4181
        params := make(url.Values)
 
4182
        params.Set("alt", "json")
 
4183
        if v, ok := c.opt_["fields"]; ok {
 
4184
                params.Set("fields", fmt.Sprintf("%v", v))
 
4185
        }
 
4186
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}")
 
4187
        urls += "?" + params.Encode()
 
4188
        req, _ := http.NewRequest("GET", urls, body)
 
4189
        googleapi.Expand(req.URL, map[string]string{
 
4190
                "userId": c.userId,
 
4191
        })
 
4192
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4193
        res, err := c.s.client.Do(req)
 
4194
        if err != nil {
 
4195
                return nil, err
 
4196
        }
 
4197
        defer googleapi.CloseBody(res)
 
4198
        if err := googleapi.CheckResponse(res); err != nil {
 
4199
                return nil, err
 
4200
        }
 
4201
        var ret *User
 
4202
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4203
                return nil, err
 
4204
        }
 
4205
        return ret, nil
 
4206
        // {
 
4207
        //   "description": "Gets one user by id.",
 
4208
        //   "httpMethod": "GET",
 
4209
        //   "id": "blogger.users.get",
 
4210
        //   "parameterOrder": [
 
4211
        //     "userId"
 
4212
        //   ],
 
4213
        //   "parameters": {
 
4214
        //     "userId": {
 
4215
        //       "description": "The ID of the user to get.",
 
4216
        //       "location": "path",
 
4217
        //       "required": true,
 
4218
        //       "type": "string"
 
4219
        //     }
 
4220
        //   },
 
4221
        //   "path": "users/{userId}",
 
4222
        //   "response": {
 
4223
        //     "$ref": "User"
 
4224
        //   },
 
4225
        //   "scopes": [
 
4226
        //     "https://www.googleapis.com/auth/blogger",
 
4227
        //     "https://www.googleapis.com/auth/blogger.readonly"
 
4228
        //   ]
 
4229
        // }
 
4230
 
 
4231
}