~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/plusdomains/v1/plusdomains-gen.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Package plusdomains provides access to the Google+ Domains API.
 
2
//
 
3
// See https://developers.google.com/+/domains/
 
4
//
 
5
// Usage example:
 
6
//
 
7
//   import "google.golang.org/api/plusdomains/v1"
 
8
//   ...
 
9
//   plusdomainsService, err := plusdomains.New(oauthHttpClient)
 
10
package plusdomains
 
11
 
 
12
import (
 
13
        "bytes"
 
14
        "encoding/json"
 
15
        "errors"
 
16
        "fmt"
 
17
        "google.golang.org/api/googleapi"
 
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 = "plusDomains:v1"
 
38
const apiName = "plusDomains"
 
39
const apiVersion = "v1"
 
40
const basePath = "https://www.googleapis.com/plusDomains/v1/"
 
41
 
 
42
// OAuth2 scopes used by this API.
 
43
const (
 
44
        // View your circles and the people and pages in them
 
45
        PlusCirclesReadScope = "https://www.googleapis.com/auth/plus.circles.read"
 
46
 
 
47
        // Manage your circles and add people and pages. People and pages you
 
48
        // add to your circles will be notified. Others may see this information
 
49
        // publicly. People you add to circles can use Hangouts with you.
 
50
        PlusCirclesWriteScope = "https://www.googleapis.com/auth/plus.circles.write"
 
51
 
 
52
        // Know your basic profile info and list of people in your circles.
 
53
        PlusLoginScope = "https://www.googleapis.com/auth/plus.login"
 
54
 
 
55
        // Know who you are on Google
 
56
        PlusMeScope = "https://www.googleapis.com/auth/plus.me"
 
57
 
 
58
        // Send your photos and videos to Google+
 
59
        PlusMediaUploadScope = "https://www.googleapis.com/auth/plus.media.upload"
 
60
 
 
61
        // View your own Google+ profile and profiles visible to you
 
62
        PlusProfilesReadScope = "https://www.googleapis.com/auth/plus.profiles.read"
 
63
 
 
64
        // View your Google+ posts, comments, and stream
 
65
        PlusStreamReadScope = "https://www.googleapis.com/auth/plus.stream.read"
 
66
 
 
67
        // Manage your Google+ posts, comments, and stream
 
68
        PlusStreamWriteScope = "https://www.googleapis.com/auth/plus.stream.write"
 
69
 
 
70
        // View your email address
 
71
        UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
 
72
 
 
73
        // View your basic profile info
 
74
        UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
 
75
)
 
76
 
 
77
func New(client *http.Client) (*Service, error) {
 
78
        if client == nil {
 
79
                return nil, errors.New("client is nil")
 
80
        }
 
81
        s := &Service{client: client, BasePath: basePath}
 
82
        s.Activities = NewActivitiesService(s)
 
83
        s.Audiences = NewAudiencesService(s)
 
84
        s.Circles = NewCirclesService(s)
 
85
        s.Comments = NewCommentsService(s)
 
86
        s.Media = NewMediaService(s)
 
87
        s.People = NewPeopleService(s)
 
88
        return s, nil
 
89
}
 
90
 
 
91
type Service struct {
 
92
        client   *http.Client
 
93
        BasePath string // API endpoint base URL
 
94
 
 
95
        Activities *ActivitiesService
 
96
 
 
97
        Audiences *AudiencesService
 
98
 
 
99
        Circles *CirclesService
 
100
 
 
101
        Comments *CommentsService
 
102
 
 
103
        Media *MediaService
 
104
 
 
105
        People *PeopleService
 
106
}
 
107
 
 
108
func NewActivitiesService(s *Service) *ActivitiesService {
 
109
        rs := &ActivitiesService{s: s}
 
110
        return rs
 
111
}
 
112
 
 
113
type ActivitiesService struct {
 
114
        s *Service
 
115
}
 
116
 
 
117
func NewAudiencesService(s *Service) *AudiencesService {
 
118
        rs := &AudiencesService{s: s}
 
119
        return rs
 
120
}
 
121
 
 
122
type AudiencesService struct {
 
123
        s *Service
 
124
}
 
125
 
 
126
func NewCirclesService(s *Service) *CirclesService {
 
127
        rs := &CirclesService{s: s}
 
128
        return rs
 
129
}
 
130
 
 
131
type CirclesService struct {
 
132
        s *Service
 
133
}
 
134
 
 
135
func NewCommentsService(s *Service) *CommentsService {
 
136
        rs := &CommentsService{s: s}
 
137
        return rs
 
138
}
 
139
 
 
140
type CommentsService struct {
 
141
        s *Service
 
142
}
 
143
 
 
144
func NewMediaService(s *Service) *MediaService {
 
145
        rs := &MediaService{s: s}
 
146
        return rs
 
147
}
 
148
 
 
149
type MediaService struct {
 
150
        s *Service
 
151
}
 
152
 
 
153
func NewPeopleService(s *Service) *PeopleService {
 
154
        rs := &PeopleService{s: s}
 
155
        return rs
 
156
}
 
157
 
 
158
type PeopleService struct {
 
159
        s *Service
 
160
}
 
161
 
 
162
type Acl struct {
 
163
        // Description: Description of the access granted, suitable for display.
 
164
        Description string `json:"description,omitempty"`
 
165
 
 
166
        // DomainRestricted: Whether access is restricted to the domain.
 
167
        DomainRestricted bool `json:"domainRestricted,omitempty"`
 
168
 
 
169
        // Items: The list of access entries.
 
170
        Items []*PlusDomainsAclentryResource `json:"items,omitempty"`
 
171
 
 
172
        // Kind: Identifies this resource as a collection of access controls.
 
173
        // Value: "plus#acl".
 
174
        Kind string `json:"kind,omitempty"`
 
175
}
 
176
 
 
177
type Activity struct {
 
178
        // Access: Identifies who has access to see this activity.
 
179
        Access *Acl `json:"access,omitempty"`
 
180
 
 
181
        // Actor: The person who performed this activity.
 
182
        Actor *ActivityActor `json:"actor,omitempty"`
 
183
 
 
184
        // Address: Street address where this activity occurred.
 
185
        Address string `json:"address,omitempty"`
 
186
 
 
187
        // Annotation: Additional content added by the person who shared this
 
188
        // activity, applicable only when resharing an activity.
 
189
        Annotation string `json:"annotation,omitempty"`
 
190
 
 
191
        // CrosspostSource: If this activity is a crosspost from another system,
 
192
        // this property specifies the ID of the original activity.
 
193
        CrosspostSource string `json:"crosspostSource,omitempty"`
 
194
 
 
195
        // Etag: ETag of this response for caching purposes.
 
196
        Etag string `json:"etag,omitempty"`
 
197
 
 
198
        // Geocode: Latitude and longitude where this activity occurred. Format
 
199
        // is latitude followed by longitude, space separated.
 
200
        Geocode string `json:"geocode,omitempty"`
 
201
 
 
202
        // Id: The ID of this activity.
 
203
        Id string `json:"id,omitempty"`
 
204
 
 
205
        // Kind: Identifies this resource as an activity. Value:
 
206
        // "plus#activity".
 
207
        Kind string `json:"kind,omitempty"`
 
208
 
 
209
        // Location: The location where this activity occurred.
 
210
        Location *Place `json:"location,omitempty"`
 
211
 
 
212
        // Object: The object of this activity.
 
213
        Object *ActivityObject `json:"object,omitempty"`
 
214
 
 
215
        // PlaceId: ID of the place where this activity occurred.
 
216
        PlaceId string `json:"placeId,omitempty"`
 
217
 
 
218
        // PlaceName: Name of the place where this activity occurred.
 
219
        PlaceName string `json:"placeName,omitempty"`
 
220
 
 
221
        // Provider: The service provider that initially published this
 
222
        // activity.
 
223
        Provider *ActivityProvider `json:"provider,omitempty"`
 
224
 
 
225
        // Published: The time at which this activity was initially published.
 
226
        // Formatted as an RFC 3339 timestamp.
 
227
        Published string `json:"published,omitempty"`
 
228
 
 
229
        // Radius: Radius, in meters, of the region where this activity
 
230
        // occurred, centered at the latitude and longitude identified in
 
231
        // geocode.
 
232
        Radius string `json:"radius,omitempty"`
 
233
 
 
234
        // Title: Title of this activity.
 
235
        Title string `json:"title,omitempty"`
 
236
 
 
237
        // Updated: The time at which this activity was last updated. Formatted
 
238
        // as an RFC 3339 timestamp.
 
239
        Updated string `json:"updated,omitempty"`
 
240
 
 
241
        // Url: The link to this activity.
 
242
        Url string `json:"url,omitempty"`
 
243
 
 
244
        // Verb: This activity's verb, which indicates the action that was
 
245
        // performed. Possible values include, but are not limited to, the
 
246
        // following values:
 
247
        // - "post" - Publish content to the stream.
 
248
        // -
 
249
        // "share" - Reshare an activity.
 
250
        Verb string `json:"verb,omitempty"`
 
251
}
 
252
 
 
253
type ActivityActor struct {
 
254
        // DisplayName: The name of the actor, suitable for display.
 
255
        DisplayName string `json:"displayName,omitempty"`
 
256
 
 
257
        // Id: The ID of the actor's Person resource.
 
258
        Id string `json:"id,omitempty"`
 
259
 
 
260
        // Image: The image representation of the actor.
 
261
        Image *ActivityActorImage `json:"image,omitempty"`
 
262
 
 
263
        // Name: An object representation of the individual components of name.
 
264
        Name *ActivityActorName `json:"name,omitempty"`
 
265
 
 
266
        // Url: The link to the actor's Google profile.
 
267
        Url string `json:"url,omitempty"`
 
268
}
 
269
 
 
270
type ActivityActorImage struct {
 
271
        // Url: The URL of the actor's profile photo. To resize the image and
 
272
        // crop it to a square, append the query string ?sz=x, where x is the
 
273
        // dimension in pixels of each side.
 
274
        Url string `json:"url,omitempty"`
 
275
}
 
276
 
 
277
type ActivityActorName struct {
 
278
        // FamilyName: The family name ("last name") of the actor.
 
279
        FamilyName string `json:"familyName,omitempty"`
 
280
 
 
281
        // GivenName: The given name ("first name") of the actor.
 
282
        GivenName string `json:"givenName,omitempty"`
 
283
}
 
284
 
 
285
type ActivityObject struct {
 
286
        // Actor: If this activity's object is itself another activity, such as
 
287
        // when a person reshares an activity, this property specifies the
 
288
        // original activity's actor.
 
289
        Actor *ActivityObjectActor `json:"actor,omitempty"`
 
290
 
 
291
        // Attachments: The media objects attached to this activity.
 
292
        Attachments []*ActivityObjectAttachments `json:"attachments,omitempty"`
 
293
 
 
294
        // Content: The HTML-formatted content, which is suitable for display.
 
295
        Content string `json:"content,omitempty"`
 
296
 
 
297
        // Id: The ID of the object. When resharing an activity, this is the ID
 
298
        // of the activity that is being reshared.
 
299
        Id string `json:"id,omitempty"`
 
300
 
 
301
        // ObjectType: The type of the object. Possible values include, but are
 
302
        // not limited to, the following values:
 
303
        // - "note" - Textual content.
 
304
        //
 
305
        // - "activity" - A Google+ activity.
 
306
        ObjectType string `json:"objectType,omitempty"`
 
307
 
 
308
        // OriginalContent: The content (text) as provided by the author, which
 
309
        // is stored without any HTML formatting. When creating or updating an
 
310
        // activity, this value must be supplied as plain text in the request.
 
311
        OriginalContent string `json:"originalContent,omitempty"`
 
312
 
 
313
        // Plusoners: People who +1'd this activity.
 
314
        Plusoners *ActivityObjectPlusoners `json:"plusoners,omitempty"`
 
315
 
 
316
        // Replies: Comments in reply to this activity.
 
317
        Replies *ActivityObjectReplies `json:"replies,omitempty"`
 
318
 
 
319
        // Resharers: People who reshared this activity.
 
320
        Resharers *ActivityObjectResharers `json:"resharers,omitempty"`
 
321
 
 
322
        // StatusForViewer: Status of the activity as seen by the viewer.
 
323
        StatusForViewer *ActivityObjectStatusForViewer `json:"statusForViewer,omitempty"`
 
324
 
 
325
        // Url: The URL that points to the linked resource.
 
326
        Url string `json:"url,omitempty"`
 
327
}
 
328
 
 
329
type ActivityObjectActor struct {
 
330
        // DisplayName: The original actor's name, which is suitable for
 
331
        // display.
 
332
        DisplayName string `json:"displayName,omitempty"`
 
333
 
 
334
        // Id: ID of the original actor.
 
335
        Id string `json:"id,omitempty"`
 
336
 
 
337
        // Image: The image representation of the original actor.
 
338
        Image *ActivityObjectActorImage `json:"image,omitempty"`
 
339
 
 
340
        // Url: A link to the original actor's Google profile.
 
341
        Url string `json:"url,omitempty"`
 
342
}
 
343
 
 
344
type ActivityObjectActorImage struct {
 
345
        // Url: A URL that points to a thumbnail photo of the original actor.
 
346
        Url string `json:"url,omitempty"`
 
347
}
 
348
 
 
349
type ActivityObjectAttachments struct {
 
350
        // Content: If the attachment is an article, this property contains a
 
351
        // snippet of text from the article. It can also include descriptions
 
352
        // for other types.
 
353
        Content string `json:"content,omitempty"`
 
354
 
 
355
        // DisplayName: The title of the attachment, such as a photo caption or
 
356
        // an article title.
 
357
        DisplayName string `json:"displayName,omitempty"`
 
358
 
 
359
        // Embed: If the attachment is a video, the embeddable link.
 
360
        Embed *ActivityObjectAttachmentsEmbed `json:"embed,omitempty"`
 
361
 
 
362
        // FullImage: The full image URL for photo attachments.
 
363
        FullImage *ActivityObjectAttachmentsFullImage `json:"fullImage,omitempty"`
 
364
 
 
365
        // Id: The ID of the attachment.
 
366
        Id string `json:"id,omitempty"`
 
367
 
 
368
        // Image: The preview image for photos or videos.
 
369
        Image *ActivityObjectAttachmentsImage `json:"image,omitempty"`
 
370
 
 
371
        // ObjectType: The type of media object. Possible values include, but
 
372
        // are not limited to, the following values:
 
373
        // - "photo" - A photo.
 
374
        // -
 
375
        // "album" - A photo album.
 
376
        // - "video" - A video.
 
377
        // - "article" - An
 
378
        // article, specified by a link.
 
379
        ObjectType string `json:"objectType,omitempty"`
 
380
 
 
381
        // PreviewThumbnails: When previewing, these are the optional thumbnails
 
382
        // for the post. When posting an article, choose one by setting the
 
383
        // attachment.image.url property. If you don't choose one, one will be
 
384
        // chosen for you.
 
385
        PreviewThumbnails []*ActivityObjectAttachmentsPreviewThumbnails `json:"previewThumbnails,omitempty"`
 
386
 
 
387
        // Thumbnails: If the attachment is an album, this property is a list of
 
388
        // potential additional thumbnails from the album.
 
389
        Thumbnails []*ActivityObjectAttachmentsThumbnails `json:"thumbnails,omitempty"`
 
390
 
 
391
        // Url: The link to the attachment, which should be of type text/html.
 
392
        Url string `json:"url,omitempty"`
 
393
}
 
394
 
 
395
type ActivityObjectAttachmentsEmbed struct {
 
396
        // Type: Media type of the link.
 
397
        Type string `json:"type,omitempty"`
 
398
 
 
399
        // Url: URL of the link.
 
400
        Url string `json:"url,omitempty"`
 
401
}
 
402
 
 
403
type ActivityObjectAttachmentsFullImage struct {
 
404
        // Height: The height, in pixels, of the linked resource.
 
405
        Height int64 `json:"height,omitempty"`
 
406
 
 
407
        // Type: Media type of the link.
 
408
        Type string `json:"type,omitempty"`
 
409
 
 
410
        // Url: URL of the image.
 
411
        Url string `json:"url,omitempty"`
 
412
 
 
413
        // Width: The width, in pixels, of the linked resource.
 
414
        Width int64 `json:"width,omitempty"`
 
415
}
 
416
 
 
417
type ActivityObjectAttachmentsImage struct {
 
418
        // Height: The height, in pixels, of the linked resource.
 
419
        Height int64 `json:"height,omitempty"`
 
420
 
 
421
        // Type: Media type of the link.
 
422
        Type string `json:"type,omitempty"`
 
423
 
 
424
        // Url: Image URL.
 
425
        Url string `json:"url,omitempty"`
 
426
 
 
427
        // Width: The width, in pixels, of the linked resource.
 
428
        Width int64 `json:"width,omitempty"`
 
429
}
 
430
 
 
431
type ActivityObjectAttachmentsPreviewThumbnails struct {
 
432
        // Url: URL of the thumbnail image.
 
433
        Url string `json:"url,omitempty"`
 
434
}
 
435
 
 
436
type ActivityObjectAttachmentsThumbnails struct {
 
437
        // Description: Potential name of the thumbnail.
 
438
        Description string `json:"description,omitempty"`
 
439
 
 
440
        // Image: Image resource.
 
441
        Image *ActivityObjectAttachmentsThumbnailsImage `json:"image,omitempty"`
 
442
 
 
443
        // Url: URL of the webpage containing the image.
 
444
        Url string `json:"url,omitempty"`
 
445
}
 
446
 
 
447
type ActivityObjectAttachmentsThumbnailsImage struct {
 
448
        // Height: The height, in pixels, of the linked resource.
 
449
        Height int64 `json:"height,omitempty"`
 
450
 
 
451
        // Type: Media type of the link.
 
452
        Type string `json:"type,omitempty"`
 
453
 
 
454
        // Url: Image url.
 
455
        Url string `json:"url,omitempty"`
 
456
 
 
457
        // Width: The width, in pixels, of the linked resource.
 
458
        Width int64 `json:"width,omitempty"`
 
459
}
 
460
 
 
461
type ActivityObjectPlusoners struct {
 
462
        // SelfLink: The URL for the collection of people who +1'd this
 
463
        // activity.
 
464
        SelfLink string `json:"selfLink,omitempty"`
 
465
 
 
466
        // TotalItems: Total number of people who +1'd this activity.
 
467
        TotalItems int64 `json:"totalItems,omitempty"`
 
468
}
 
469
 
 
470
type ActivityObjectReplies struct {
 
471
        // SelfLink: The URL for the collection of comments in reply to this
 
472
        // activity.
 
473
        SelfLink string `json:"selfLink,omitempty"`
 
474
 
 
475
        // TotalItems: Total number of comments on this activity.
 
476
        TotalItems int64 `json:"totalItems,omitempty"`
 
477
}
 
478
 
 
479
type ActivityObjectResharers struct {
 
480
        // SelfLink: The URL for the collection of resharers.
 
481
        SelfLink string `json:"selfLink,omitempty"`
 
482
 
 
483
        // TotalItems: Total number of people who reshared this activity.
 
484
        TotalItems int64 `json:"totalItems,omitempty"`
 
485
}
 
486
 
 
487
type ActivityObjectStatusForViewer struct {
 
488
        // CanComment: Whether the viewer can comment on the activity.
 
489
        CanComment bool `json:"canComment,omitempty"`
 
490
 
 
491
        // CanPlusone: Whether the viewer can +1 the activity.
 
492
        CanPlusone bool `json:"canPlusone,omitempty"`
 
493
 
 
494
        // CanUpdate: Whether the viewer can edit or delete the activity.
 
495
        CanUpdate bool `json:"canUpdate,omitempty"`
 
496
 
 
497
        // IsPlusOned: Whether the viewer has +1'd the activity.
 
498
        IsPlusOned bool `json:"isPlusOned,omitempty"`
 
499
 
 
500
        // ResharingDisabled: Whether reshares are disabled for the activity.
 
501
        ResharingDisabled bool `json:"resharingDisabled,omitempty"`
 
502
}
 
503
 
 
504
type ActivityProvider struct {
 
505
        // Title: Name of the service provider.
 
506
        Title string `json:"title,omitempty"`
 
507
}
 
508
 
 
509
type ActivityFeed struct {
 
510
        // Etag: ETag of this response for caching purposes.
 
511
        Etag string `json:"etag,omitempty"`
 
512
 
 
513
        // Id: The ID of this collection of activities. Deprecated.
 
514
        Id string `json:"id,omitempty"`
 
515
 
 
516
        // Items: The activities in this page of results.
 
517
        Items []*Activity `json:"items,omitempty"`
 
518
 
 
519
        // Kind: Identifies this resource as a collection of activities. Value:
 
520
        // "plus#activityFeed".
 
521
        Kind string `json:"kind,omitempty"`
 
522
 
 
523
        // NextLink: Link to the next page of activities.
 
524
        NextLink string `json:"nextLink,omitempty"`
 
525
 
 
526
        // NextPageToken: The continuation token, which is used to page through
 
527
        // large result sets. Provide this value in a subsequent request to
 
528
        // return the next page of results.
 
529
        NextPageToken string `json:"nextPageToken,omitempty"`
 
530
 
 
531
        // SelfLink: Link to this activity resource.
 
532
        SelfLink string `json:"selfLink,omitempty"`
 
533
 
 
534
        // Title: The title of this collection of activities, which is a
 
535
        // truncated portion of the content.
 
536
        Title string `json:"title,omitempty"`
 
537
 
 
538
        // Updated: The time at which this collection of activities was last
 
539
        // updated. Formatted as an RFC 3339 timestamp.
 
540
        Updated string `json:"updated,omitempty"`
 
541
}
 
542
 
 
543
type Audience struct {
 
544
        // Etag: ETag of this response for caching purposes.
 
545
        Etag string `json:"etag,omitempty"`
 
546
 
 
547
        // Item: The access control list entry.
 
548
        Item *PlusDomainsAclentryResource `json:"item,omitempty"`
 
549
 
 
550
        // Kind: Identifies this resource as an audience. Value:
 
551
        // "plus#audience".
 
552
        Kind string `json:"kind,omitempty"`
 
553
 
 
554
        // MemberCount: The number of people in this circle. This only applies
 
555
        // if entity_type is CIRCLE.
 
556
        MemberCount int64 `json:"memberCount,omitempty"`
 
557
 
 
558
        // Visibility: The circle members' visibility as chosen by the owner of
 
559
        // the circle. This only applies for items with "item.type" equals
 
560
        // "circle". Possible values are:
 
561
        // - "public" - Members are visible to
 
562
        // the public.
 
563
        // - "limited" - Members are visible to a limited audience.
 
564
        //
 
565
        // - "private" - Members are visible to the owner only.
 
566
        Visibility string `json:"visibility,omitempty"`
 
567
}
 
568
 
 
569
type AudiencesFeed struct {
 
570
        // Etag: ETag of this response for caching purposes.
 
571
        Etag string `json:"etag,omitempty"`
 
572
 
 
573
        // Items: The audiences in this result.
 
574
        Items []*Audience `json:"items,omitempty"`
 
575
 
 
576
        // Kind: Identifies this resource as a collection of audiences. Value:
 
577
        // "plus#audienceFeed".
 
578
        Kind string `json:"kind,omitempty"`
 
579
 
 
580
        // NextPageToken: The continuation token, which is used to page through
 
581
        // large result sets. Provide this value in a subsequent request to
 
582
        // return the next page of results.
 
583
        NextPageToken string `json:"nextPageToken,omitempty"`
 
584
 
 
585
        // TotalItems: The total number of ACL entries. The number of entries in
 
586
        // this response may be smaller due to paging.
 
587
        TotalItems int64 `json:"totalItems,omitempty"`
 
588
}
 
589
 
 
590
type Circle struct {
 
591
        // Description: The description of this circle.
 
592
        Description string `json:"description,omitempty"`
 
593
 
 
594
        // DisplayName: The circle name.
 
595
        DisplayName string `json:"displayName,omitempty"`
 
596
 
 
597
        // Etag: ETag of this response for caching purposes.
 
598
        Etag string `json:"etag,omitempty"`
 
599
 
 
600
        // Id: The ID of the circle.
 
601
        Id string `json:"id,omitempty"`
 
602
 
 
603
        // Kind: Identifies this resource as a circle. Value: "plus#circle".
 
604
        Kind string `json:"kind,omitempty"`
 
605
 
 
606
        // People: The people in this circle.
 
607
        People *CirclePeople `json:"people,omitempty"`
 
608
 
 
609
        // SelfLink: Link to this circle resource
 
610
        SelfLink string `json:"selfLink,omitempty"`
 
611
}
 
612
 
 
613
type CirclePeople struct {
 
614
        // TotalItems: The total number of people in this circle.
 
615
        TotalItems int64 `json:"totalItems,omitempty"`
 
616
}
 
617
 
 
618
type CircleFeed struct {
 
619
        // Etag: ETag of this response for caching purposes.
 
620
        Etag string `json:"etag,omitempty"`
 
621
 
 
622
        // Items: The circles in this page of results.
 
623
        Items []*Circle `json:"items,omitempty"`
 
624
 
 
625
        // Kind: Identifies this resource as a collection of circles. Value:
 
626
        // "plus#circleFeed".
 
627
        Kind string `json:"kind,omitempty"`
 
628
 
 
629
        // NextLink: Link to the next page of circles.
 
630
        NextLink string `json:"nextLink,omitempty"`
 
631
 
 
632
        // NextPageToken: The continuation token, which is used to page through
 
633
        // large result sets. Provide this value in a subsequent request to
 
634
        // return the next page of results.
 
635
        NextPageToken string `json:"nextPageToken,omitempty"`
 
636
 
 
637
        // SelfLink: Link to this page of circles.
 
638
        SelfLink string `json:"selfLink,omitempty"`
 
639
 
 
640
        // Title: The title of this list of resources.
 
641
        Title string `json:"title,omitempty"`
 
642
 
 
643
        // TotalItems: The total number of circles. The number of circles in
 
644
        // this response may be smaller due to paging.
 
645
        TotalItems int64 `json:"totalItems,omitempty"`
 
646
}
 
647
 
 
648
type Comment struct {
 
649
        // Actor: The person who posted this comment.
 
650
        Actor *CommentActor `json:"actor,omitempty"`
 
651
 
 
652
        // Etag: ETag of this response for caching purposes.
 
653
        Etag string `json:"etag,omitempty"`
 
654
 
 
655
        // Id: The ID of this comment.
 
656
        Id string `json:"id,omitempty"`
 
657
 
 
658
        // InReplyTo: The activity this comment replied to.
 
659
        InReplyTo []*CommentInReplyTo `json:"inReplyTo,omitempty"`
 
660
 
 
661
        // Kind: Identifies this resource as a comment. Value: "plus#comment".
 
662
        Kind string `json:"kind,omitempty"`
 
663
 
 
664
        // Object: The object of this comment.
 
665
        Object *CommentObject `json:"object,omitempty"`
 
666
 
 
667
        // Plusoners: People who +1'd this comment.
 
668
        Plusoners *CommentPlusoners `json:"plusoners,omitempty"`
 
669
 
 
670
        // Published: The time at which this comment was initially published.
 
671
        // Formatted as an RFC 3339 timestamp.
 
672
        Published string `json:"published,omitempty"`
 
673
 
 
674
        // SelfLink: Link to this comment resource.
 
675
        SelfLink string `json:"selfLink,omitempty"`
 
676
 
 
677
        // Updated: The time at which this comment was last updated. Formatted
 
678
        // as an RFC 3339 timestamp.
 
679
        Updated string `json:"updated,omitempty"`
 
680
 
 
681
        // Verb: This comment's verb, indicating what action was performed.
 
682
        // Possible values are:
 
683
        // - "post" - Publish content to the stream.
 
684
        Verb string `json:"verb,omitempty"`
 
685
}
 
686
 
 
687
type CommentActor struct {
 
688
        // DisplayName: The name of this actor, suitable for display.
 
689
        DisplayName string `json:"displayName,omitempty"`
 
690
 
 
691
        // Id: The ID of the actor.
 
692
        Id string `json:"id,omitempty"`
 
693
 
 
694
        // Image: The image representation of this actor.
 
695
        Image *CommentActorImage `json:"image,omitempty"`
 
696
 
 
697
        // Url: A link to the Person resource for this actor.
 
698
        Url string `json:"url,omitempty"`
 
699
}
 
700
 
 
701
type CommentActorImage struct {
 
702
        // Url: The URL of the actor's profile photo. To resize the image and
 
703
        // crop it to a square, append the query string ?sz=x, where x is the
 
704
        // dimension in pixels of each side.
 
705
        Url string `json:"url,omitempty"`
 
706
}
 
707
 
 
708
type CommentInReplyTo struct {
 
709
        // Id: The ID of the activity.
 
710
        Id string `json:"id,omitempty"`
 
711
 
 
712
        // Url: The URL of the activity.
 
713
        Url string `json:"url,omitempty"`
 
714
}
 
715
 
 
716
type CommentObject struct {
 
717
        // Content: The HTML-formatted content, suitable for display.
 
718
        Content string `json:"content,omitempty"`
 
719
 
 
720
        // ObjectType: The object type of this comment. Possible values are:
 
721
        // -
 
722
        // "comment" - A comment in reply to an activity.
 
723
        ObjectType string `json:"objectType,omitempty"`
 
724
 
 
725
        // OriginalContent: The content (text) as provided by the author, stored
 
726
        // without any HTML formatting. When creating or updating a comment,
 
727
        // this value must be supplied as plain text in the request.
 
728
        OriginalContent string `json:"originalContent,omitempty"`
 
729
}
 
730
 
 
731
type CommentPlusoners struct {
 
732
        // TotalItems: Total number of people who +1'd this comment.
 
733
        TotalItems int64 `json:"totalItems,omitempty"`
 
734
}
 
735
 
 
736
type CommentFeed struct {
 
737
        // Etag: ETag of this response for caching purposes.
 
738
        Etag string `json:"etag,omitempty"`
 
739
 
 
740
        // Id: The ID of this collection of comments.
 
741
        Id string `json:"id,omitempty"`
 
742
 
 
743
        // Items: The comments in this page of results.
 
744
        Items []*Comment `json:"items,omitempty"`
 
745
 
 
746
        // Kind: Identifies this resource as a collection of comments. Value:
 
747
        // "plus#commentFeed".
 
748
        Kind string `json:"kind,omitempty"`
 
749
 
 
750
        // NextLink: Link to the next page of activities.
 
751
        NextLink string `json:"nextLink,omitempty"`
 
752
 
 
753
        // NextPageToken: The continuation token, which is used to page through
 
754
        // large result sets. Provide this value in a subsequent request to
 
755
        // return the next page of results.
 
756
        NextPageToken string `json:"nextPageToken,omitempty"`
 
757
 
 
758
        // Title: The title of this collection of comments.
 
759
        Title string `json:"title,omitempty"`
 
760
 
 
761
        // Updated: The time at which this collection of comments was last
 
762
        // updated. Formatted as an RFC 3339 timestamp.
 
763
        Updated string `json:"updated,omitempty"`
 
764
}
 
765
 
 
766
type Media struct {
 
767
        // Author: The person who uploaded this media.
 
768
        Author *MediaAuthor `json:"author,omitempty"`
 
769
 
 
770
        // DisplayName: The display name for this media.
 
771
        DisplayName string `json:"displayName,omitempty"`
 
772
 
 
773
        // Etag: ETag of this response for caching purposes.
 
774
        Etag string `json:"etag,omitempty"`
 
775
 
 
776
        // Exif: Exif information of the media item.
 
777
        Exif *MediaExif `json:"exif,omitempty"`
 
778
 
 
779
        // Height: The height in pixels of the original image.
 
780
        Height int64 `json:"height,omitempty"`
 
781
 
 
782
        // Id: ID of this media, which is generated by the API.
 
783
        Id string `json:"id,omitempty"`
 
784
 
 
785
        // Kind: The type of resource.
 
786
        Kind string `json:"kind,omitempty"`
 
787
 
 
788
        // MediaCreatedTime: The time at which this media was originally created
 
789
        // in UTC. Formatted as an RFC 3339 timestamp that matches this example:
 
790
        // 2010-11-25T14:30:27.655Z
 
791
        MediaCreatedTime string `json:"mediaCreatedTime,omitempty"`
 
792
 
 
793
        // MediaUrl: The URL of this photo or video's still image.
 
794
        MediaUrl string `json:"mediaUrl,omitempty"`
 
795
 
 
796
        // Published: The time at which this media was uploaded. Formatted as an
 
797
        // RFC 3339 timestamp.
 
798
        Published string `json:"published,omitempty"`
 
799
 
 
800
        // SizeBytes: The size in bytes of this video.
 
801
        SizeBytes int64 `json:"sizeBytes,omitempty,string"`
 
802
 
 
803
        // Streams: The list of video streams for this video. There might be
 
804
        // several different streams available for a single video, either Flash
 
805
        // or MPEG, of various sizes
 
806
        Streams []*Videostream `json:"streams,omitempty"`
 
807
 
 
808
        // Summary: A description, or caption, for this media.
 
809
        Summary string `json:"summary,omitempty"`
 
810
 
 
811
        // Updated: The time at which this media was last updated. This includes
 
812
        // changes to media metadata. Formatted as an RFC 3339 timestamp.
 
813
        Updated string `json:"updated,omitempty"`
 
814
 
 
815
        // Url: The URL for the page that hosts this media.
 
816
        Url string `json:"url,omitempty"`
 
817
 
 
818
        // VideoDuration: The duration in milliseconds of this video.
 
819
        VideoDuration int64 `json:"videoDuration,omitempty,string"`
 
820
 
 
821
        // VideoStatus: The encoding status of this video. Possible values are:
 
822
        //
 
823
        // - "UPLOADING" - Not all the video bytes have been received.
 
824
        // -
 
825
        // "PENDING" - Video not yet processed.
 
826
        // - "FAILED" - Video processing
 
827
        // failed.
 
828
        // - "READY" - A single video stream is playable.
 
829
        // - "FINAL" -
 
830
        // All video streams are playable.
 
831
        VideoStatus string `json:"videoStatus,omitempty"`
 
832
 
 
833
        // Width: The width in pixels of the original image.
 
834
        Width int64 `json:"width,omitempty"`
 
835
}
 
836
 
 
837
type MediaAuthor struct {
 
838
        // DisplayName: The author's name.
 
839
        DisplayName string `json:"displayName,omitempty"`
 
840
 
 
841
        // Id: ID of the author.
 
842
        Id string `json:"id,omitempty"`
 
843
 
 
844
        // Image: The author's Google profile image.
 
845
        Image *MediaAuthorImage `json:"image,omitempty"`
 
846
 
 
847
        // Url: A link to the author's Google profile.
 
848
        Url string `json:"url,omitempty"`
 
849
}
 
850
 
 
851
type MediaAuthorImage struct {
 
852
        // Url: The URL of the author's profile photo. To resize the image and
 
853
        // crop it to a square, append the query string ?sz=x, where x is the
 
854
        // dimension in pixels of each side.
 
855
        Url string `json:"url,omitempty"`
 
856
}
 
857
 
 
858
type MediaExif struct {
 
859
        // Time: The time the media was captured. Formatted as an RFC 3339
 
860
        // timestamp.
 
861
        Time string `json:"time,omitempty"`
 
862
}
 
863
 
 
864
type PeopleFeed struct {
 
865
        // Etag: ETag of this response for caching purposes.
 
866
        Etag string `json:"etag,omitempty"`
 
867
 
 
868
        // Items: The people in this page of results. Each item includes the id,
 
869
        // displayName, image, and url for the person. To retrieve additional
 
870
        // profile data, see the people.get method.
 
871
        Items []*Person `json:"items,omitempty"`
 
872
 
 
873
        // Kind: Identifies this resource as a collection of people. Value:
 
874
        // "plus#peopleFeed".
 
875
        Kind string `json:"kind,omitempty"`
 
876
 
 
877
        // NextPageToken: The continuation token, which is used to page through
 
878
        // large result sets. Provide this value in a subsequent request to
 
879
        // return the next page of results.
 
880
        NextPageToken string `json:"nextPageToken,omitempty"`
 
881
 
 
882
        // SelfLink: Link to this resource.
 
883
        SelfLink string `json:"selfLink,omitempty"`
 
884
 
 
885
        // Title: The title of this collection of people.
 
886
        Title string `json:"title,omitempty"`
 
887
 
 
888
        // TotalItems: The total number of people available in this list. The
 
889
        // number of people in a response might be smaller due to paging. This
 
890
        // might not be set for all collections.
 
891
        TotalItems int64 `json:"totalItems,omitempty"`
 
892
}
 
893
 
 
894
type Person struct {
 
895
        // AboutMe: A short biography for this person.
 
896
        AboutMe string `json:"aboutMe,omitempty"`
 
897
 
 
898
        // Birthday: The person's date of birth, represented as YYYY-MM-DD.
 
899
        Birthday string `json:"birthday,omitempty"`
 
900
 
 
901
        // BraggingRights: The "bragging rights" line of this person.
 
902
        BraggingRights string `json:"braggingRights,omitempty"`
 
903
 
 
904
        // CircledByCount: For followers who are visible, the number of people
 
905
        // who have added this person or page to a circle.
 
906
        CircledByCount int64 `json:"circledByCount,omitempty"`
 
907
 
 
908
        // Cover: The cover photo content.
 
909
        Cover *PersonCover `json:"cover,omitempty"`
 
910
 
 
911
        // CurrentLocation: (this field is not currently used)
 
912
        CurrentLocation string `json:"currentLocation,omitempty"`
 
913
 
 
914
        // DisplayName: The name of this person, which is suitable for display.
 
915
        DisplayName string `json:"displayName,omitempty"`
 
916
 
 
917
        // Domain: The hosted domain name for the user's Google Apps account.
 
918
        // For instance, example.com. The plus.profile.emails.read or email
 
919
        // scope is needed to get this domain name.
 
920
        Domain string `json:"domain,omitempty"`
 
921
 
 
922
        // Emails: A list of email addresses that this person has, including
 
923
        // their Google account email address, and the public verified email
 
924
        // addresses on their Google+ profile. The plus.profile.emails.read
 
925
        // scope is needed to retrieve these email addresses, or the email scope
 
926
        // can be used to retrieve just the Google account email address.
 
927
        Emails []*PersonEmails `json:"emails,omitempty"`
 
928
 
 
929
        // Etag: ETag of this response for caching purposes.
 
930
        Etag string `json:"etag,omitempty"`
 
931
 
 
932
        // Gender: The person's gender. Possible values include, but are not
 
933
        // limited to, the following values:
 
934
        // - "male" - Male gender.
 
935
        // -
 
936
        // "female" - Female gender.
 
937
        // - "other" - Other.
 
938
        Gender string `json:"gender,omitempty"`
 
939
 
 
940
        // Id: The ID of this person.
 
941
        Id string `json:"id,omitempty"`
 
942
 
 
943
        // Image: The representation of the person's profile photo.
 
944
        Image *PersonImage `json:"image,omitempty"`
 
945
 
 
946
        // IsPlusUser: Whether this user has signed up for Google+.
 
947
        IsPlusUser bool `json:"isPlusUser,omitempty"`
 
948
 
 
949
        // Kind: Identifies this resource as a person. Value: "plus#person".
 
950
        Kind string `json:"kind,omitempty"`
 
951
 
 
952
        // Name: An object representation of the individual components of a
 
953
        // person's name.
 
954
        Name *PersonName `json:"name,omitempty"`
 
955
 
 
956
        // Nickname: The nickname of this person.
 
957
        Nickname string `json:"nickname,omitempty"`
 
958
 
 
959
        // ObjectType: Type of person within Google+. Possible values include,
 
960
        // but are not limited to, the following values:
 
961
        // - "person" -
 
962
        // represents an actual person.
 
963
        // - "page" - represents a page.
 
964
        ObjectType string `json:"objectType,omitempty"`
 
965
 
 
966
        // Occupation: The occupation of this person.
 
967
        Occupation string `json:"occupation,omitempty"`
 
968
 
 
969
        // Organizations: A list of current or past organizations with which
 
970
        // this person is associated.
 
971
        Organizations []*PersonOrganizations `json:"organizations,omitempty"`
 
972
 
 
973
        // PlacesLived: A list of places where this person has lived.
 
974
        PlacesLived []*PersonPlacesLived `json:"placesLived,omitempty"`
 
975
 
 
976
        // PlusOneCount: If a Google+ Page, the number of people who have +1'd
 
977
        // this page.
 
978
        PlusOneCount int64 `json:"plusOneCount,omitempty"`
 
979
 
 
980
        // RelationshipStatus: The person's relationship status. Possible values
 
981
        // include, but are not limited to, the following values:
 
982
        // - "single" -
 
983
        // Person is single.
 
984
        // - "in_a_relationship" - Person is in a
 
985
        // relationship.
 
986
        // - "engaged" - Person is engaged.
 
987
        // - "married" - Person
 
988
        // is married.
 
989
        // - "its_complicated" - The relationship is complicated.
 
990
        //
 
991
        // - "open_relationship" - Person is in an open relationship.
 
992
        // -
 
993
        // "widowed" - Person is widowed.
 
994
        // - "in_domestic_partnership" - Person
 
995
        // is in a domestic partnership.
 
996
        // - "in_civil_union" - Person is in a
 
997
        // civil union.
 
998
        RelationshipStatus string `json:"relationshipStatus,omitempty"`
 
999
 
 
1000
        // Skills: The person's skills.
 
1001
        Skills string `json:"skills,omitempty"`
 
1002
 
 
1003
        // Tagline: The brief description (tagline) of this person.
 
1004
        Tagline string `json:"tagline,omitempty"`
 
1005
 
 
1006
        // Url: The URL of this person's profile.
 
1007
        Url string `json:"url,omitempty"`
 
1008
 
 
1009
        // Urls: A list of URLs for this person.
 
1010
        Urls []*PersonUrls `json:"urls,omitempty"`
 
1011
 
 
1012
        // Verified: Whether the person or Google+ Page has been verified.
 
1013
        Verified bool `json:"verified,omitempty"`
 
1014
}
 
1015
 
 
1016
type PersonCover struct {
 
1017
        // CoverInfo: Extra information about the cover photo.
 
1018
        CoverInfo *PersonCoverCoverInfo `json:"coverInfo,omitempty"`
 
1019
 
 
1020
        // CoverPhoto: The person's primary cover image.
 
1021
        CoverPhoto *PersonCoverCoverPhoto `json:"coverPhoto,omitempty"`
 
1022
 
 
1023
        // Layout: The layout of the cover art. Possible values include, but are
 
1024
        // not limited to, the following values:
 
1025
        // - "banner" - One large image
 
1026
        // banner.
 
1027
        Layout string `json:"layout,omitempty"`
 
1028
}
 
1029
 
 
1030
type PersonCoverCoverInfo struct {
 
1031
        // LeftImageOffset: The difference between the left position of the
 
1032
        // cover image and the actual displayed cover image. Only valid for
 
1033
        // banner layout.
 
1034
        LeftImageOffset int64 `json:"leftImageOffset,omitempty"`
 
1035
 
 
1036
        // TopImageOffset: The difference between the top position of the cover
 
1037
        // image and the actual displayed cover image. Only valid for banner
 
1038
        // layout.
 
1039
        TopImageOffset int64 `json:"topImageOffset,omitempty"`
 
1040
}
 
1041
 
 
1042
type PersonCoverCoverPhoto struct {
 
1043
        // Height: The height of the image.
 
1044
        Height int64 `json:"height,omitempty"`
 
1045
 
 
1046
        // Url: The URL of the image.
 
1047
        Url string `json:"url,omitempty"`
 
1048
 
 
1049
        // Width: The width of the image.
 
1050
        Width int64 `json:"width,omitempty"`
 
1051
}
 
1052
 
 
1053
type PersonEmails struct {
 
1054
        // Type: The type of address. Possible values include, but are not
 
1055
        // limited to, the following values:
 
1056
        // - "account" - Google account
 
1057
        // email address.
 
1058
        // - "home" - Home email address.
 
1059
        // - "work" - Work email
 
1060
        // address.
 
1061
        // - "other" - Other.
 
1062
        Type string `json:"type,omitempty"`
 
1063
 
 
1064
        // Value: The email address.
 
1065
        Value string `json:"value,omitempty"`
 
1066
}
 
1067
 
 
1068
type PersonImage struct {
 
1069
        // IsDefault: Whether the person's profile photo is the default one
 
1070
        IsDefault bool `json:"isDefault,omitempty"`
 
1071
 
 
1072
        // Url: The URL of the person's profile photo. To resize the image and
 
1073
        // crop it to a square, append the query string ?sz=x, where x is the
 
1074
        // dimension in pixels of each side.
 
1075
        Url string `json:"url,omitempty"`
 
1076
}
 
1077
 
 
1078
type PersonName struct {
 
1079
        // FamilyName: The family name (last name) of this person.
 
1080
        FamilyName string `json:"familyName,omitempty"`
 
1081
 
 
1082
        // Formatted: The full name of this person, including middle names,
 
1083
        // suffixes, etc.
 
1084
        Formatted string `json:"formatted,omitempty"`
 
1085
 
 
1086
        // GivenName: The given name (first name) of this person.
 
1087
        GivenName string `json:"givenName,omitempty"`
 
1088
 
 
1089
        // HonorificPrefix: The honorific prefixes (such as "Dr." or "Mrs.") for
 
1090
        // this person.
 
1091
        HonorificPrefix string `json:"honorificPrefix,omitempty"`
 
1092
 
 
1093
        // HonorificSuffix: The honorific suffixes (such as "Jr.") for this
 
1094
        // person.
 
1095
        HonorificSuffix string `json:"honorificSuffix,omitempty"`
 
1096
 
 
1097
        // MiddleName: The middle name of this person.
 
1098
        MiddleName string `json:"middleName,omitempty"`
 
1099
}
 
1100
 
 
1101
type PersonOrganizations struct {
 
1102
        // Department: The department within the organization. Deprecated.
 
1103
        Department string `json:"department,omitempty"`
 
1104
 
 
1105
        // Description: A short description of the person's role in this
 
1106
        // organization. Deprecated.
 
1107
        Description string `json:"description,omitempty"`
 
1108
 
 
1109
        // EndDate: The date that the person left this organization.
 
1110
        EndDate string `json:"endDate,omitempty"`
 
1111
 
 
1112
        // Location: The location of this organization. Deprecated.
 
1113
        Location string `json:"location,omitempty"`
 
1114
 
 
1115
        // Name: The name of the organization.
 
1116
        Name string `json:"name,omitempty"`
 
1117
 
 
1118
        // Primary: If "true", indicates this organization is the person's
 
1119
        // primary one, which is typically interpreted as the current one.
 
1120
        Primary bool `json:"primary,omitempty"`
 
1121
 
 
1122
        // StartDate: The date that the person joined this organization.
 
1123
        StartDate string `json:"startDate,omitempty"`
 
1124
 
 
1125
        // Title: The person's job title or role within the organization.
 
1126
        Title string `json:"title,omitempty"`
 
1127
 
 
1128
        // Type: The type of organization. Possible values include, but are not
 
1129
        // limited to, the following values:
 
1130
        // - "work" - Work.
 
1131
        // - "school" -
 
1132
        // School.
 
1133
        Type string `json:"type,omitempty"`
 
1134
}
 
1135
 
 
1136
type PersonPlacesLived struct {
 
1137
        // Primary: If "true", this place of residence is this person's primary
 
1138
        // residence.
 
1139
        Primary bool `json:"primary,omitempty"`
 
1140
 
 
1141
        // Value: A place where this person has lived. For example: "Seattle,
 
1142
        // WA", "Near Toronto".
 
1143
        Value string `json:"value,omitempty"`
 
1144
}
 
1145
 
 
1146
type PersonUrls struct {
 
1147
        // Label: The label of the URL.
 
1148
        Label string `json:"label,omitempty"`
 
1149
 
 
1150
        // Type: The type of URL. Possible values include, but are not limited
 
1151
        // to, the following values:
 
1152
        // - "otherProfile" - URL for another
 
1153
        // profile.
 
1154
        // - "contributor" - URL to a site for which this person is a
 
1155
        // contributor.
 
1156
        // - "website" - URL for this Google+ Page's primary
 
1157
        // website.
 
1158
        // - "other" - Other URL.
 
1159
        Type string `json:"type,omitempty"`
 
1160
 
 
1161
        // Value: The URL value.
 
1162
        Value string `json:"value,omitempty"`
 
1163
}
 
1164
 
 
1165
type Place struct {
 
1166
        // Address: The physical address of the place.
 
1167
        Address *PlaceAddress `json:"address,omitempty"`
 
1168
 
 
1169
        // DisplayName: The display name of the place.
 
1170
        DisplayName string `json:"displayName,omitempty"`
 
1171
 
 
1172
        // Id: The id of the place.
 
1173
        Id string `json:"id,omitempty"`
 
1174
 
 
1175
        // Kind: Identifies this resource as a place. Value: "plus#place".
 
1176
        Kind string `json:"kind,omitempty"`
 
1177
 
 
1178
        // Position: The position of the place.
 
1179
        Position *PlacePosition `json:"position,omitempty"`
 
1180
}
 
1181
 
 
1182
type PlaceAddress struct {
 
1183
        // Formatted: The formatted address for display.
 
1184
        Formatted string `json:"formatted,omitempty"`
 
1185
}
 
1186
 
 
1187
type PlacePosition struct {
 
1188
        // Latitude: The latitude of this position.
 
1189
        Latitude float64 `json:"latitude,omitempty"`
 
1190
 
 
1191
        // Longitude: The longitude of this position.
 
1192
        Longitude float64 `json:"longitude,omitempty"`
 
1193
}
 
1194
 
 
1195
type PlusDomainsAclentryResource struct {
 
1196
        // DisplayName: A descriptive name for this entry. Suitable for display.
 
1197
        DisplayName string `json:"displayName,omitempty"`
 
1198
 
 
1199
        // Id: The ID of the entry. For entries of type "person" or "circle",
 
1200
        // this is the ID of the resource. For other types, this property is not
 
1201
        // set.
 
1202
        Id string `json:"id,omitempty"`
 
1203
 
 
1204
        // Type: The type of entry describing to whom access is granted.
 
1205
        // Possible values are:
 
1206
        // - "person" - Access to an individual.
 
1207
        // -
 
1208
        // "circle" - Access to members of a circle.
 
1209
        // - "myCircles" - Access to
 
1210
        // members of all the person's circles.
 
1211
        // - "extendedCircles" - Access to
 
1212
        // members of all the person's circles, plus all of the people in their
 
1213
        // circles.
 
1214
        // - "domain" - Access to members of the person's Google Apps
 
1215
        // domain.
 
1216
        // - "public" - Access to anyone on the web.
 
1217
        Type string `json:"type,omitempty"`
 
1218
}
 
1219
 
 
1220
type Videostream struct {
 
1221
        // Height: The height, in pixels, of the video resource.
 
1222
        Height int64 `json:"height,omitempty"`
 
1223
 
 
1224
        // Type: MIME type of the video stream.
 
1225
        Type string `json:"type,omitempty"`
 
1226
 
 
1227
        // Url: URL of the video stream.
 
1228
        Url string `json:"url,omitempty"`
 
1229
 
 
1230
        // Width: The width, in pixels, of the video resource.
 
1231
        Width int64 `json:"width,omitempty"`
 
1232
}
 
1233
 
 
1234
// method id "plusDomains.activities.get":
 
1235
 
 
1236
type ActivitiesGetCall struct {
 
1237
        s          *Service
 
1238
        activityId string
 
1239
        opt_       map[string]interface{}
 
1240
}
 
1241
 
 
1242
// Get: Get an activity.
 
1243
func (r *ActivitiesService) Get(activityId string) *ActivitiesGetCall {
 
1244
        c := &ActivitiesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1245
        c.activityId = activityId
 
1246
        return c
 
1247
}
 
1248
 
 
1249
// Fields allows partial responses to be retrieved.
 
1250
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1251
// for more information.
 
1252
func (c *ActivitiesGetCall) Fields(s ...googleapi.Field) *ActivitiesGetCall {
 
1253
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1254
        return c
 
1255
}
 
1256
 
 
1257
func (c *ActivitiesGetCall) Do() (*Activity, error) {
 
1258
        var body io.Reader = nil
 
1259
        params := make(url.Values)
 
1260
        params.Set("alt", "json")
 
1261
        if v, ok := c.opt_["fields"]; ok {
 
1262
                params.Set("fields", fmt.Sprintf("%v", v))
 
1263
        }
 
1264
        urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}")
 
1265
        urls += "?" + params.Encode()
 
1266
        req, _ := http.NewRequest("GET", urls, body)
 
1267
        googleapi.Expand(req.URL, map[string]string{
 
1268
                "activityId": c.activityId,
 
1269
        })
 
1270
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1271
        res, err := c.s.client.Do(req)
 
1272
        if err != nil {
 
1273
                return nil, err
 
1274
        }
 
1275
        defer googleapi.CloseBody(res)
 
1276
        if err := googleapi.CheckResponse(res); err != nil {
 
1277
                return nil, err
 
1278
        }
 
1279
        var ret *Activity
 
1280
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1281
                return nil, err
 
1282
        }
 
1283
        return ret, nil
 
1284
        // {
 
1285
        //   "description": "Get an activity.",
 
1286
        //   "httpMethod": "GET",
 
1287
        //   "id": "plusDomains.activities.get",
 
1288
        //   "parameterOrder": [
 
1289
        //     "activityId"
 
1290
        //   ],
 
1291
        //   "parameters": {
 
1292
        //     "activityId": {
 
1293
        //       "description": "The ID of the activity to get.",
 
1294
        //       "location": "path",
 
1295
        //       "required": true,
 
1296
        //       "type": "string"
 
1297
        //     }
 
1298
        //   },
 
1299
        //   "path": "activities/{activityId}",
 
1300
        //   "response": {
 
1301
        //     "$ref": "Activity"
 
1302
        //   },
 
1303
        //   "scopes": [
 
1304
        //     "https://www.googleapis.com/auth/plus.login",
 
1305
        //     "https://www.googleapis.com/auth/plus.me",
 
1306
        //     "https://www.googleapis.com/auth/plus.stream.read"
 
1307
        //   ]
 
1308
        // }
 
1309
 
 
1310
}
 
1311
 
 
1312
// method id "plusDomains.activities.insert":
 
1313
 
 
1314
type ActivitiesInsertCall struct {
 
1315
        s        *Service
 
1316
        userId   string
 
1317
        activity *Activity
 
1318
        opt_     map[string]interface{}
 
1319
}
 
1320
 
 
1321
// Insert: Create a new activity for the authenticated user.
 
1322
func (r *ActivitiesService) Insert(userId string, activity *Activity) *ActivitiesInsertCall {
 
1323
        c := &ActivitiesInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
1324
        c.userId = userId
 
1325
        c.activity = activity
 
1326
        return c
 
1327
}
 
1328
 
 
1329
// Preview sets the optional parameter "preview": If "true", extract the
 
1330
// potential media attachments for a URL. The response will include all
 
1331
// possible attachments for a URL, including video, photos, and articles
 
1332
// based on the content of the page.
 
1333
func (c *ActivitiesInsertCall) Preview(preview bool) *ActivitiesInsertCall {
 
1334
        c.opt_["preview"] = preview
 
1335
        return c
 
1336
}
 
1337
 
 
1338
// Fields allows partial responses to be retrieved.
 
1339
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1340
// for more information.
 
1341
func (c *ActivitiesInsertCall) Fields(s ...googleapi.Field) *ActivitiesInsertCall {
 
1342
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1343
        return c
 
1344
}
 
1345
 
 
1346
func (c *ActivitiesInsertCall) Do() (*Activity, error) {
 
1347
        var body io.Reader = nil
 
1348
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.activity)
 
1349
        if err != nil {
 
1350
                return nil, err
 
1351
        }
 
1352
        ctype := "application/json"
 
1353
        params := make(url.Values)
 
1354
        params.Set("alt", "json")
 
1355
        if v, ok := c.opt_["preview"]; ok {
 
1356
                params.Set("preview", fmt.Sprintf("%v", v))
 
1357
        }
 
1358
        if v, ok := c.opt_["fields"]; ok {
 
1359
                params.Set("fields", fmt.Sprintf("%v", v))
 
1360
        }
 
1361
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/activities")
 
1362
        urls += "?" + params.Encode()
 
1363
        req, _ := http.NewRequest("POST", urls, body)
 
1364
        googleapi.Expand(req.URL, map[string]string{
 
1365
                "userId": c.userId,
 
1366
        })
 
1367
        req.Header.Set("Content-Type", ctype)
 
1368
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1369
        res, err := c.s.client.Do(req)
 
1370
        if err != nil {
 
1371
                return nil, err
 
1372
        }
 
1373
        defer googleapi.CloseBody(res)
 
1374
        if err := googleapi.CheckResponse(res); err != nil {
 
1375
                return nil, err
 
1376
        }
 
1377
        var ret *Activity
 
1378
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1379
                return nil, err
 
1380
        }
 
1381
        return ret, nil
 
1382
        // {
 
1383
        //   "description": "Create a new activity for the authenticated user.",
 
1384
        //   "httpMethod": "POST",
 
1385
        //   "id": "plusDomains.activities.insert",
 
1386
        //   "parameterOrder": [
 
1387
        //     "userId"
 
1388
        //   ],
 
1389
        //   "parameters": {
 
1390
        //     "preview": {
 
1391
        //       "description": "If \"true\", extract the potential media attachments for a URL. The response will include all possible attachments for a URL, including video, photos, and articles based on the content of the page.",
 
1392
        //       "location": "query",
 
1393
        //       "type": "boolean"
 
1394
        //     },
 
1395
        //     "userId": {
 
1396
        //       "description": "The ID of the user to create the activity on behalf of. Its value should be \"me\", to indicate the authenticated user.",
 
1397
        //       "location": "path",
 
1398
        //       "required": true,
 
1399
        //       "type": "string"
 
1400
        //     }
 
1401
        //   },
 
1402
        //   "path": "people/{userId}/activities",
 
1403
        //   "request": {
 
1404
        //     "$ref": "Activity"
 
1405
        //   },
 
1406
        //   "response": {
 
1407
        //     "$ref": "Activity"
 
1408
        //   },
 
1409
        //   "scopes": [
 
1410
        //     "https://www.googleapis.com/auth/plus.login",
 
1411
        //     "https://www.googleapis.com/auth/plus.me",
 
1412
        //     "https://www.googleapis.com/auth/plus.stream.write"
 
1413
        //   ]
 
1414
        // }
 
1415
 
 
1416
}
 
1417
 
 
1418
// method id "plusDomains.activities.list":
 
1419
 
 
1420
type ActivitiesListCall struct {
 
1421
        s          *Service
 
1422
        userId     string
 
1423
        collection string
 
1424
        opt_       map[string]interface{}
 
1425
}
 
1426
 
 
1427
// List: List all of the activities in the specified collection for a
 
1428
// particular user.
 
1429
func (r *ActivitiesService) List(userId string, collection string) *ActivitiesListCall {
 
1430
        c := &ActivitiesListCall{s: r.s, opt_: make(map[string]interface{})}
 
1431
        c.userId = userId
 
1432
        c.collection = collection
 
1433
        return c
 
1434
}
 
1435
 
 
1436
// MaxResults sets the optional parameter "maxResults": The maximum
 
1437
// number of activities to include in the response, which is used for
 
1438
// paging. For any response, the actual number returned might be less
 
1439
// than the specified maxResults.
 
1440
func (c *ActivitiesListCall) MaxResults(maxResults int64) *ActivitiesListCall {
 
1441
        c.opt_["maxResults"] = maxResults
 
1442
        return c
 
1443
}
 
1444
 
 
1445
// PageToken sets the optional parameter "pageToken": The continuation
 
1446
// token, which is used to page through large result sets. To get the
 
1447
// next page of results, set this parameter to the value of
 
1448
// "nextPageToken" from the previous response.
 
1449
func (c *ActivitiesListCall) PageToken(pageToken string) *ActivitiesListCall {
 
1450
        c.opt_["pageToken"] = pageToken
 
1451
        return c
 
1452
}
 
1453
 
 
1454
// Fields allows partial responses to be retrieved.
 
1455
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1456
// for more information.
 
1457
func (c *ActivitiesListCall) Fields(s ...googleapi.Field) *ActivitiesListCall {
 
1458
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1459
        return c
 
1460
}
 
1461
 
 
1462
func (c *ActivitiesListCall) Do() (*ActivityFeed, error) {
 
1463
        var body io.Reader = nil
 
1464
        params := make(url.Values)
 
1465
        params.Set("alt", "json")
 
1466
        if v, ok := c.opt_["maxResults"]; ok {
 
1467
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1468
        }
 
1469
        if v, ok := c.opt_["pageToken"]; ok {
 
1470
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1471
        }
 
1472
        if v, ok := c.opt_["fields"]; ok {
 
1473
                params.Set("fields", fmt.Sprintf("%v", v))
 
1474
        }
 
1475
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/activities/{collection}")
 
1476
        urls += "?" + params.Encode()
 
1477
        req, _ := http.NewRequest("GET", urls, body)
 
1478
        googleapi.Expand(req.URL, map[string]string{
 
1479
                "userId":     c.userId,
 
1480
                "collection": c.collection,
 
1481
        })
 
1482
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1483
        res, err := c.s.client.Do(req)
 
1484
        if err != nil {
 
1485
                return nil, err
 
1486
        }
 
1487
        defer googleapi.CloseBody(res)
 
1488
        if err := googleapi.CheckResponse(res); err != nil {
 
1489
                return nil, err
 
1490
        }
 
1491
        var ret *ActivityFeed
 
1492
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1493
                return nil, err
 
1494
        }
 
1495
        return ret, nil
 
1496
        // {
 
1497
        //   "description": "List all of the activities in the specified collection for a particular user.",
 
1498
        //   "httpMethod": "GET",
 
1499
        //   "id": "plusDomains.activities.list",
 
1500
        //   "parameterOrder": [
 
1501
        //     "userId",
 
1502
        //     "collection"
 
1503
        //   ],
 
1504
        //   "parameters": {
 
1505
        //     "collection": {
 
1506
        //       "description": "The collection of activities to list.",
 
1507
        //       "enum": [
 
1508
        //         "user"
 
1509
        //       ],
 
1510
        //       "enumDescriptions": [
 
1511
        //         "All activities created by the specified user that the authenticated user is authorized to view."
 
1512
        //       ],
 
1513
        //       "location": "path",
 
1514
        //       "required": true,
 
1515
        //       "type": "string"
 
1516
        //     },
 
1517
        //     "maxResults": {
 
1518
        //       "default": "20",
 
1519
        //       "description": "The maximum number of activities to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
1520
        //       "format": "uint32",
 
1521
        //       "location": "query",
 
1522
        //       "maximum": "100",
 
1523
        //       "minimum": "1",
 
1524
        //       "type": "integer"
 
1525
        //     },
 
1526
        //     "pageToken": {
 
1527
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
1528
        //       "location": "query",
 
1529
        //       "type": "string"
 
1530
        //     },
 
1531
        //     "userId": {
 
1532
        //       "description": "The ID of the user to get activities for. The special value \"me\" can be used to indicate the authenticated user.",
 
1533
        //       "location": "path",
 
1534
        //       "required": true,
 
1535
        //       "type": "string"
 
1536
        //     }
 
1537
        //   },
 
1538
        //   "path": "people/{userId}/activities/{collection}",
 
1539
        //   "response": {
 
1540
        //     "$ref": "ActivityFeed"
 
1541
        //   },
 
1542
        //   "scopes": [
 
1543
        //     "https://www.googleapis.com/auth/plus.login",
 
1544
        //     "https://www.googleapis.com/auth/plus.me",
 
1545
        //     "https://www.googleapis.com/auth/plus.stream.read"
 
1546
        //   ]
 
1547
        // }
 
1548
 
 
1549
}
 
1550
 
 
1551
// method id "plusDomains.audiences.list":
 
1552
 
 
1553
type AudiencesListCall struct {
 
1554
        s      *Service
 
1555
        userId string
 
1556
        opt_   map[string]interface{}
 
1557
}
 
1558
 
 
1559
// List: List all of the audiences to which a user can share.
 
1560
func (r *AudiencesService) List(userId string) *AudiencesListCall {
 
1561
        c := &AudiencesListCall{s: r.s, opt_: make(map[string]interface{})}
 
1562
        c.userId = userId
 
1563
        return c
 
1564
}
 
1565
 
 
1566
// MaxResults sets the optional parameter "maxResults": The maximum
 
1567
// number of circles to include in the response, which is used for
 
1568
// paging. For any response, the actual number returned might be less
 
1569
// than the specified maxResults.
 
1570
func (c *AudiencesListCall) MaxResults(maxResults int64) *AudiencesListCall {
 
1571
        c.opt_["maxResults"] = maxResults
 
1572
        return c
 
1573
}
 
1574
 
 
1575
// PageToken sets the optional parameter "pageToken": The continuation
 
1576
// token, which is used to page through large result sets. To get the
 
1577
// next page of results, set this parameter to the value of
 
1578
// "nextPageToken" from the previous response.
 
1579
func (c *AudiencesListCall) PageToken(pageToken string) *AudiencesListCall {
 
1580
        c.opt_["pageToken"] = pageToken
 
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 *AudiencesListCall) Fields(s ...googleapi.Field) *AudiencesListCall {
 
1588
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1589
        return c
 
1590
}
 
1591
 
 
1592
func (c *AudiencesListCall) Do() (*AudiencesFeed, error) {
 
1593
        var body io.Reader = nil
 
1594
        params := make(url.Values)
 
1595
        params.Set("alt", "json")
 
1596
        if v, ok := c.opt_["maxResults"]; ok {
 
1597
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1598
        }
 
1599
        if v, ok := c.opt_["pageToken"]; ok {
 
1600
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1601
        }
 
1602
        if v, ok := c.opt_["fields"]; ok {
 
1603
                params.Set("fields", fmt.Sprintf("%v", v))
 
1604
        }
 
1605
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/audiences")
 
1606
        urls += "?" + params.Encode()
 
1607
        req, _ := http.NewRequest("GET", urls, body)
 
1608
        googleapi.Expand(req.URL, map[string]string{
 
1609
                "userId": c.userId,
 
1610
        })
 
1611
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1612
        res, err := c.s.client.Do(req)
 
1613
        if err != nil {
 
1614
                return nil, err
 
1615
        }
 
1616
        defer googleapi.CloseBody(res)
 
1617
        if err := googleapi.CheckResponse(res); err != nil {
 
1618
                return nil, err
 
1619
        }
 
1620
        var ret *AudiencesFeed
 
1621
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1622
                return nil, err
 
1623
        }
 
1624
        return ret, nil
 
1625
        // {
 
1626
        //   "description": "List all of the audiences to which a user can share.",
 
1627
        //   "httpMethod": "GET",
 
1628
        //   "id": "plusDomains.audiences.list",
 
1629
        //   "parameterOrder": [
 
1630
        //     "userId"
 
1631
        //   ],
 
1632
        //   "parameters": {
 
1633
        //     "maxResults": {
 
1634
        //       "default": "20",
 
1635
        //       "description": "The maximum number of circles to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
1636
        //       "format": "uint32",
 
1637
        //       "location": "query",
 
1638
        //       "maximum": "100",
 
1639
        //       "minimum": "1",
 
1640
        //       "type": "integer"
 
1641
        //     },
 
1642
        //     "pageToken": {
 
1643
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
1644
        //       "location": "query",
 
1645
        //       "type": "string"
 
1646
        //     },
 
1647
        //     "userId": {
 
1648
        //       "description": "The ID of the user to get audiences for. The special value \"me\" can be used to indicate the authenticated user.",
 
1649
        //       "location": "path",
 
1650
        //       "required": true,
 
1651
        //       "type": "string"
 
1652
        //     }
 
1653
        //   },
 
1654
        //   "path": "people/{userId}/audiences",
 
1655
        //   "response": {
 
1656
        //     "$ref": "AudiencesFeed"
 
1657
        //   },
 
1658
        //   "scopes": [
 
1659
        //     "https://www.googleapis.com/auth/plus.circles.read",
 
1660
        //     "https://www.googleapis.com/auth/plus.login",
 
1661
        //     "https://www.googleapis.com/auth/plus.me"
 
1662
        //   ]
 
1663
        // }
 
1664
 
 
1665
}
 
1666
 
 
1667
// method id "plusDomains.circles.addPeople":
 
1668
 
 
1669
type CirclesAddPeopleCall struct {
 
1670
        s        *Service
 
1671
        circleId string
 
1672
        opt_     map[string]interface{}
 
1673
}
 
1674
 
 
1675
// AddPeople: Add a person to a circle. Google+ limits certain circle
 
1676
// operations, including the number of circle adds. Learn More.
 
1677
func (r *CirclesService) AddPeople(circleId string) *CirclesAddPeopleCall {
 
1678
        c := &CirclesAddPeopleCall{s: r.s, opt_: make(map[string]interface{})}
 
1679
        c.circleId = circleId
 
1680
        return c
 
1681
}
 
1682
 
 
1683
// Email sets the optional parameter "email": Email of the people to add
 
1684
// to the circle. Optional, can be repeated.
 
1685
func (c *CirclesAddPeopleCall) Email(email string) *CirclesAddPeopleCall {
 
1686
        c.opt_["email"] = email
 
1687
        return c
 
1688
}
 
1689
 
 
1690
// UserId sets the optional parameter "userId": IDs of the people to add
 
1691
// to the circle. Optional, can be repeated.
 
1692
func (c *CirclesAddPeopleCall) UserId(userId string) *CirclesAddPeopleCall {
 
1693
        c.opt_["userId"] = userId
 
1694
        return c
 
1695
}
 
1696
 
 
1697
// Fields allows partial responses to be retrieved.
 
1698
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1699
// for more information.
 
1700
func (c *CirclesAddPeopleCall) Fields(s ...googleapi.Field) *CirclesAddPeopleCall {
 
1701
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1702
        return c
 
1703
}
 
1704
 
 
1705
func (c *CirclesAddPeopleCall) Do() (*Circle, error) {
 
1706
        var body io.Reader = nil
 
1707
        params := make(url.Values)
 
1708
        params.Set("alt", "json")
 
1709
        if v, ok := c.opt_["email"]; ok {
 
1710
                params.Set("email", fmt.Sprintf("%v", v))
 
1711
        }
 
1712
        if v, ok := c.opt_["userId"]; ok {
 
1713
                params.Set("userId", fmt.Sprintf("%v", v))
 
1714
        }
 
1715
        if v, ok := c.opt_["fields"]; ok {
 
1716
                params.Set("fields", fmt.Sprintf("%v", v))
 
1717
        }
 
1718
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}/people")
 
1719
        urls += "?" + params.Encode()
 
1720
        req, _ := http.NewRequest("PUT", urls, body)
 
1721
        googleapi.Expand(req.URL, map[string]string{
 
1722
                "circleId": c.circleId,
 
1723
        })
 
1724
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1725
        res, err := c.s.client.Do(req)
 
1726
        if err != nil {
 
1727
                return nil, err
 
1728
        }
 
1729
        defer googleapi.CloseBody(res)
 
1730
        if err := googleapi.CheckResponse(res); err != nil {
 
1731
                return nil, err
 
1732
        }
 
1733
        var ret *Circle
 
1734
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1735
                return nil, err
 
1736
        }
 
1737
        return ret, nil
 
1738
        // {
 
1739
        //   "description": "Add a person to a circle. Google+ limits certain circle operations, including the number of circle adds. Learn More.",
 
1740
        //   "httpMethod": "PUT",
 
1741
        //   "id": "plusDomains.circles.addPeople",
 
1742
        //   "parameterOrder": [
 
1743
        //     "circleId"
 
1744
        //   ],
 
1745
        //   "parameters": {
 
1746
        //     "circleId": {
 
1747
        //       "description": "The ID of the circle to add the person to.",
 
1748
        //       "location": "path",
 
1749
        //       "required": true,
 
1750
        //       "type": "string"
 
1751
        //     },
 
1752
        //     "email": {
 
1753
        //       "description": "Email of the people to add to the circle. Optional, can be repeated.",
 
1754
        //       "location": "query",
 
1755
        //       "repeated": true,
 
1756
        //       "type": "string"
 
1757
        //     },
 
1758
        //     "userId": {
 
1759
        //       "description": "IDs of the people to add to the circle. Optional, can be repeated.",
 
1760
        //       "location": "query",
 
1761
        //       "repeated": true,
 
1762
        //       "type": "string"
 
1763
        //     }
 
1764
        //   },
 
1765
        //   "path": "circles/{circleId}/people",
 
1766
        //   "response": {
 
1767
        //     "$ref": "Circle"
 
1768
        //   },
 
1769
        //   "scopes": [
 
1770
        //     "https://www.googleapis.com/auth/plus.circles.write",
 
1771
        //     "https://www.googleapis.com/auth/plus.login"
 
1772
        //   ]
 
1773
        // }
 
1774
 
 
1775
}
 
1776
 
 
1777
// method id "plusDomains.circles.get":
 
1778
 
 
1779
type CirclesGetCall struct {
 
1780
        s        *Service
 
1781
        circleId string
 
1782
        opt_     map[string]interface{}
 
1783
}
 
1784
 
 
1785
// Get: Get a circle.
 
1786
func (r *CirclesService) Get(circleId string) *CirclesGetCall {
 
1787
        c := &CirclesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1788
        c.circleId = circleId
 
1789
        return c
 
1790
}
 
1791
 
 
1792
// Fields allows partial responses to be retrieved.
 
1793
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1794
// for more information.
 
1795
func (c *CirclesGetCall) Fields(s ...googleapi.Field) *CirclesGetCall {
 
1796
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1797
        return c
 
1798
}
 
1799
 
 
1800
func (c *CirclesGetCall) Do() (*Circle, error) {
 
1801
        var body io.Reader = nil
 
1802
        params := make(url.Values)
 
1803
        params.Set("alt", "json")
 
1804
        if v, ok := c.opt_["fields"]; ok {
 
1805
                params.Set("fields", fmt.Sprintf("%v", v))
 
1806
        }
 
1807
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
 
1808
        urls += "?" + params.Encode()
 
1809
        req, _ := http.NewRequest("GET", urls, body)
 
1810
        googleapi.Expand(req.URL, map[string]string{
 
1811
                "circleId": c.circleId,
 
1812
        })
 
1813
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1814
        res, err := c.s.client.Do(req)
 
1815
        if err != nil {
 
1816
                return nil, err
 
1817
        }
 
1818
        defer googleapi.CloseBody(res)
 
1819
        if err := googleapi.CheckResponse(res); err != nil {
 
1820
                return nil, err
 
1821
        }
 
1822
        var ret *Circle
 
1823
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1824
                return nil, err
 
1825
        }
 
1826
        return ret, nil
 
1827
        // {
 
1828
        //   "description": "Get a circle.",
 
1829
        //   "httpMethod": "GET",
 
1830
        //   "id": "plusDomains.circles.get",
 
1831
        //   "parameterOrder": [
 
1832
        //     "circleId"
 
1833
        //   ],
 
1834
        //   "parameters": {
 
1835
        //     "circleId": {
 
1836
        //       "description": "The ID of the circle to get.",
 
1837
        //       "location": "path",
 
1838
        //       "required": true,
 
1839
        //       "type": "string"
 
1840
        //     }
 
1841
        //   },
 
1842
        //   "path": "circles/{circleId}",
 
1843
        //   "response": {
 
1844
        //     "$ref": "Circle"
 
1845
        //   },
 
1846
        //   "scopes": [
 
1847
        //     "https://www.googleapis.com/auth/plus.circles.read",
 
1848
        //     "https://www.googleapis.com/auth/plus.login"
 
1849
        //   ]
 
1850
        // }
 
1851
 
 
1852
}
 
1853
 
 
1854
// method id "plusDomains.circles.insert":
 
1855
 
 
1856
type CirclesInsertCall struct {
 
1857
        s      *Service
 
1858
        userId string
 
1859
        circle *Circle
 
1860
        opt_   map[string]interface{}
 
1861
}
 
1862
 
 
1863
// Insert: Create a new circle for the authenticated user.
 
1864
func (r *CirclesService) Insert(userId string, circle *Circle) *CirclesInsertCall {
 
1865
        c := &CirclesInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
1866
        c.userId = userId
 
1867
        c.circle = circle
 
1868
        return c
 
1869
}
 
1870
 
 
1871
// Fields allows partial responses to be retrieved.
 
1872
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1873
// for more information.
 
1874
func (c *CirclesInsertCall) Fields(s ...googleapi.Field) *CirclesInsertCall {
 
1875
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1876
        return c
 
1877
}
 
1878
 
 
1879
func (c *CirclesInsertCall) Do() (*Circle, error) {
 
1880
        var body io.Reader = nil
 
1881
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
 
1882
        if err != nil {
 
1883
                return nil, err
 
1884
        }
 
1885
        ctype := "application/json"
 
1886
        params := make(url.Values)
 
1887
        params.Set("alt", "json")
 
1888
        if v, ok := c.opt_["fields"]; ok {
 
1889
                params.Set("fields", fmt.Sprintf("%v", v))
 
1890
        }
 
1891
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/circles")
 
1892
        urls += "?" + params.Encode()
 
1893
        req, _ := http.NewRequest("POST", urls, body)
 
1894
        googleapi.Expand(req.URL, map[string]string{
 
1895
                "userId": c.userId,
 
1896
        })
 
1897
        req.Header.Set("Content-Type", ctype)
 
1898
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1899
        res, err := c.s.client.Do(req)
 
1900
        if err != nil {
 
1901
                return nil, err
 
1902
        }
 
1903
        defer googleapi.CloseBody(res)
 
1904
        if err := googleapi.CheckResponse(res); err != nil {
 
1905
                return nil, err
 
1906
        }
 
1907
        var ret *Circle
 
1908
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1909
                return nil, err
 
1910
        }
 
1911
        return ret, nil
 
1912
        // {
 
1913
        //   "description": "Create a new circle for the authenticated user.",
 
1914
        //   "httpMethod": "POST",
 
1915
        //   "id": "plusDomains.circles.insert",
 
1916
        //   "parameterOrder": [
 
1917
        //     "userId"
 
1918
        //   ],
 
1919
        //   "parameters": {
 
1920
        //     "userId": {
 
1921
        //       "description": "The ID of the user to create the circle on behalf of. The value \"me\" can be used to indicate the authenticated user.",
 
1922
        //       "location": "path",
 
1923
        //       "required": true,
 
1924
        //       "type": "string"
 
1925
        //     }
 
1926
        //   },
 
1927
        //   "path": "people/{userId}/circles",
 
1928
        //   "request": {
 
1929
        //     "$ref": "Circle"
 
1930
        //   },
 
1931
        //   "response": {
 
1932
        //     "$ref": "Circle"
 
1933
        //   },
 
1934
        //   "scopes": [
 
1935
        //     "https://www.googleapis.com/auth/plus.circles.write",
 
1936
        //     "https://www.googleapis.com/auth/plus.login",
 
1937
        //     "https://www.googleapis.com/auth/plus.me"
 
1938
        //   ]
 
1939
        // }
 
1940
 
 
1941
}
 
1942
 
 
1943
// method id "plusDomains.circles.list":
 
1944
 
 
1945
type CirclesListCall struct {
 
1946
        s      *Service
 
1947
        userId string
 
1948
        opt_   map[string]interface{}
 
1949
}
 
1950
 
 
1951
// List: List all of the circles for a user.
 
1952
func (r *CirclesService) List(userId string) *CirclesListCall {
 
1953
        c := &CirclesListCall{s: r.s, opt_: make(map[string]interface{})}
 
1954
        c.userId = userId
 
1955
        return c
 
1956
}
 
1957
 
 
1958
// MaxResults sets the optional parameter "maxResults": The maximum
 
1959
// number of circles to include in the response, which is used for
 
1960
// paging. For any response, the actual number returned might be less
 
1961
// than the specified maxResults.
 
1962
func (c *CirclesListCall) MaxResults(maxResults int64) *CirclesListCall {
 
1963
        c.opt_["maxResults"] = maxResults
 
1964
        return c
 
1965
}
 
1966
 
 
1967
// PageToken sets the optional parameter "pageToken": The continuation
 
1968
// token, which is used to page through large result sets. To get the
 
1969
// next page of results, set this parameter to the value of
 
1970
// "nextPageToken" from the previous response.
 
1971
func (c *CirclesListCall) PageToken(pageToken string) *CirclesListCall {
 
1972
        c.opt_["pageToken"] = pageToken
 
1973
        return c
 
1974
}
 
1975
 
 
1976
// Fields allows partial responses to be retrieved.
 
1977
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1978
// for more information.
 
1979
func (c *CirclesListCall) Fields(s ...googleapi.Field) *CirclesListCall {
 
1980
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1981
        return c
 
1982
}
 
1983
 
 
1984
func (c *CirclesListCall) Do() (*CircleFeed, error) {
 
1985
        var body io.Reader = nil
 
1986
        params := make(url.Values)
 
1987
        params.Set("alt", "json")
 
1988
        if v, ok := c.opt_["maxResults"]; ok {
 
1989
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1990
        }
 
1991
        if v, ok := c.opt_["pageToken"]; ok {
 
1992
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1993
        }
 
1994
        if v, ok := c.opt_["fields"]; ok {
 
1995
                params.Set("fields", fmt.Sprintf("%v", v))
 
1996
        }
 
1997
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/circles")
 
1998
        urls += "?" + params.Encode()
 
1999
        req, _ := http.NewRequest("GET", urls, body)
 
2000
        googleapi.Expand(req.URL, map[string]string{
 
2001
                "userId": c.userId,
 
2002
        })
 
2003
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2004
        res, err := c.s.client.Do(req)
 
2005
        if err != nil {
 
2006
                return nil, err
 
2007
        }
 
2008
        defer googleapi.CloseBody(res)
 
2009
        if err := googleapi.CheckResponse(res); err != nil {
 
2010
                return nil, err
 
2011
        }
 
2012
        var ret *CircleFeed
 
2013
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2014
                return nil, err
 
2015
        }
 
2016
        return ret, nil
 
2017
        // {
 
2018
        //   "description": "List all of the circles for a user.",
 
2019
        //   "httpMethod": "GET",
 
2020
        //   "id": "plusDomains.circles.list",
 
2021
        //   "parameterOrder": [
 
2022
        //     "userId"
 
2023
        //   ],
 
2024
        //   "parameters": {
 
2025
        //     "maxResults": {
 
2026
        //       "default": "20",
 
2027
        //       "description": "The maximum number of circles to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
2028
        //       "format": "uint32",
 
2029
        //       "location": "query",
 
2030
        //       "maximum": "100",
 
2031
        //       "minimum": "1",
 
2032
        //       "type": "integer"
 
2033
        //     },
 
2034
        //     "pageToken": {
 
2035
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
2036
        //       "location": "query",
 
2037
        //       "type": "string"
 
2038
        //     },
 
2039
        //     "userId": {
 
2040
        //       "description": "The ID of the user to get circles for. The special value \"me\" can be used to indicate the authenticated user.",
 
2041
        //       "location": "path",
 
2042
        //       "required": true,
 
2043
        //       "type": "string"
 
2044
        //     }
 
2045
        //   },
 
2046
        //   "path": "people/{userId}/circles",
 
2047
        //   "response": {
 
2048
        //     "$ref": "CircleFeed"
 
2049
        //   },
 
2050
        //   "scopes": [
 
2051
        //     "https://www.googleapis.com/auth/plus.circles.read",
 
2052
        //     "https://www.googleapis.com/auth/plus.login",
 
2053
        //     "https://www.googleapis.com/auth/plus.me"
 
2054
        //   ]
 
2055
        // }
 
2056
 
 
2057
}
 
2058
 
 
2059
// method id "plusDomains.circles.patch":
 
2060
 
 
2061
type CirclesPatchCall struct {
 
2062
        s        *Service
 
2063
        circleId string
 
2064
        circle   *Circle
 
2065
        opt_     map[string]interface{}
 
2066
}
 
2067
 
 
2068
// Patch: Update a circle's description. This method supports patch
 
2069
// semantics.
 
2070
func (r *CirclesService) Patch(circleId string, circle *Circle) *CirclesPatchCall {
 
2071
        c := &CirclesPatchCall{s: r.s, opt_: make(map[string]interface{})}
 
2072
        c.circleId = circleId
 
2073
        c.circle = circle
 
2074
        return c
 
2075
}
 
2076
 
 
2077
// Fields allows partial responses to be retrieved.
 
2078
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2079
// for more information.
 
2080
func (c *CirclesPatchCall) Fields(s ...googleapi.Field) *CirclesPatchCall {
 
2081
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2082
        return c
 
2083
}
 
2084
 
 
2085
func (c *CirclesPatchCall) Do() (*Circle, error) {
 
2086
        var body io.Reader = nil
 
2087
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
 
2088
        if err != nil {
 
2089
                return nil, err
 
2090
        }
 
2091
        ctype := "application/json"
 
2092
        params := make(url.Values)
 
2093
        params.Set("alt", "json")
 
2094
        if v, ok := c.opt_["fields"]; ok {
 
2095
                params.Set("fields", fmt.Sprintf("%v", v))
 
2096
        }
 
2097
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
 
2098
        urls += "?" + params.Encode()
 
2099
        req, _ := http.NewRequest("PATCH", urls, body)
 
2100
        googleapi.Expand(req.URL, map[string]string{
 
2101
                "circleId": c.circleId,
 
2102
        })
 
2103
        req.Header.Set("Content-Type", ctype)
 
2104
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2105
        res, err := c.s.client.Do(req)
 
2106
        if err != nil {
 
2107
                return nil, err
 
2108
        }
 
2109
        defer googleapi.CloseBody(res)
 
2110
        if err := googleapi.CheckResponse(res); err != nil {
 
2111
                return nil, err
 
2112
        }
 
2113
        var ret *Circle
 
2114
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2115
                return nil, err
 
2116
        }
 
2117
        return ret, nil
 
2118
        // {
 
2119
        //   "description": "Update a circle's description. This method supports patch semantics.",
 
2120
        //   "httpMethod": "PATCH",
 
2121
        //   "id": "plusDomains.circles.patch",
 
2122
        //   "parameterOrder": [
 
2123
        //     "circleId"
 
2124
        //   ],
 
2125
        //   "parameters": {
 
2126
        //     "circleId": {
 
2127
        //       "description": "The ID of the circle to update.",
 
2128
        //       "location": "path",
 
2129
        //       "required": true,
 
2130
        //       "type": "string"
 
2131
        //     }
 
2132
        //   },
 
2133
        //   "path": "circles/{circleId}",
 
2134
        //   "request": {
 
2135
        //     "$ref": "Circle"
 
2136
        //   },
 
2137
        //   "response": {
 
2138
        //     "$ref": "Circle"
 
2139
        //   },
 
2140
        //   "scopes": [
 
2141
        //     "https://www.googleapis.com/auth/plus.circles.write",
 
2142
        //     "https://www.googleapis.com/auth/plus.login"
 
2143
        //   ]
 
2144
        // }
 
2145
 
 
2146
}
 
2147
 
 
2148
// method id "plusDomains.circles.remove":
 
2149
 
 
2150
type CirclesRemoveCall struct {
 
2151
        s        *Service
 
2152
        circleId string
 
2153
        opt_     map[string]interface{}
 
2154
}
 
2155
 
 
2156
// Remove: Delete a circle.
 
2157
func (r *CirclesService) Remove(circleId string) *CirclesRemoveCall {
 
2158
        c := &CirclesRemoveCall{s: r.s, opt_: make(map[string]interface{})}
 
2159
        c.circleId = circleId
 
2160
        return c
 
2161
}
 
2162
 
 
2163
// Fields allows partial responses to be retrieved.
 
2164
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2165
// for more information.
 
2166
func (c *CirclesRemoveCall) Fields(s ...googleapi.Field) *CirclesRemoveCall {
 
2167
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2168
        return c
 
2169
}
 
2170
 
 
2171
func (c *CirclesRemoveCall) Do() error {
 
2172
        var body io.Reader = nil
 
2173
        params := make(url.Values)
 
2174
        params.Set("alt", "json")
 
2175
        if v, ok := c.opt_["fields"]; ok {
 
2176
                params.Set("fields", fmt.Sprintf("%v", v))
 
2177
        }
 
2178
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
 
2179
        urls += "?" + params.Encode()
 
2180
        req, _ := http.NewRequest("DELETE", urls, body)
 
2181
        googleapi.Expand(req.URL, map[string]string{
 
2182
                "circleId": c.circleId,
 
2183
        })
 
2184
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2185
        res, err := c.s.client.Do(req)
 
2186
        if err != nil {
 
2187
                return err
 
2188
        }
 
2189
        defer googleapi.CloseBody(res)
 
2190
        if err := googleapi.CheckResponse(res); err != nil {
 
2191
                return err
 
2192
        }
 
2193
        return nil
 
2194
        // {
 
2195
        //   "description": "Delete a circle.",
 
2196
        //   "httpMethod": "DELETE",
 
2197
        //   "id": "plusDomains.circles.remove",
 
2198
        //   "parameterOrder": [
 
2199
        //     "circleId"
 
2200
        //   ],
 
2201
        //   "parameters": {
 
2202
        //     "circleId": {
 
2203
        //       "description": "The ID of the circle to delete.",
 
2204
        //       "location": "path",
 
2205
        //       "required": true,
 
2206
        //       "type": "string"
 
2207
        //     }
 
2208
        //   },
 
2209
        //   "path": "circles/{circleId}",
 
2210
        //   "scopes": [
 
2211
        //     "https://www.googleapis.com/auth/plus.circles.write",
 
2212
        //     "https://www.googleapis.com/auth/plus.login"
 
2213
        //   ]
 
2214
        // }
 
2215
 
 
2216
}
 
2217
 
 
2218
// method id "plusDomains.circles.removePeople":
 
2219
 
 
2220
type CirclesRemovePeopleCall struct {
 
2221
        s        *Service
 
2222
        circleId string
 
2223
        opt_     map[string]interface{}
 
2224
}
 
2225
 
 
2226
// RemovePeople: Remove a person from a circle.
 
2227
func (r *CirclesService) RemovePeople(circleId string) *CirclesRemovePeopleCall {
 
2228
        c := &CirclesRemovePeopleCall{s: r.s, opt_: make(map[string]interface{})}
 
2229
        c.circleId = circleId
 
2230
        return c
 
2231
}
 
2232
 
 
2233
// Email sets the optional parameter "email": Email of the people to add
 
2234
// to the circle. Optional, can be repeated.
 
2235
func (c *CirclesRemovePeopleCall) Email(email string) *CirclesRemovePeopleCall {
 
2236
        c.opt_["email"] = email
 
2237
        return c
 
2238
}
 
2239
 
 
2240
// UserId sets the optional parameter "userId": IDs of the people to
 
2241
// remove from the circle. Optional, can be repeated.
 
2242
func (c *CirclesRemovePeopleCall) UserId(userId string) *CirclesRemovePeopleCall {
 
2243
        c.opt_["userId"] = userId
 
2244
        return c
 
2245
}
 
2246
 
 
2247
// Fields allows partial responses to be retrieved.
 
2248
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2249
// for more information.
 
2250
func (c *CirclesRemovePeopleCall) Fields(s ...googleapi.Field) *CirclesRemovePeopleCall {
 
2251
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2252
        return c
 
2253
}
 
2254
 
 
2255
func (c *CirclesRemovePeopleCall) Do() error {
 
2256
        var body io.Reader = nil
 
2257
        params := make(url.Values)
 
2258
        params.Set("alt", "json")
 
2259
        if v, ok := c.opt_["email"]; ok {
 
2260
                params.Set("email", fmt.Sprintf("%v", v))
 
2261
        }
 
2262
        if v, ok := c.opt_["userId"]; ok {
 
2263
                params.Set("userId", fmt.Sprintf("%v", v))
 
2264
        }
 
2265
        if v, ok := c.opt_["fields"]; ok {
 
2266
                params.Set("fields", fmt.Sprintf("%v", v))
 
2267
        }
 
2268
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}/people")
 
2269
        urls += "?" + params.Encode()
 
2270
        req, _ := http.NewRequest("DELETE", urls, body)
 
2271
        googleapi.Expand(req.URL, map[string]string{
 
2272
                "circleId": c.circleId,
 
2273
        })
 
2274
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2275
        res, err := c.s.client.Do(req)
 
2276
        if err != nil {
 
2277
                return err
 
2278
        }
 
2279
        defer googleapi.CloseBody(res)
 
2280
        if err := googleapi.CheckResponse(res); err != nil {
 
2281
                return err
 
2282
        }
 
2283
        return nil
 
2284
        // {
 
2285
        //   "description": "Remove a person from a circle.",
 
2286
        //   "httpMethod": "DELETE",
 
2287
        //   "id": "plusDomains.circles.removePeople",
 
2288
        //   "parameterOrder": [
 
2289
        //     "circleId"
 
2290
        //   ],
 
2291
        //   "parameters": {
 
2292
        //     "circleId": {
 
2293
        //       "description": "The ID of the circle to remove the person from.",
 
2294
        //       "location": "path",
 
2295
        //       "required": true,
 
2296
        //       "type": "string"
 
2297
        //     },
 
2298
        //     "email": {
 
2299
        //       "description": "Email of the people to add to the circle. Optional, can be repeated.",
 
2300
        //       "location": "query",
 
2301
        //       "repeated": true,
 
2302
        //       "type": "string"
 
2303
        //     },
 
2304
        //     "userId": {
 
2305
        //       "description": "IDs of the people to remove from the circle. Optional, can be repeated.",
 
2306
        //       "location": "query",
 
2307
        //       "repeated": true,
 
2308
        //       "type": "string"
 
2309
        //     }
 
2310
        //   },
 
2311
        //   "path": "circles/{circleId}/people",
 
2312
        //   "scopes": [
 
2313
        //     "https://www.googleapis.com/auth/plus.circles.write",
 
2314
        //     "https://www.googleapis.com/auth/plus.login"
 
2315
        //   ]
 
2316
        // }
 
2317
 
 
2318
}
 
2319
 
 
2320
// method id "plusDomains.circles.update":
 
2321
 
 
2322
type CirclesUpdateCall struct {
 
2323
        s        *Service
 
2324
        circleId string
 
2325
        circle   *Circle
 
2326
        opt_     map[string]interface{}
 
2327
}
 
2328
 
 
2329
// Update: Update a circle's description.
 
2330
func (r *CirclesService) Update(circleId string, circle *Circle) *CirclesUpdateCall {
 
2331
        c := &CirclesUpdateCall{s: r.s, opt_: make(map[string]interface{})}
 
2332
        c.circleId = circleId
 
2333
        c.circle = circle
 
2334
        return c
 
2335
}
 
2336
 
 
2337
// Fields allows partial responses to be retrieved.
 
2338
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2339
// for more information.
 
2340
func (c *CirclesUpdateCall) Fields(s ...googleapi.Field) *CirclesUpdateCall {
 
2341
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2342
        return c
 
2343
}
 
2344
 
 
2345
func (c *CirclesUpdateCall) Do() (*Circle, error) {
 
2346
        var body io.Reader = nil
 
2347
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
 
2348
        if err != nil {
 
2349
                return nil, err
 
2350
        }
 
2351
        ctype := "application/json"
 
2352
        params := make(url.Values)
 
2353
        params.Set("alt", "json")
 
2354
        if v, ok := c.opt_["fields"]; ok {
 
2355
                params.Set("fields", fmt.Sprintf("%v", v))
 
2356
        }
 
2357
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}")
 
2358
        urls += "?" + params.Encode()
 
2359
        req, _ := http.NewRequest("PUT", urls, body)
 
2360
        googleapi.Expand(req.URL, map[string]string{
 
2361
                "circleId": c.circleId,
 
2362
        })
 
2363
        req.Header.Set("Content-Type", ctype)
 
2364
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2365
        res, err := c.s.client.Do(req)
 
2366
        if err != nil {
 
2367
                return nil, err
 
2368
        }
 
2369
        defer googleapi.CloseBody(res)
 
2370
        if err := googleapi.CheckResponse(res); err != nil {
 
2371
                return nil, err
 
2372
        }
 
2373
        var ret *Circle
 
2374
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2375
                return nil, err
 
2376
        }
 
2377
        return ret, nil
 
2378
        // {
 
2379
        //   "description": "Update a circle's description.",
 
2380
        //   "httpMethod": "PUT",
 
2381
        //   "id": "plusDomains.circles.update",
 
2382
        //   "parameterOrder": [
 
2383
        //     "circleId"
 
2384
        //   ],
 
2385
        //   "parameters": {
 
2386
        //     "circleId": {
 
2387
        //       "description": "The ID of the circle to update.",
 
2388
        //       "location": "path",
 
2389
        //       "required": true,
 
2390
        //       "type": "string"
 
2391
        //     }
 
2392
        //   },
 
2393
        //   "path": "circles/{circleId}",
 
2394
        //   "request": {
 
2395
        //     "$ref": "Circle"
 
2396
        //   },
 
2397
        //   "response": {
 
2398
        //     "$ref": "Circle"
 
2399
        //   },
 
2400
        //   "scopes": [
 
2401
        //     "https://www.googleapis.com/auth/plus.circles.write",
 
2402
        //     "https://www.googleapis.com/auth/plus.login"
 
2403
        //   ]
 
2404
        // }
 
2405
 
 
2406
}
 
2407
 
 
2408
// method id "plusDomains.comments.get":
 
2409
 
 
2410
type CommentsGetCall struct {
 
2411
        s         *Service
 
2412
        commentId string
 
2413
        opt_      map[string]interface{}
 
2414
}
 
2415
 
 
2416
// Get: Get a comment.
 
2417
func (r *CommentsService) Get(commentId string) *CommentsGetCall {
 
2418
        c := &CommentsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2419
        c.commentId = commentId
 
2420
        return c
 
2421
}
 
2422
 
 
2423
// Fields allows partial responses to be retrieved.
 
2424
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2425
// for more information.
 
2426
func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
 
2427
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2428
        return c
 
2429
}
 
2430
 
 
2431
func (c *CommentsGetCall) Do() (*Comment, error) {
 
2432
        var body io.Reader = nil
 
2433
        params := make(url.Values)
 
2434
        params.Set("alt", "json")
 
2435
        if v, ok := c.opt_["fields"]; ok {
 
2436
                params.Set("fields", fmt.Sprintf("%v", v))
 
2437
        }
 
2438
        urls := googleapi.ResolveRelative(c.s.BasePath, "comments/{commentId}")
 
2439
        urls += "?" + params.Encode()
 
2440
        req, _ := http.NewRequest("GET", urls, body)
 
2441
        googleapi.Expand(req.URL, map[string]string{
 
2442
                "commentId": c.commentId,
 
2443
        })
 
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 *Comment
 
2454
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2455
                return nil, err
 
2456
        }
 
2457
        return ret, nil
 
2458
        // {
 
2459
        //   "description": "Get a comment.",
 
2460
        //   "httpMethod": "GET",
 
2461
        //   "id": "plusDomains.comments.get",
 
2462
        //   "parameterOrder": [
 
2463
        //     "commentId"
 
2464
        //   ],
 
2465
        //   "parameters": {
 
2466
        //     "commentId": {
 
2467
        //       "description": "The ID of the comment to get.",
 
2468
        //       "location": "path",
 
2469
        //       "required": true,
 
2470
        //       "type": "string"
 
2471
        //     }
 
2472
        //   },
 
2473
        //   "path": "comments/{commentId}",
 
2474
        //   "response": {
 
2475
        //     "$ref": "Comment"
 
2476
        //   },
 
2477
        //   "scopes": [
 
2478
        //     "https://www.googleapis.com/auth/plus.login",
 
2479
        //     "https://www.googleapis.com/auth/plus.stream.read"
 
2480
        //   ]
 
2481
        // }
 
2482
 
 
2483
}
 
2484
 
 
2485
// method id "plusDomains.comments.insert":
 
2486
 
 
2487
type CommentsInsertCall struct {
 
2488
        s          *Service
 
2489
        activityId string
 
2490
        comment    *Comment
 
2491
        opt_       map[string]interface{}
 
2492
}
 
2493
 
 
2494
// Insert: Create a new comment in reply to an activity.
 
2495
func (r *CommentsService) Insert(activityId string, comment *Comment) *CommentsInsertCall {
 
2496
        c := &CommentsInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
2497
        c.activityId = activityId
 
2498
        c.comment = comment
 
2499
        return c
 
2500
}
 
2501
 
 
2502
// Fields allows partial responses to be retrieved.
 
2503
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2504
// for more information.
 
2505
func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
 
2506
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2507
        return c
 
2508
}
 
2509
 
 
2510
func (c *CommentsInsertCall) Do() (*Comment, error) {
 
2511
        var body io.Reader = nil
 
2512
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
 
2513
        if err != nil {
 
2514
                return nil, err
 
2515
        }
 
2516
        ctype := "application/json"
 
2517
        params := make(url.Values)
 
2518
        params.Set("alt", "json")
 
2519
        if v, ok := c.opt_["fields"]; ok {
 
2520
                params.Set("fields", fmt.Sprintf("%v", v))
 
2521
        }
 
2522
        urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/comments")
 
2523
        urls += "?" + params.Encode()
 
2524
        req, _ := http.NewRequest("POST", urls, body)
 
2525
        googleapi.Expand(req.URL, map[string]string{
 
2526
                "activityId": c.activityId,
 
2527
        })
 
2528
        req.Header.Set("Content-Type", ctype)
 
2529
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2530
        res, err := c.s.client.Do(req)
 
2531
        if err != nil {
 
2532
                return nil, err
 
2533
        }
 
2534
        defer googleapi.CloseBody(res)
 
2535
        if err := googleapi.CheckResponse(res); err != nil {
 
2536
                return nil, err
 
2537
        }
 
2538
        var ret *Comment
 
2539
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2540
                return nil, err
 
2541
        }
 
2542
        return ret, nil
 
2543
        // {
 
2544
        //   "description": "Create a new comment in reply to an activity.",
 
2545
        //   "httpMethod": "POST",
 
2546
        //   "id": "plusDomains.comments.insert",
 
2547
        //   "parameterOrder": [
 
2548
        //     "activityId"
 
2549
        //   ],
 
2550
        //   "parameters": {
 
2551
        //     "activityId": {
 
2552
        //       "description": "The ID of the activity to reply to.",
 
2553
        //       "location": "path",
 
2554
        //       "required": true,
 
2555
        //       "type": "string"
 
2556
        //     }
 
2557
        //   },
 
2558
        //   "path": "activities/{activityId}/comments",
 
2559
        //   "request": {
 
2560
        //     "$ref": "Comment"
 
2561
        //   },
 
2562
        //   "response": {
 
2563
        //     "$ref": "Comment"
 
2564
        //   },
 
2565
        //   "scopes": [
 
2566
        //     "https://www.googleapis.com/auth/plus.login",
 
2567
        //     "https://www.googleapis.com/auth/plus.stream.write"
 
2568
        //   ]
 
2569
        // }
 
2570
 
 
2571
}
 
2572
 
 
2573
// method id "plusDomains.comments.list":
 
2574
 
 
2575
type CommentsListCall struct {
 
2576
        s          *Service
 
2577
        activityId string
 
2578
        opt_       map[string]interface{}
 
2579
}
 
2580
 
 
2581
// List: List all of the comments for an activity.
 
2582
func (r *CommentsService) List(activityId string) *CommentsListCall {
 
2583
        c := &CommentsListCall{s: r.s, opt_: make(map[string]interface{})}
 
2584
        c.activityId = activityId
 
2585
        return c
 
2586
}
 
2587
 
 
2588
// MaxResults sets the optional parameter "maxResults": The maximum
 
2589
// number of comments to include in the response, which is used for
 
2590
// paging. For any response, the actual number returned might be less
 
2591
// than the specified maxResults.
 
2592
func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
 
2593
        c.opt_["maxResults"] = maxResults
 
2594
        return c
 
2595
}
 
2596
 
 
2597
// PageToken sets the optional parameter "pageToken": The continuation
 
2598
// token, which is used to page through large result sets. To get the
 
2599
// next page of results, set this parameter to the value of
 
2600
// "nextPageToken" from the previous response.
 
2601
func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
 
2602
        c.opt_["pageToken"] = pageToken
 
2603
        return c
 
2604
}
 
2605
 
 
2606
// SortOrder sets the optional parameter "sortOrder": The order in which
 
2607
// to sort the list of comments.
 
2608
func (c *CommentsListCall) SortOrder(sortOrder string) *CommentsListCall {
 
2609
        c.opt_["sortOrder"] = sortOrder
 
2610
        return c
 
2611
}
 
2612
 
 
2613
// Fields allows partial responses to be retrieved.
 
2614
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2615
// for more information.
 
2616
func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
 
2617
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2618
        return c
 
2619
}
 
2620
 
 
2621
func (c *CommentsListCall) Do() (*CommentFeed, error) {
 
2622
        var body io.Reader = nil
 
2623
        params := make(url.Values)
 
2624
        params.Set("alt", "json")
 
2625
        if v, ok := c.opt_["maxResults"]; ok {
 
2626
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
2627
        }
 
2628
        if v, ok := c.opt_["pageToken"]; ok {
 
2629
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
2630
        }
 
2631
        if v, ok := c.opt_["sortOrder"]; ok {
 
2632
                params.Set("sortOrder", fmt.Sprintf("%v", v))
 
2633
        }
 
2634
        if v, ok := c.opt_["fields"]; ok {
 
2635
                params.Set("fields", fmt.Sprintf("%v", v))
 
2636
        }
 
2637
        urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/comments")
 
2638
        urls += "?" + params.Encode()
 
2639
        req, _ := http.NewRequest("GET", urls, body)
 
2640
        googleapi.Expand(req.URL, map[string]string{
 
2641
                "activityId": c.activityId,
 
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 *CommentFeed
 
2653
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2654
                return nil, err
 
2655
        }
 
2656
        return ret, nil
 
2657
        // {
 
2658
        //   "description": "List all of the comments for an activity.",
 
2659
        //   "httpMethod": "GET",
 
2660
        //   "id": "plusDomains.comments.list",
 
2661
        //   "parameterOrder": [
 
2662
        //     "activityId"
 
2663
        //   ],
 
2664
        //   "parameters": {
 
2665
        //     "activityId": {
 
2666
        //       "description": "The ID of the activity to get comments for.",
 
2667
        //       "location": "path",
 
2668
        //       "required": true,
 
2669
        //       "type": "string"
 
2670
        //     },
 
2671
        //     "maxResults": {
 
2672
        //       "default": "20",
 
2673
        //       "description": "The maximum number of comments to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
2674
        //       "format": "uint32",
 
2675
        //       "location": "query",
 
2676
        //       "maximum": "500",
 
2677
        //       "minimum": "0",
 
2678
        //       "type": "integer"
 
2679
        //     },
 
2680
        //     "pageToken": {
 
2681
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
2682
        //       "location": "query",
 
2683
        //       "type": "string"
 
2684
        //     },
 
2685
        //     "sortOrder": {
 
2686
        //       "default": "ascending",
 
2687
        //       "description": "The order in which to sort the list of comments.",
 
2688
        //       "enum": [
 
2689
        //         "ascending",
 
2690
        //         "descending"
 
2691
        //       ],
 
2692
        //       "enumDescriptions": [
 
2693
        //         "Sort oldest comments first.",
 
2694
        //         "Sort newest comments first."
 
2695
        //       ],
 
2696
        //       "location": "query",
 
2697
        //       "type": "string"
 
2698
        //     }
 
2699
        //   },
 
2700
        //   "path": "activities/{activityId}/comments",
 
2701
        //   "response": {
 
2702
        //     "$ref": "CommentFeed"
 
2703
        //   },
 
2704
        //   "scopes": [
 
2705
        //     "https://www.googleapis.com/auth/plus.login",
 
2706
        //     "https://www.googleapis.com/auth/plus.stream.read"
 
2707
        //   ]
 
2708
        // }
 
2709
 
 
2710
}
 
2711
 
 
2712
// method id "plusDomains.media.insert":
 
2713
 
 
2714
type MediaInsertCall struct {
 
2715
        s          *Service
 
2716
        userId     string
 
2717
        collection string
 
2718
        media      *Media
 
2719
        opt_       map[string]interface{}
 
2720
        media_     io.Reader
 
2721
}
 
2722
 
 
2723
// Insert: Add a new media item to an album. The current upload size
 
2724
// limitations are 36MB for a photo and 1GB for a video. Uploads do not
 
2725
// count against quota if photos are less than 2048 pixels on their
 
2726
// longest side or videos are less than 15 minutes in length.
 
2727
func (r *MediaService) Insert(userId string, collection string, media *Media) *MediaInsertCall {
 
2728
        c := &MediaInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
2729
        c.userId = userId
 
2730
        c.collection = collection
 
2731
        c.media = media
 
2732
        return c
 
2733
}
 
2734
func (c *MediaInsertCall) Media(r io.Reader) *MediaInsertCall {
 
2735
        c.media_ = r
 
2736
        return c
 
2737
}
 
2738
 
 
2739
// Fields allows partial responses to be retrieved.
 
2740
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2741
// for more information.
 
2742
func (c *MediaInsertCall) Fields(s ...googleapi.Field) *MediaInsertCall {
 
2743
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2744
        return c
 
2745
}
 
2746
 
 
2747
func (c *MediaInsertCall) Do() (*Media, error) {
 
2748
        var body io.Reader = nil
 
2749
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.media)
 
2750
        if err != nil {
 
2751
                return nil, err
 
2752
        }
 
2753
        ctype := "application/json"
 
2754
        params := make(url.Values)
 
2755
        params.Set("alt", "json")
 
2756
        if v, ok := c.opt_["fields"]; ok {
 
2757
                params.Set("fields", fmt.Sprintf("%v", v))
 
2758
        }
 
2759
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/media/{collection}")
 
2760
        if c.media_ != nil {
 
2761
                urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
 
2762
                params.Set("uploadType", "multipart")
 
2763
        }
 
2764
        urls += "?" + params.Encode()
 
2765
        contentLength_, hasMedia_ := googleapi.ConditionallyIncludeMedia(c.media_, &body, &ctype)
 
2766
        req, _ := http.NewRequest("POST", urls, body)
 
2767
        googleapi.Expand(req.URL, map[string]string{
 
2768
                "userId":     c.userId,
 
2769
                "collection": c.collection,
 
2770
        })
 
2771
        if hasMedia_ {
 
2772
                req.ContentLength = contentLength_
 
2773
        }
 
2774
        req.Header.Set("Content-Type", ctype)
 
2775
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2776
        res, err := c.s.client.Do(req)
 
2777
        if err != nil {
 
2778
                return nil, err
 
2779
        }
 
2780
        defer googleapi.CloseBody(res)
 
2781
        if err := googleapi.CheckResponse(res); err != nil {
 
2782
                return nil, err
 
2783
        }
 
2784
        var ret *Media
 
2785
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2786
                return nil, err
 
2787
        }
 
2788
        return ret, nil
 
2789
        // {
 
2790
        //   "description": "Add a new media item to an album. The current upload size limitations are 36MB for a photo and 1GB for a video. Uploads do not count against quota if photos are less than 2048 pixels on their longest side or videos are less than 15 minutes in length.",
 
2791
        //   "httpMethod": "POST",
 
2792
        //   "id": "plusDomains.media.insert",
 
2793
        //   "mediaUpload": {
 
2794
        //     "accept": [
 
2795
        //       "image/*",
 
2796
        //       "video/*"
 
2797
        //     ],
 
2798
        //     "protocols": {
 
2799
        //       "resumable": {
 
2800
        //         "multipart": true,
 
2801
        //         "path": "/resumable/upload/plusDomains/v1/people/{userId}/media/{collection}"
 
2802
        //       },
 
2803
        //       "simple": {
 
2804
        //         "multipart": true,
 
2805
        //         "path": "/upload/plusDomains/v1/people/{userId}/media/{collection}"
 
2806
        //       }
 
2807
        //     }
 
2808
        //   },
 
2809
        //   "parameterOrder": [
 
2810
        //     "userId",
 
2811
        //     "collection"
 
2812
        //   ],
 
2813
        //   "parameters": {
 
2814
        //     "collection": {
 
2815
        //       "enum": [
 
2816
        //         "cloud"
 
2817
        //       ],
 
2818
        //       "enumDescriptions": [
 
2819
        //         "Upload the media to share on Google+."
 
2820
        //       ],
 
2821
        //       "location": "path",
 
2822
        //       "required": true,
 
2823
        //       "type": "string"
 
2824
        //     },
 
2825
        //     "userId": {
 
2826
        //       "description": "The ID of the user to create the activity on behalf of.",
 
2827
        //       "location": "path",
 
2828
        //       "required": true,
 
2829
        //       "type": "string"
 
2830
        //     }
 
2831
        //   },
 
2832
        //   "path": "people/{userId}/media/{collection}",
 
2833
        //   "request": {
 
2834
        //     "$ref": "Media"
 
2835
        //   },
 
2836
        //   "response": {
 
2837
        //     "$ref": "Media"
 
2838
        //   },
 
2839
        //   "scopes": [
 
2840
        //     "https://www.googleapis.com/auth/plus.login",
 
2841
        //     "https://www.googleapis.com/auth/plus.me",
 
2842
        //     "https://www.googleapis.com/auth/plus.media.upload"
 
2843
        //   ],
 
2844
        //   "supportsMediaUpload": true
 
2845
        // }
 
2846
 
 
2847
}
 
2848
 
 
2849
// method id "plusDomains.people.get":
 
2850
 
 
2851
type PeopleGetCall struct {
 
2852
        s      *Service
 
2853
        userId string
 
2854
        opt_   map[string]interface{}
 
2855
}
 
2856
 
 
2857
// Get: Get a person's profile.
 
2858
func (r *PeopleService) Get(userId string) *PeopleGetCall {
 
2859
        c := &PeopleGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2860
        c.userId = userId
 
2861
        return c
 
2862
}
 
2863
 
 
2864
// Fields allows partial responses to be retrieved.
 
2865
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2866
// for more information.
 
2867
func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall {
 
2868
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2869
        return c
 
2870
}
 
2871
 
 
2872
func (c *PeopleGetCall) Do() (*Person, error) {
 
2873
        var body io.Reader = nil
 
2874
        params := make(url.Values)
 
2875
        params.Set("alt", "json")
 
2876
        if v, ok := c.opt_["fields"]; ok {
 
2877
                params.Set("fields", fmt.Sprintf("%v", v))
 
2878
        }
 
2879
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}")
 
2880
        urls += "?" + params.Encode()
 
2881
        req, _ := http.NewRequest("GET", urls, body)
 
2882
        googleapi.Expand(req.URL, map[string]string{
 
2883
                "userId": c.userId,
 
2884
        })
 
2885
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2886
        res, err := c.s.client.Do(req)
 
2887
        if err != nil {
 
2888
                return nil, err
 
2889
        }
 
2890
        defer googleapi.CloseBody(res)
 
2891
        if err := googleapi.CheckResponse(res); err != nil {
 
2892
                return nil, err
 
2893
        }
 
2894
        var ret *Person
 
2895
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2896
                return nil, err
 
2897
        }
 
2898
        return ret, nil
 
2899
        // {
 
2900
        //   "description": "Get a person's profile.",
 
2901
        //   "httpMethod": "GET",
 
2902
        //   "id": "plusDomains.people.get",
 
2903
        //   "parameterOrder": [
 
2904
        //     "userId"
 
2905
        //   ],
 
2906
        //   "parameters": {
 
2907
        //     "userId": {
 
2908
        //       "description": "The ID of the person to get the profile for. The special value \"me\" can be used to indicate the authenticated user.",
 
2909
        //       "location": "path",
 
2910
        //       "required": true,
 
2911
        //       "type": "string"
 
2912
        //     }
 
2913
        //   },
 
2914
        //   "path": "people/{userId}",
 
2915
        //   "response": {
 
2916
        //     "$ref": "Person"
 
2917
        //   },
 
2918
        //   "scopes": [
 
2919
        //     "https://www.googleapis.com/auth/plus.login",
 
2920
        //     "https://www.googleapis.com/auth/plus.me",
 
2921
        //     "https://www.googleapis.com/auth/plus.profiles.read",
 
2922
        //     "https://www.googleapis.com/auth/userinfo.email",
 
2923
        //     "https://www.googleapis.com/auth/userinfo.profile"
 
2924
        //   ]
 
2925
        // }
 
2926
 
 
2927
}
 
2928
 
 
2929
// method id "plusDomains.people.list":
 
2930
 
 
2931
type PeopleListCall struct {
 
2932
        s          *Service
 
2933
        userId     string
 
2934
        collection string
 
2935
        opt_       map[string]interface{}
 
2936
}
 
2937
 
 
2938
// List: List all of the people in the specified collection.
 
2939
func (r *PeopleService) List(userId string, collection string) *PeopleListCall {
 
2940
        c := &PeopleListCall{s: r.s, opt_: make(map[string]interface{})}
 
2941
        c.userId = userId
 
2942
        c.collection = collection
 
2943
        return c
 
2944
}
 
2945
 
 
2946
// MaxResults sets the optional parameter "maxResults": The maximum
 
2947
// number of people to include in the response, which is used for
 
2948
// paging. For any response, the actual number returned might be less
 
2949
// than the specified maxResults.
 
2950
func (c *PeopleListCall) MaxResults(maxResults int64) *PeopleListCall {
 
2951
        c.opt_["maxResults"] = maxResults
 
2952
        return c
 
2953
}
 
2954
 
 
2955
// OrderBy sets the optional parameter "orderBy": The order to return
 
2956
// people in.
 
2957
func (c *PeopleListCall) OrderBy(orderBy string) *PeopleListCall {
 
2958
        c.opt_["orderBy"] = orderBy
 
2959
        return c
 
2960
}
 
2961
 
 
2962
// PageToken sets the optional parameter "pageToken": The continuation
 
2963
// token, which is used to page through large result sets. To get the
 
2964
// next page of results, set this parameter to the value of
 
2965
// "nextPageToken" from the previous response.
 
2966
func (c *PeopleListCall) PageToken(pageToken string) *PeopleListCall {
 
2967
        c.opt_["pageToken"] = pageToken
 
2968
        return c
 
2969
}
 
2970
 
 
2971
// Fields allows partial responses to be retrieved.
 
2972
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2973
// for more information.
 
2974
func (c *PeopleListCall) Fields(s ...googleapi.Field) *PeopleListCall {
 
2975
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2976
        return c
 
2977
}
 
2978
 
 
2979
func (c *PeopleListCall) Do() (*PeopleFeed, error) {
 
2980
        var body io.Reader = nil
 
2981
        params := make(url.Values)
 
2982
        params.Set("alt", "json")
 
2983
        if v, ok := c.opt_["maxResults"]; ok {
 
2984
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
2985
        }
 
2986
        if v, ok := c.opt_["orderBy"]; ok {
 
2987
                params.Set("orderBy", fmt.Sprintf("%v", v))
 
2988
        }
 
2989
        if v, ok := c.opt_["pageToken"]; ok {
 
2990
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
2991
        }
 
2992
        if v, ok := c.opt_["fields"]; ok {
 
2993
                params.Set("fields", fmt.Sprintf("%v", v))
 
2994
        }
 
2995
        urls := googleapi.ResolveRelative(c.s.BasePath, "people/{userId}/people/{collection}")
 
2996
        urls += "?" + params.Encode()
 
2997
        req, _ := http.NewRequest("GET", urls, body)
 
2998
        googleapi.Expand(req.URL, map[string]string{
 
2999
                "userId":     c.userId,
 
3000
                "collection": c.collection,
 
3001
        })
 
3002
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3003
        res, err := c.s.client.Do(req)
 
3004
        if err != nil {
 
3005
                return nil, err
 
3006
        }
 
3007
        defer googleapi.CloseBody(res)
 
3008
        if err := googleapi.CheckResponse(res); err != nil {
 
3009
                return nil, err
 
3010
        }
 
3011
        var ret *PeopleFeed
 
3012
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3013
                return nil, err
 
3014
        }
 
3015
        return ret, nil
 
3016
        // {
 
3017
        //   "description": "List all of the people in the specified collection.",
 
3018
        //   "httpMethod": "GET",
 
3019
        //   "id": "plusDomains.people.list",
 
3020
        //   "parameterOrder": [
 
3021
        //     "userId",
 
3022
        //     "collection"
 
3023
        //   ],
 
3024
        //   "parameters": {
 
3025
        //     "collection": {
 
3026
        //       "description": "The collection of people to list.",
 
3027
        //       "enum": [
 
3028
        //         "circled"
 
3029
        //       ],
 
3030
        //       "enumDescriptions": [
 
3031
        //         "The list of people who this user has added to one or more circles."
 
3032
        //       ],
 
3033
        //       "location": "path",
 
3034
        //       "required": true,
 
3035
        //       "type": "string"
 
3036
        //     },
 
3037
        //     "maxResults": {
 
3038
        //       "default": "100",
 
3039
        //       "description": "The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
3040
        //       "format": "uint32",
 
3041
        //       "location": "query",
 
3042
        //       "maximum": "100",
 
3043
        //       "minimum": "1",
 
3044
        //       "type": "integer"
 
3045
        //     },
 
3046
        //     "orderBy": {
 
3047
        //       "description": "The order to return people in.",
 
3048
        //       "enum": [
 
3049
        //         "alphabetical",
 
3050
        //         "best"
 
3051
        //       ],
 
3052
        //       "enumDescriptions": [
 
3053
        //         "Order the people by their display name.",
 
3054
        //         "Order people based on the relevence to the viewer."
 
3055
        //       ],
 
3056
        //       "location": "query",
 
3057
        //       "type": "string"
 
3058
        //     },
 
3059
        //     "pageToken": {
 
3060
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
3061
        //       "location": "query",
 
3062
        //       "type": "string"
 
3063
        //     },
 
3064
        //     "userId": {
 
3065
        //       "description": "Get the collection of people for the person identified. Use \"me\" to indicate the authenticated user.",
 
3066
        //       "location": "path",
 
3067
        //       "required": true,
 
3068
        //       "type": "string"
 
3069
        //     }
 
3070
        //   },
 
3071
        //   "path": "people/{userId}/people/{collection}",
 
3072
        //   "response": {
 
3073
        //     "$ref": "PeopleFeed"
 
3074
        //   },
 
3075
        //   "scopes": [
 
3076
        //     "https://www.googleapis.com/auth/plus.circles.read",
 
3077
        //     "https://www.googleapis.com/auth/plus.login",
 
3078
        //     "https://www.googleapis.com/auth/plus.me"
 
3079
        //   ]
 
3080
        // }
 
3081
 
 
3082
}
 
3083
 
 
3084
// method id "plusDomains.people.listByActivity":
 
3085
 
 
3086
type PeopleListByActivityCall struct {
 
3087
        s          *Service
 
3088
        activityId string
 
3089
        collection string
 
3090
        opt_       map[string]interface{}
 
3091
}
 
3092
 
 
3093
// ListByActivity: List all of the people in the specified collection
 
3094
// for a particular activity.
 
3095
func (r *PeopleService) ListByActivity(activityId string, collection string) *PeopleListByActivityCall {
 
3096
        c := &PeopleListByActivityCall{s: r.s, opt_: make(map[string]interface{})}
 
3097
        c.activityId = activityId
 
3098
        c.collection = collection
 
3099
        return c
 
3100
}
 
3101
 
 
3102
// MaxResults sets the optional parameter "maxResults": The maximum
 
3103
// number of people to include in the response, which is used for
 
3104
// paging. For any response, the actual number returned might be less
 
3105
// than the specified maxResults.
 
3106
func (c *PeopleListByActivityCall) MaxResults(maxResults int64) *PeopleListByActivityCall {
 
3107
        c.opt_["maxResults"] = maxResults
 
3108
        return c
 
3109
}
 
3110
 
 
3111
// PageToken sets the optional parameter "pageToken": The continuation
 
3112
// token, which is used to page through large result sets. To get the
 
3113
// next page of results, set this parameter to the value of
 
3114
// "nextPageToken" from the previous response.
 
3115
func (c *PeopleListByActivityCall) PageToken(pageToken string) *PeopleListByActivityCall {
 
3116
        c.opt_["pageToken"] = pageToken
 
3117
        return c
 
3118
}
 
3119
 
 
3120
// Fields allows partial responses to be retrieved.
 
3121
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3122
// for more information.
 
3123
func (c *PeopleListByActivityCall) Fields(s ...googleapi.Field) *PeopleListByActivityCall {
 
3124
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3125
        return c
 
3126
}
 
3127
 
 
3128
func (c *PeopleListByActivityCall) Do() (*PeopleFeed, error) {
 
3129
        var body io.Reader = nil
 
3130
        params := make(url.Values)
 
3131
        params.Set("alt", "json")
 
3132
        if v, ok := c.opt_["maxResults"]; ok {
 
3133
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
3134
        }
 
3135
        if v, ok := c.opt_["pageToken"]; ok {
 
3136
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
3137
        }
 
3138
        if v, ok := c.opt_["fields"]; ok {
 
3139
                params.Set("fields", fmt.Sprintf("%v", v))
 
3140
        }
 
3141
        urls := googleapi.ResolveRelative(c.s.BasePath, "activities/{activityId}/people/{collection}")
 
3142
        urls += "?" + params.Encode()
 
3143
        req, _ := http.NewRequest("GET", urls, body)
 
3144
        googleapi.Expand(req.URL, map[string]string{
 
3145
                "activityId": c.activityId,
 
3146
                "collection": c.collection,
 
3147
        })
 
3148
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3149
        res, err := c.s.client.Do(req)
 
3150
        if err != nil {
 
3151
                return nil, err
 
3152
        }
 
3153
        defer googleapi.CloseBody(res)
 
3154
        if err := googleapi.CheckResponse(res); err != nil {
 
3155
                return nil, err
 
3156
        }
 
3157
        var ret *PeopleFeed
 
3158
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3159
                return nil, err
 
3160
        }
 
3161
        return ret, nil
 
3162
        // {
 
3163
        //   "description": "List all of the people in the specified collection for a particular activity.",
 
3164
        //   "httpMethod": "GET",
 
3165
        //   "id": "plusDomains.people.listByActivity",
 
3166
        //   "parameterOrder": [
 
3167
        //     "activityId",
 
3168
        //     "collection"
 
3169
        //   ],
 
3170
        //   "parameters": {
 
3171
        //     "activityId": {
 
3172
        //       "description": "The ID of the activity to get the list of people for.",
 
3173
        //       "location": "path",
 
3174
        //       "required": true,
 
3175
        //       "type": "string"
 
3176
        //     },
 
3177
        //     "collection": {
 
3178
        //       "description": "The collection of people to list.",
 
3179
        //       "enum": [
 
3180
        //         "plusoners",
 
3181
        //         "resharers",
 
3182
        //         "sharedto"
 
3183
        //       ],
 
3184
        //       "enumDescriptions": [
 
3185
        //         "List all people who have +1'd this activity.",
 
3186
        //         "List all people who have reshared this activity.",
 
3187
        //         "List all people who this activity was shared to."
 
3188
        //       ],
 
3189
        //       "location": "path",
 
3190
        //       "required": true,
 
3191
        //       "type": "string"
 
3192
        //     },
 
3193
        //     "maxResults": {
 
3194
        //       "default": "20",
 
3195
        //       "description": "The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
3196
        //       "format": "uint32",
 
3197
        //       "location": "query",
 
3198
        //       "maximum": "100",
 
3199
        //       "minimum": "1",
 
3200
        //       "type": "integer"
 
3201
        //     },
 
3202
        //     "pageToken": {
 
3203
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
3204
        //       "location": "query",
 
3205
        //       "type": "string"
 
3206
        //     }
 
3207
        //   },
 
3208
        //   "path": "activities/{activityId}/people/{collection}",
 
3209
        //   "response": {
 
3210
        //     "$ref": "PeopleFeed"
 
3211
        //   },
 
3212
        //   "scopes": [
 
3213
        //     "https://www.googleapis.com/auth/plus.login",
 
3214
        //     "https://www.googleapis.com/auth/plus.stream.read"
 
3215
        //   ]
 
3216
        // }
 
3217
 
 
3218
}
 
3219
 
 
3220
// method id "plusDomains.people.listByCircle":
 
3221
 
 
3222
type PeopleListByCircleCall struct {
 
3223
        s        *Service
 
3224
        circleId string
 
3225
        opt_     map[string]interface{}
 
3226
}
 
3227
 
 
3228
// ListByCircle: List all of the people who are members of a circle.
 
3229
func (r *PeopleService) ListByCircle(circleId string) *PeopleListByCircleCall {
 
3230
        c := &PeopleListByCircleCall{s: r.s, opt_: make(map[string]interface{})}
 
3231
        c.circleId = circleId
 
3232
        return c
 
3233
}
 
3234
 
 
3235
// MaxResults sets the optional parameter "maxResults": The maximum
 
3236
// number of people to include in the response, which is used for
 
3237
// paging. For any response, the actual number returned might be less
 
3238
// than the specified maxResults.
 
3239
func (c *PeopleListByCircleCall) MaxResults(maxResults int64) *PeopleListByCircleCall {
 
3240
        c.opt_["maxResults"] = maxResults
 
3241
        return c
 
3242
}
 
3243
 
 
3244
// PageToken sets the optional parameter "pageToken": The continuation
 
3245
// token, which is used to page through large result sets. To get the
 
3246
// next page of results, set this parameter to the value of
 
3247
// "nextPageToken" from the previous response.
 
3248
func (c *PeopleListByCircleCall) PageToken(pageToken string) *PeopleListByCircleCall {
 
3249
        c.opt_["pageToken"] = pageToken
 
3250
        return c
 
3251
}
 
3252
 
 
3253
// Fields allows partial responses to be retrieved.
 
3254
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3255
// for more information.
 
3256
func (c *PeopleListByCircleCall) Fields(s ...googleapi.Field) *PeopleListByCircleCall {
 
3257
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3258
        return c
 
3259
}
 
3260
 
 
3261
func (c *PeopleListByCircleCall) Do() (*PeopleFeed, error) {
 
3262
        var body io.Reader = nil
 
3263
        params := make(url.Values)
 
3264
        params.Set("alt", "json")
 
3265
        if v, ok := c.opt_["maxResults"]; ok {
 
3266
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
3267
        }
 
3268
        if v, ok := c.opt_["pageToken"]; ok {
 
3269
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
3270
        }
 
3271
        if v, ok := c.opt_["fields"]; ok {
 
3272
                params.Set("fields", fmt.Sprintf("%v", v))
 
3273
        }
 
3274
        urls := googleapi.ResolveRelative(c.s.BasePath, "circles/{circleId}/people")
 
3275
        urls += "?" + params.Encode()
 
3276
        req, _ := http.NewRequest("GET", urls, body)
 
3277
        googleapi.Expand(req.URL, map[string]string{
 
3278
                "circleId": c.circleId,
 
3279
        })
 
3280
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3281
        res, err := c.s.client.Do(req)
 
3282
        if err != nil {
 
3283
                return nil, err
 
3284
        }
 
3285
        defer googleapi.CloseBody(res)
 
3286
        if err := googleapi.CheckResponse(res); err != nil {
 
3287
                return nil, err
 
3288
        }
 
3289
        var ret *PeopleFeed
 
3290
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3291
                return nil, err
 
3292
        }
 
3293
        return ret, nil
 
3294
        // {
 
3295
        //   "description": "List all of the people who are members of a circle.",
 
3296
        //   "httpMethod": "GET",
 
3297
        //   "id": "plusDomains.people.listByCircle",
 
3298
        //   "parameterOrder": [
 
3299
        //     "circleId"
 
3300
        //   ],
 
3301
        //   "parameters": {
 
3302
        //     "circleId": {
 
3303
        //       "description": "The ID of the circle to get the members of.",
 
3304
        //       "location": "path",
 
3305
        //       "required": true,
 
3306
        //       "type": "string"
 
3307
        //     },
 
3308
        //     "maxResults": {
 
3309
        //       "default": "20",
 
3310
        //       "description": "The maximum number of people to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults.",
 
3311
        //       "format": "uint32",
 
3312
        //       "location": "query",
 
3313
        //       "maximum": "100",
 
3314
        //       "minimum": "1",
 
3315
        //       "type": "integer"
 
3316
        //     },
 
3317
        //     "pageToken": {
 
3318
        //       "description": "The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
3319
        //       "location": "query",
 
3320
        //       "type": "string"
 
3321
        //     }
 
3322
        //   },
 
3323
        //   "path": "circles/{circleId}/people",
 
3324
        //   "response": {
 
3325
        //     "$ref": "PeopleFeed"
 
3326
        //   },
 
3327
        //   "scopes": [
 
3328
        //     "https://www.googleapis.com/auth/plus.circles.read",
 
3329
        //     "https://www.googleapis.com/auth/plus.login"
 
3330
        //   ]
 
3331
        // }
 
3332
 
 
3333
}