1
// Package plusdomains provides access to the Google+ Domains API.
3
// See https://developers.google.com/+/domains/
7
// import "google.golang.org/api/plusdomains/v1"
9
// plusdomainsService, err := plusdomains.New(oauthHttpClient)
17
"google.golang.org/api/googleapi"
25
// Always reference these packages, just in case the auto-generated code
27
var _ = bytes.NewBuffer
30
var _ = json.NewDecoder
33
var _ = googleapi.Version
35
var _ = strings.Replace
37
const apiId = "plusDomains:v1"
38
const apiName = "plusDomains"
39
const apiVersion = "v1"
40
const basePath = "https://www.googleapis.com/plusDomains/v1/"
42
// OAuth2 scopes used by this API.
44
// View your circles and the people and pages in them
45
PlusCirclesReadScope = "https://www.googleapis.com/auth/plus.circles.read"
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"
52
// Know your basic profile info and list of people in your circles.
53
PlusLoginScope = "https://www.googleapis.com/auth/plus.login"
55
// Know who you are on Google
56
PlusMeScope = "https://www.googleapis.com/auth/plus.me"
58
// Send your photos and videos to Google+
59
PlusMediaUploadScope = "https://www.googleapis.com/auth/plus.media.upload"
61
// View your own Google+ profile and profiles visible to you
62
PlusProfilesReadScope = "https://www.googleapis.com/auth/plus.profiles.read"
64
// View your Google+ posts, comments, and stream
65
PlusStreamReadScope = "https://www.googleapis.com/auth/plus.stream.read"
67
// Manage your Google+ posts, comments, and stream
68
PlusStreamWriteScope = "https://www.googleapis.com/auth/plus.stream.write"
70
// View your email address
71
UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
73
// View your basic profile info
74
UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
77
func New(client *http.Client) (*Service, error) {
79
return nil, errors.New("client is nil")
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)
93
BasePath string // API endpoint base URL
95
Activities *ActivitiesService
97
Audiences *AudiencesService
99
Circles *CirclesService
101
Comments *CommentsService
105
People *PeopleService
108
func NewActivitiesService(s *Service) *ActivitiesService {
109
rs := &ActivitiesService{s: s}
113
type ActivitiesService struct {
117
func NewAudiencesService(s *Service) *AudiencesService {
118
rs := &AudiencesService{s: s}
122
type AudiencesService struct {
126
func NewCirclesService(s *Service) *CirclesService {
127
rs := &CirclesService{s: s}
131
type CirclesService struct {
135
func NewCommentsService(s *Service) *CommentsService {
136
rs := &CommentsService{s: s}
140
type CommentsService struct {
144
func NewMediaService(s *Service) *MediaService {
145
rs := &MediaService{s: s}
149
type MediaService struct {
153
func NewPeopleService(s *Service) *PeopleService {
154
rs := &PeopleService{s: s}
158
type PeopleService struct {
163
// Description: Description of the access granted, suitable for display.
164
Description string `json:"description,omitempty"`
166
// DomainRestricted: Whether access is restricted to the domain.
167
DomainRestricted bool `json:"domainRestricted,omitempty"`
169
// Items: The list of access entries.
170
Items []*PlusDomainsAclentryResource `json:"items,omitempty"`
172
// Kind: Identifies this resource as a collection of access controls.
173
// Value: "plus#acl".
174
Kind string `json:"kind,omitempty"`
177
type Activity struct {
178
// Access: Identifies who has access to see this activity.
179
Access *Acl `json:"access,omitempty"`
181
// Actor: The person who performed this activity.
182
Actor *ActivityActor `json:"actor,omitempty"`
184
// Address: Street address where this activity occurred.
185
Address string `json:"address,omitempty"`
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"`
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"`
195
// Etag: ETag of this response for caching purposes.
196
Etag string `json:"etag,omitempty"`
198
// Geocode: Latitude and longitude where this activity occurred. Format
199
// is latitude followed by longitude, space separated.
200
Geocode string `json:"geocode,omitempty"`
202
// Id: The ID of this activity.
203
Id string `json:"id,omitempty"`
205
// Kind: Identifies this resource as an activity. Value:
207
Kind string `json:"kind,omitempty"`
209
// Location: The location where this activity occurred.
210
Location *Place `json:"location,omitempty"`
212
// Object: The object of this activity.
213
Object *ActivityObject `json:"object,omitempty"`
215
// PlaceId: ID of the place where this activity occurred.
216
PlaceId string `json:"placeId,omitempty"`
218
// PlaceName: Name of the place where this activity occurred.
219
PlaceName string `json:"placeName,omitempty"`
221
// Provider: The service provider that initially published this
223
Provider *ActivityProvider `json:"provider,omitempty"`
225
// Published: The time at which this activity was initially published.
226
// Formatted as an RFC 3339 timestamp.
227
Published string `json:"published,omitempty"`
229
// Radius: Radius, in meters, of the region where this activity
230
// occurred, centered at the latitude and longitude identified in
232
Radius string `json:"radius,omitempty"`
234
// Title: Title of this activity.
235
Title string `json:"title,omitempty"`
237
// Updated: The time at which this activity was last updated. Formatted
238
// as an RFC 3339 timestamp.
239
Updated string `json:"updated,omitempty"`
241
// Url: The link to this activity.
242
Url string `json:"url,omitempty"`
244
// Verb: This activity's verb, which indicates the action that was
245
// performed. Possible values include, but are not limited to, the
247
// - "post" - Publish content to the stream.
249
// "share" - Reshare an activity.
250
Verb string `json:"verb,omitempty"`
253
type ActivityActor struct {
254
// DisplayName: The name of the actor, suitable for display.
255
DisplayName string `json:"displayName,omitempty"`
257
// Id: The ID of the actor's Person resource.
258
Id string `json:"id,omitempty"`
260
// Image: The image representation of the actor.
261
Image *ActivityActorImage `json:"image,omitempty"`
263
// Name: An object representation of the individual components of name.
264
Name *ActivityActorName `json:"name,omitempty"`
266
// Url: The link to the actor's Google profile.
267
Url string `json:"url,omitempty"`
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"`
277
type ActivityActorName struct {
278
// FamilyName: The family name ("last name") of the actor.
279
FamilyName string `json:"familyName,omitempty"`
281
// GivenName: The given name ("first name") of the actor.
282
GivenName string `json:"givenName,omitempty"`
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"`
291
// Attachments: The media objects attached to this activity.
292
Attachments []*ActivityObjectAttachments `json:"attachments,omitempty"`
294
// Content: The HTML-formatted content, which is suitable for display.
295
Content string `json:"content,omitempty"`
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"`
301
// ObjectType: The type of the object. Possible values include, but are
302
// not limited to, the following values:
303
// - "note" - Textual content.
305
// - "activity" - A Google+ activity.
306
ObjectType string `json:"objectType,omitempty"`
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"`
313
// Plusoners: People who +1'd this activity.
314
Plusoners *ActivityObjectPlusoners `json:"plusoners,omitempty"`
316
// Replies: Comments in reply to this activity.
317
Replies *ActivityObjectReplies `json:"replies,omitempty"`
319
// Resharers: People who reshared this activity.
320
Resharers *ActivityObjectResharers `json:"resharers,omitempty"`
322
// StatusForViewer: Status of the activity as seen by the viewer.
323
StatusForViewer *ActivityObjectStatusForViewer `json:"statusForViewer,omitempty"`
325
// Url: The URL that points to the linked resource.
326
Url string `json:"url,omitempty"`
329
type ActivityObjectActor struct {
330
// DisplayName: The original actor's name, which is suitable for
332
DisplayName string `json:"displayName,omitempty"`
334
// Id: ID of the original actor.
335
Id string `json:"id,omitempty"`
337
// Image: The image representation of the original actor.
338
Image *ActivityObjectActorImage `json:"image,omitempty"`
340
// Url: A link to the original actor's Google profile.
341
Url string `json:"url,omitempty"`
344
type ActivityObjectActorImage struct {
345
// Url: A URL that points to a thumbnail photo of the original actor.
346
Url string `json:"url,omitempty"`
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
353
Content string `json:"content,omitempty"`
355
// DisplayName: The title of the attachment, such as a photo caption or
357
DisplayName string `json:"displayName,omitempty"`
359
// Embed: If the attachment is a video, the embeddable link.
360
Embed *ActivityObjectAttachmentsEmbed `json:"embed,omitempty"`
362
// FullImage: The full image URL for photo attachments.
363
FullImage *ActivityObjectAttachmentsFullImage `json:"fullImage,omitempty"`
365
// Id: The ID of the attachment.
366
Id string `json:"id,omitempty"`
368
// Image: The preview image for photos or videos.
369
Image *ActivityObjectAttachmentsImage `json:"image,omitempty"`
371
// ObjectType: The type of media object. Possible values include, but
372
// are not limited to, the following values:
373
// - "photo" - A photo.
375
// "album" - A photo album.
376
// - "video" - A video.
378
// article, specified by a link.
379
ObjectType string `json:"objectType,omitempty"`
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
385
PreviewThumbnails []*ActivityObjectAttachmentsPreviewThumbnails `json:"previewThumbnails,omitempty"`
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"`
391
// Url: The link to the attachment, which should be of type text/html.
392
Url string `json:"url,omitempty"`
395
type ActivityObjectAttachmentsEmbed struct {
396
// Type: Media type of the link.
397
Type string `json:"type,omitempty"`
399
// Url: URL of the link.
400
Url string `json:"url,omitempty"`
403
type ActivityObjectAttachmentsFullImage struct {
404
// Height: The height, in pixels, of the linked resource.
405
Height int64 `json:"height,omitempty"`
407
// Type: Media type of the link.
408
Type string `json:"type,omitempty"`
410
// Url: URL of the image.
411
Url string `json:"url,omitempty"`
413
// Width: The width, in pixels, of the linked resource.
414
Width int64 `json:"width,omitempty"`
417
type ActivityObjectAttachmentsImage struct {
418
// Height: The height, in pixels, of the linked resource.
419
Height int64 `json:"height,omitempty"`
421
// Type: Media type of the link.
422
Type string `json:"type,omitempty"`
425
Url string `json:"url,omitempty"`
427
// Width: The width, in pixels, of the linked resource.
428
Width int64 `json:"width,omitempty"`
431
type ActivityObjectAttachmentsPreviewThumbnails struct {
432
// Url: URL of the thumbnail image.
433
Url string `json:"url,omitempty"`
436
type ActivityObjectAttachmentsThumbnails struct {
437
// Description: Potential name of the thumbnail.
438
Description string `json:"description,omitempty"`
440
// Image: Image resource.
441
Image *ActivityObjectAttachmentsThumbnailsImage `json:"image,omitempty"`
443
// Url: URL of the webpage containing the image.
444
Url string `json:"url,omitempty"`
447
type ActivityObjectAttachmentsThumbnailsImage struct {
448
// Height: The height, in pixels, of the linked resource.
449
Height int64 `json:"height,omitempty"`
451
// Type: Media type of the link.
452
Type string `json:"type,omitempty"`
455
Url string `json:"url,omitempty"`
457
// Width: The width, in pixels, of the linked resource.
458
Width int64 `json:"width,omitempty"`
461
type ActivityObjectPlusoners struct {
462
// SelfLink: The URL for the collection of people who +1'd this
464
SelfLink string `json:"selfLink,omitempty"`
466
// TotalItems: Total number of people who +1'd this activity.
467
TotalItems int64 `json:"totalItems,omitempty"`
470
type ActivityObjectReplies struct {
471
// SelfLink: The URL for the collection of comments in reply to this
473
SelfLink string `json:"selfLink,omitempty"`
475
// TotalItems: Total number of comments on this activity.
476
TotalItems int64 `json:"totalItems,omitempty"`
479
type ActivityObjectResharers struct {
480
// SelfLink: The URL for the collection of resharers.
481
SelfLink string `json:"selfLink,omitempty"`
483
// TotalItems: Total number of people who reshared this activity.
484
TotalItems int64 `json:"totalItems,omitempty"`
487
type ActivityObjectStatusForViewer struct {
488
// CanComment: Whether the viewer can comment on the activity.
489
CanComment bool `json:"canComment,omitempty"`
491
// CanPlusone: Whether the viewer can +1 the activity.
492
CanPlusone bool `json:"canPlusone,omitempty"`
494
// CanUpdate: Whether the viewer can edit or delete the activity.
495
CanUpdate bool `json:"canUpdate,omitempty"`
497
// IsPlusOned: Whether the viewer has +1'd the activity.
498
IsPlusOned bool `json:"isPlusOned,omitempty"`
500
// ResharingDisabled: Whether reshares are disabled for the activity.
501
ResharingDisabled bool `json:"resharingDisabled,omitempty"`
504
type ActivityProvider struct {
505
// Title: Name of the service provider.
506
Title string `json:"title,omitempty"`
509
type ActivityFeed struct {
510
// Etag: ETag of this response for caching purposes.
511
Etag string `json:"etag,omitempty"`
513
// Id: The ID of this collection of activities. Deprecated.
514
Id string `json:"id,omitempty"`
516
// Items: The activities in this page of results.
517
Items []*Activity `json:"items,omitempty"`
519
// Kind: Identifies this resource as a collection of activities. Value:
520
// "plus#activityFeed".
521
Kind string `json:"kind,omitempty"`
523
// NextLink: Link to the next page of activities.
524
NextLink string `json:"nextLink,omitempty"`
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"`
531
// SelfLink: Link to this activity resource.
532
SelfLink string `json:"selfLink,omitempty"`
534
// Title: The title of this collection of activities, which is a
535
// truncated portion of the content.
536
Title string `json:"title,omitempty"`
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"`
543
type Audience struct {
544
// Etag: ETag of this response for caching purposes.
545
Etag string `json:"etag,omitempty"`
547
// Item: The access control list entry.
548
Item *PlusDomainsAclentryResource `json:"item,omitempty"`
550
// Kind: Identifies this resource as an audience. Value:
552
Kind string `json:"kind,omitempty"`
554
// MemberCount: The number of people in this circle. This only applies
555
// if entity_type is CIRCLE.
556
MemberCount int64 `json:"memberCount,omitempty"`
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
563
// - "limited" - Members are visible to a limited audience.
565
// - "private" - Members are visible to the owner only.
566
Visibility string `json:"visibility,omitempty"`
569
type AudiencesFeed struct {
570
// Etag: ETag of this response for caching purposes.
571
Etag string `json:"etag,omitempty"`
573
// Items: The audiences in this result.
574
Items []*Audience `json:"items,omitempty"`
576
// Kind: Identifies this resource as a collection of audiences. Value:
577
// "plus#audienceFeed".
578
Kind string `json:"kind,omitempty"`
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"`
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"`
591
// Description: The description of this circle.
592
Description string `json:"description,omitempty"`
594
// DisplayName: The circle name.
595
DisplayName string `json:"displayName,omitempty"`
597
// Etag: ETag of this response for caching purposes.
598
Etag string `json:"etag,omitempty"`
600
// Id: The ID of the circle.
601
Id string `json:"id,omitempty"`
603
// Kind: Identifies this resource as a circle. Value: "plus#circle".
604
Kind string `json:"kind,omitempty"`
606
// People: The people in this circle.
607
People *CirclePeople `json:"people,omitempty"`
609
// SelfLink: Link to this circle resource
610
SelfLink string `json:"selfLink,omitempty"`
613
type CirclePeople struct {
614
// TotalItems: The total number of people in this circle.
615
TotalItems int64 `json:"totalItems,omitempty"`
618
type CircleFeed struct {
619
// Etag: ETag of this response for caching purposes.
620
Etag string `json:"etag,omitempty"`
622
// Items: The circles in this page of results.
623
Items []*Circle `json:"items,omitempty"`
625
// Kind: Identifies this resource as a collection of circles. Value:
626
// "plus#circleFeed".
627
Kind string `json:"kind,omitempty"`
629
// NextLink: Link to the next page of circles.
630
NextLink string `json:"nextLink,omitempty"`
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"`
637
// SelfLink: Link to this page of circles.
638
SelfLink string `json:"selfLink,omitempty"`
640
// Title: The title of this list of resources.
641
Title string `json:"title,omitempty"`
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"`
648
type Comment struct {
649
// Actor: The person who posted this comment.
650
Actor *CommentActor `json:"actor,omitempty"`
652
// Etag: ETag of this response for caching purposes.
653
Etag string `json:"etag,omitempty"`
655
// Id: The ID of this comment.
656
Id string `json:"id,omitempty"`
658
// InReplyTo: The activity this comment replied to.
659
InReplyTo []*CommentInReplyTo `json:"inReplyTo,omitempty"`
661
// Kind: Identifies this resource as a comment. Value: "plus#comment".
662
Kind string `json:"kind,omitempty"`
664
// Object: The object of this comment.
665
Object *CommentObject `json:"object,omitempty"`
667
// Plusoners: People who +1'd this comment.
668
Plusoners *CommentPlusoners `json:"plusoners,omitempty"`
670
// Published: The time at which this comment was initially published.
671
// Formatted as an RFC 3339 timestamp.
672
Published string `json:"published,omitempty"`
674
// SelfLink: Link to this comment resource.
675
SelfLink string `json:"selfLink,omitempty"`
677
// Updated: The time at which this comment was last updated. Formatted
678
// as an RFC 3339 timestamp.
679
Updated string `json:"updated,omitempty"`
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"`
687
type CommentActor struct {
688
// DisplayName: The name of this actor, suitable for display.
689
DisplayName string `json:"displayName,omitempty"`
691
// Id: The ID of the actor.
692
Id string `json:"id,omitempty"`
694
// Image: The image representation of this actor.
695
Image *CommentActorImage `json:"image,omitempty"`
697
// Url: A link to the Person resource for this actor.
698
Url string `json:"url,omitempty"`
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"`
708
type CommentInReplyTo struct {
709
// Id: The ID of the activity.
710
Id string `json:"id,omitempty"`
712
// Url: The URL of the activity.
713
Url string `json:"url,omitempty"`
716
type CommentObject struct {
717
// Content: The HTML-formatted content, suitable for display.
718
Content string `json:"content,omitempty"`
720
// ObjectType: The object type of this comment. Possible values are:
722
// "comment" - A comment in reply to an activity.
723
ObjectType string `json:"objectType,omitempty"`
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"`
731
type CommentPlusoners struct {
732
// TotalItems: Total number of people who +1'd this comment.
733
TotalItems int64 `json:"totalItems,omitempty"`
736
type CommentFeed struct {
737
// Etag: ETag of this response for caching purposes.
738
Etag string `json:"etag,omitempty"`
740
// Id: The ID of this collection of comments.
741
Id string `json:"id,omitempty"`
743
// Items: The comments in this page of results.
744
Items []*Comment `json:"items,omitempty"`
746
// Kind: Identifies this resource as a collection of comments. Value:
747
// "plus#commentFeed".
748
Kind string `json:"kind,omitempty"`
750
// NextLink: Link to the next page of activities.
751
NextLink string `json:"nextLink,omitempty"`
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"`
758
// Title: The title of this collection of comments.
759
Title string `json:"title,omitempty"`
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"`
767
// Author: The person who uploaded this media.
768
Author *MediaAuthor `json:"author,omitempty"`
770
// DisplayName: The display name for this media.
771
DisplayName string `json:"displayName,omitempty"`
773
// Etag: ETag of this response for caching purposes.
774
Etag string `json:"etag,omitempty"`
776
// Exif: Exif information of the media item.
777
Exif *MediaExif `json:"exif,omitempty"`
779
// Height: The height in pixels of the original image.
780
Height int64 `json:"height,omitempty"`
782
// Id: ID of this media, which is generated by the API.
783
Id string `json:"id,omitempty"`
785
// Kind: The type of resource.
786
Kind string `json:"kind,omitempty"`
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"`
793
// MediaUrl: The URL of this photo or video's still image.
794
MediaUrl string `json:"mediaUrl,omitempty"`
796
// Published: The time at which this media was uploaded. Formatted as an
797
// RFC 3339 timestamp.
798
Published string `json:"published,omitempty"`
800
// SizeBytes: The size in bytes of this video.
801
SizeBytes int64 `json:"sizeBytes,omitempty,string"`
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"`
808
// Summary: A description, or caption, for this media.
809
Summary string `json:"summary,omitempty"`
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"`
815
// Url: The URL for the page that hosts this media.
816
Url string `json:"url,omitempty"`
818
// VideoDuration: The duration in milliseconds of this video.
819
VideoDuration int64 `json:"videoDuration,omitempty,string"`
821
// VideoStatus: The encoding status of this video. Possible values are:
823
// - "UPLOADING" - Not all the video bytes have been received.
825
// "PENDING" - Video not yet processed.
826
// - "FAILED" - Video processing
828
// - "READY" - A single video stream is playable.
830
// All video streams are playable.
831
VideoStatus string `json:"videoStatus,omitempty"`
833
// Width: The width in pixels of the original image.
834
Width int64 `json:"width,omitempty"`
837
type MediaAuthor struct {
838
// DisplayName: The author's name.
839
DisplayName string `json:"displayName,omitempty"`
841
// Id: ID of the author.
842
Id string `json:"id,omitempty"`
844
// Image: The author's Google profile image.
845
Image *MediaAuthorImage `json:"image,omitempty"`
847
// Url: A link to the author's Google profile.
848
Url string `json:"url,omitempty"`
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"`
858
type MediaExif struct {
859
// Time: The time the media was captured. Formatted as an RFC 3339
861
Time string `json:"time,omitempty"`
864
type PeopleFeed struct {
865
// Etag: ETag of this response for caching purposes.
866
Etag string `json:"etag,omitempty"`
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"`
873
// Kind: Identifies this resource as a collection of people. Value:
874
// "plus#peopleFeed".
875
Kind string `json:"kind,omitempty"`
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"`
882
// SelfLink: Link to this resource.
883
SelfLink string `json:"selfLink,omitempty"`
885
// Title: The title of this collection of people.
886
Title string `json:"title,omitempty"`
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"`
895
// AboutMe: A short biography for this person.
896
AboutMe string `json:"aboutMe,omitempty"`
898
// Birthday: The person's date of birth, represented as YYYY-MM-DD.
899
Birthday string `json:"birthday,omitempty"`
901
// BraggingRights: The "bragging rights" line of this person.
902
BraggingRights string `json:"braggingRights,omitempty"`
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"`
908
// Cover: The cover photo content.
909
Cover *PersonCover `json:"cover,omitempty"`
911
// CurrentLocation: (this field is not currently used)
912
CurrentLocation string `json:"currentLocation,omitempty"`
914
// DisplayName: The name of this person, which is suitable for display.
915
DisplayName string `json:"displayName,omitempty"`
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"`
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"`
929
// Etag: ETag of this response for caching purposes.
930
Etag string `json:"etag,omitempty"`
932
// Gender: The person's gender. Possible values include, but are not
933
// limited to, the following values:
934
// - "male" - Male gender.
936
// "female" - Female gender.
937
// - "other" - Other.
938
Gender string `json:"gender,omitempty"`
940
// Id: The ID of this person.
941
Id string `json:"id,omitempty"`
943
// Image: The representation of the person's profile photo.
944
Image *PersonImage `json:"image,omitempty"`
946
// IsPlusUser: Whether this user has signed up for Google+.
947
IsPlusUser bool `json:"isPlusUser,omitempty"`
949
// Kind: Identifies this resource as a person. Value: "plus#person".
950
Kind string `json:"kind,omitempty"`
952
// Name: An object representation of the individual components of a
954
Name *PersonName `json:"name,omitempty"`
956
// Nickname: The nickname of this person.
957
Nickname string `json:"nickname,omitempty"`
959
// ObjectType: Type of person within Google+. Possible values include,
960
// but are not limited to, the following values:
962
// represents an actual person.
963
// - "page" - represents a page.
964
ObjectType string `json:"objectType,omitempty"`
966
// Occupation: The occupation of this person.
967
Occupation string `json:"occupation,omitempty"`
969
// Organizations: A list of current or past organizations with which
970
// this person is associated.
971
Organizations []*PersonOrganizations `json:"organizations,omitempty"`
973
// PlacesLived: A list of places where this person has lived.
974
PlacesLived []*PersonPlacesLived `json:"placesLived,omitempty"`
976
// PlusOneCount: If a Google+ Page, the number of people who have +1'd
978
PlusOneCount int64 `json:"plusOneCount,omitempty"`
980
// RelationshipStatus: The person's relationship status. Possible values
981
// include, but are not limited to, the following values:
984
// - "in_a_relationship" - Person is in a
986
// - "engaged" - Person is engaged.
987
// - "married" - Person
989
// - "its_complicated" - The relationship is complicated.
991
// - "open_relationship" - Person is in an open relationship.
993
// "widowed" - Person is widowed.
994
// - "in_domestic_partnership" - Person
995
// is in a domestic partnership.
996
// - "in_civil_union" - Person is in a
998
RelationshipStatus string `json:"relationshipStatus,omitempty"`
1000
// Skills: The person's skills.
1001
Skills string `json:"skills,omitempty"`
1003
// Tagline: The brief description (tagline) of this person.
1004
Tagline string `json:"tagline,omitempty"`
1006
// Url: The URL of this person's profile.
1007
Url string `json:"url,omitempty"`
1009
// Urls: A list of URLs for this person.
1010
Urls []*PersonUrls `json:"urls,omitempty"`
1012
// Verified: Whether the person or Google+ Page has been verified.
1013
Verified bool `json:"verified,omitempty"`
1016
type PersonCover struct {
1017
// CoverInfo: Extra information about the cover photo.
1018
CoverInfo *PersonCoverCoverInfo `json:"coverInfo,omitempty"`
1020
// CoverPhoto: The person's primary cover image.
1021
CoverPhoto *PersonCoverCoverPhoto `json:"coverPhoto,omitempty"`
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
1027
Layout string `json:"layout,omitempty"`
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
1034
LeftImageOffset int64 `json:"leftImageOffset,omitempty"`
1036
// TopImageOffset: The difference between the top position of the cover
1037
// image and the actual displayed cover image. Only valid for banner
1039
TopImageOffset int64 `json:"topImageOffset,omitempty"`
1042
type PersonCoverCoverPhoto struct {
1043
// Height: The height of the image.
1044
Height int64 `json:"height,omitempty"`
1046
// Url: The URL of the image.
1047
Url string `json:"url,omitempty"`
1049
// Width: The width of the image.
1050
Width int64 `json:"width,omitempty"`
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
1058
// - "home" - Home email address.
1059
// - "work" - Work email
1061
// - "other" - Other.
1062
Type string `json:"type,omitempty"`
1064
// Value: The email address.
1065
Value string `json:"value,omitempty"`
1068
type PersonImage struct {
1069
// IsDefault: Whether the person's profile photo is the default one
1070
IsDefault bool `json:"isDefault,omitempty"`
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"`
1078
type PersonName struct {
1079
// FamilyName: The family name (last name) of this person.
1080
FamilyName string `json:"familyName,omitempty"`
1082
// Formatted: The full name of this person, including middle names,
1084
Formatted string `json:"formatted,omitempty"`
1086
// GivenName: The given name (first name) of this person.
1087
GivenName string `json:"givenName,omitempty"`
1089
// HonorificPrefix: The honorific prefixes (such as "Dr." or "Mrs.") for
1091
HonorificPrefix string `json:"honorificPrefix,omitempty"`
1093
// HonorificSuffix: The honorific suffixes (such as "Jr.") for this
1095
HonorificSuffix string `json:"honorificSuffix,omitempty"`
1097
// MiddleName: The middle name of this person.
1098
MiddleName string `json:"middleName,omitempty"`
1101
type PersonOrganizations struct {
1102
// Department: The department within the organization. Deprecated.
1103
Department string `json:"department,omitempty"`
1105
// Description: A short description of the person's role in this
1106
// organization. Deprecated.
1107
Description string `json:"description,omitempty"`
1109
// EndDate: The date that the person left this organization.
1110
EndDate string `json:"endDate,omitempty"`
1112
// Location: The location of this organization. Deprecated.
1113
Location string `json:"location,omitempty"`
1115
// Name: The name of the organization.
1116
Name string `json:"name,omitempty"`
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"`
1122
// StartDate: The date that the person joined this organization.
1123
StartDate string `json:"startDate,omitempty"`
1125
// Title: The person's job title or role within the organization.
1126
Title string `json:"title,omitempty"`
1128
// Type: The type of organization. Possible values include, but are not
1129
// limited to, the following values:
1133
Type string `json:"type,omitempty"`
1136
type PersonPlacesLived struct {
1137
// Primary: If "true", this place of residence is this person's primary
1139
Primary bool `json:"primary,omitempty"`
1141
// Value: A place where this person has lived. For example: "Seattle,
1142
// WA", "Near Toronto".
1143
Value string `json:"value,omitempty"`
1146
type PersonUrls struct {
1147
// Label: The label of the URL.
1148
Label string `json:"label,omitempty"`
1150
// Type: The type of URL. Possible values include, but are not limited
1151
// to, the following values:
1152
// - "otherProfile" - URL for another
1154
// - "contributor" - URL to a site for which this person is a
1156
// - "website" - URL for this Google+ Page's primary
1158
// - "other" - Other URL.
1159
Type string `json:"type,omitempty"`
1161
// Value: The URL value.
1162
Value string `json:"value,omitempty"`
1166
// Address: The physical address of the place.
1167
Address *PlaceAddress `json:"address,omitempty"`
1169
// DisplayName: The display name of the place.
1170
DisplayName string `json:"displayName,omitempty"`
1172
// Id: The id of the place.
1173
Id string `json:"id,omitempty"`
1175
// Kind: Identifies this resource as a place. Value: "plus#place".
1176
Kind string `json:"kind,omitempty"`
1178
// Position: The position of the place.
1179
Position *PlacePosition `json:"position,omitempty"`
1182
type PlaceAddress struct {
1183
// Formatted: The formatted address for display.
1184
Formatted string `json:"formatted,omitempty"`
1187
type PlacePosition struct {
1188
// Latitude: The latitude of this position.
1189
Latitude float64 `json:"latitude,omitempty"`
1191
// Longitude: The longitude of this position.
1192
Longitude float64 `json:"longitude,omitempty"`
1195
type PlusDomainsAclentryResource struct {
1196
// DisplayName: A descriptive name for this entry. Suitable for display.
1197
DisplayName string `json:"displayName,omitempty"`
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
1202
Id string `json:"id,omitempty"`
1204
// Type: The type of entry describing to whom access is granted.
1205
// Possible values are:
1206
// - "person" - Access to an individual.
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
1214
// - "domain" - Access to members of the person's Google Apps
1216
// - "public" - Access to anyone on the web.
1217
Type string `json:"type,omitempty"`
1220
type Videostream struct {
1221
// Height: The height, in pixels, of the video resource.
1222
Height int64 `json:"height,omitempty"`
1224
// Type: MIME type of the video stream.
1225
Type string `json:"type,omitempty"`
1227
// Url: URL of the video stream.
1228
Url string `json:"url,omitempty"`
1230
// Width: The width, in pixels, of the video resource.
1231
Width int64 `json:"width,omitempty"`
1234
// method id "plusDomains.activities.get":
1236
type ActivitiesGetCall struct {
1239
opt_ map[string]interface{}
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
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)
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))
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,
1270
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1271
res, err := c.s.client.Do(req)
1275
defer googleapi.CloseBody(res)
1276
if err := googleapi.CheckResponse(res); err != nil {
1280
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1285
// "description": "Get an activity.",
1286
// "httpMethod": "GET",
1287
// "id": "plusDomains.activities.get",
1288
// "parameterOrder": [
1293
// "description": "The ID of the activity to get.",
1294
// "location": "path",
1295
// "required": true,
1299
// "path": "activities/{activityId}",
1301
// "$ref": "Activity"
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"
1312
// method id "plusDomains.activities.insert":
1314
type ActivitiesInsertCall struct {
1318
opt_ map[string]interface{}
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{})}
1325
c.activity = activity
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
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)
1346
func (c *ActivitiesInsertCall) Do() (*Activity, error) {
1347
var body io.Reader = nil
1348
body, err := googleapi.WithoutDataWrapper.JSONReader(c.activity)
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))
1358
if v, ok := c.opt_["fields"]; ok {
1359
params.Set("fields", fmt.Sprintf("%v", v))
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{
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)
1373
defer googleapi.CloseBody(res)
1374
if err := googleapi.CheckResponse(res); err != nil {
1378
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1383
// "description": "Create a new activity for the authenticated user.",
1384
// "httpMethod": "POST",
1385
// "id": "plusDomains.activities.insert",
1386
// "parameterOrder": [
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"
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,
1402
// "path": "people/{userId}/activities",
1404
// "$ref": "Activity"
1407
// "$ref": "Activity"
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"
1418
// method id "plusDomains.activities.list":
1420
type ActivitiesListCall struct {
1424
opt_ map[string]interface{}
1427
// List: List all of the activities in the specified collection for a
1429
func (r *ActivitiesService) List(userId string, collection string) *ActivitiesListCall {
1430
c := &ActivitiesListCall{s: r.s, opt_: make(map[string]interface{})}
1432
c.collection = collection
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
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
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)
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))
1469
if v, ok := c.opt_["pageToken"]; ok {
1470
params.Set("pageToken", fmt.Sprintf("%v", v))
1472
if v, ok := c.opt_["fields"]; ok {
1473
params.Set("fields", fmt.Sprintf("%v", v))
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{
1480
"collection": c.collection,
1482
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1483
res, err := c.s.client.Do(req)
1487
defer googleapi.CloseBody(res)
1488
if err := googleapi.CheckResponse(res); err != nil {
1491
var ret *ActivityFeed
1492
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
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": [
1506
// "description": "The collection of activities to list.",
1510
// "enumDescriptions": [
1511
// "All activities created by the specified user that the authenticated user is authorized to view."
1513
// "location": "path",
1514
// "required": true,
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",
1524
// "type": "integer"
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",
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,
1538
// "path": "people/{userId}/activities/{collection}",
1540
// "$ref": "ActivityFeed"
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"
1551
// method id "plusDomains.audiences.list":
1553
type AudiencesListCall struct {
1556
opt_ map[string]interface{}
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{})}
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
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
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)
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))
1599
if v, ok := c.opt_["pageToken"]; ok {
1600
params.Set("pageToken", fmt.Sprintf("%v", v))
1602
if v, ok := c.opt_["fields"]; ok {
1603
params.Set("fields", fmt.Sprintf("%v", v))
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{
1611
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1612
res, err := c.s.client.Do(req)
1616
defer googleapi.CloseBody(res)
1617
if err := googleapi.CheckResponse(res); err != nil {
1620
var ret *AudiencesFeed
1621
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1626
// "description": "List all of the audiences to which a user can share.",
1627
// "httpMethod": "GET",
1628
// "id": "plusDomains.audiences.list",
1629
// "parameterOrder": [
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",
1640
// "type": "integer"
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",
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,
1654
// "path": "people/{userId}/audiences",
1656
// "$ref": "AudiencesFeed"
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"
1667
// method id "plusDomains.circles.addPeople":
1669
type CirclesAddPeopleCall struct {
1672
opt_ map[string]interface{}
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
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
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
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)
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))
1712
if v, ok := c.opt_["userId"]; ok {
1713
params.Set("userId", fmt.Sprintf("%v", v))
1715
if v, ok := c.opt_["fields"]; ok {
1716
params.Set("fields", fmt.Sprintf("%v", v))
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,
1724
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1725
res, err := c.s.client.Do(req)
1729
defer googleapi.CloseBody(res)
1730
if err := googleapi.CheckResponse(res); err != nil {
1734
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
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": [
1747
// "description": "The ID of the circle to add the person to.",
1748
// "location": "path",
1749
// "required": true,
1753
// "description": "Email of the people to add to the circle. Optional, can be repeated.",
1754
// "location": "query",
1755
// "repeated": true,
1759
// "description": "IDs of the people to add to the circle. Optional, can be repeated.",
1760
// "location": "query",
1761
// "repeated": true,
1765
// "path": "circles/{circleId}/people",
1770
// "https://www.googleapis.com/auth/plus.circles.write",
1771
// "https://www.googleapis.com/auth/plus.login"
1777
// method id "plusDomains.circles.get":
1779
type CirclesGetCall struct {
1782
opt_ map[string]interface{}
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
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)
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))
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,
1813
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1814
res, err := c.s.client.Do(req)
1818
defer googleapi.CloseBody(res)
1819
if err := googleapi.CheckResponse(res); err != nil {
1823
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1828
// "description": "Get a circle.",
1829
// "httpMethod": "GET",
1830
// "id": "plusDomains.circles.get",
1831
// "parameterOrder": [
1836
// "description": "The ID of the circle to get.",
1837
// "location": "path",
1838
// "required": true,
1842
// "path": "circles/{circleId}",
1847
// "https://www.googleapis.com/auth/plus.circles.read",
1848
// "https://www.googleapis.com/auth/plus.login"
1854
// method id "plusDomains.circles.insert":
1856
type CirclesInsertCall struct {
1860
opt_ map[string]interface{}
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{})}
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)
1879
func (c *CirclesInsertCall) Do() (*Circle, error) {
1880
var body io.Reader = nil
1881
body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
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))
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{
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)
1903
defer googleapi.CloseBody(res)
1904
if err := googleapi.CheckResponse(res); err != nil {
1908
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1913
// "description": "Create a new circle for the authenticated user.",
1914
// "httpMethod": "POST",
1915
// "id": "plusDomains.circles.insert",
1916
// "parameterOrder": [
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,
1927
// "path": "people/{userId}/circles",
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"
1943
// method id "plusDomains.circles.list":
1945
type CirclesListCall struct {
1948
opt_ map[string]interface{}
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{})}
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
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
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)
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))
1991
if v, ok := c.opt_["pageToken"]; ok {
1992
params.Set("pageToken", fmt.Sprintf("%v", v))
1994
if v, ok := c.opt_["fields"]; ok {
1995
params.Set("fields", fmt.Sprintf("%v", v))
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{
2003
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2004
res, err := c.s.client.Do(req)
2008
defer googleapi.CloseBody(res)
2009
if err := googleapi.CheckResponse(res); err != nil {
2013
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2018
// "description": "List all of the circles for a user.",
2019
// "httpMethod": "GET",
2020
// "id": "plusDomains.circles.list",
2021
// "parameterOrder": [
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",
2032
// "type": "integer"
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",
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,
2046
// "path": "people/{userId}/circles",
2048
// "$ref": "CircleFeed"
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"
2059
// method id "plusDomains.circles.patch":
2061
type CirclesPatchCall struct {
2065
opt_ map[string]interface{}
2068
// Patch: Update a circle's description. This method supports patch
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
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)
2085
func (c *CirclesPatchCall) Do() (*Circle, error) {
2086
var body io.Reader = nil
2087
body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
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))
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,
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)
2109
defer googleapi.CloseBody(res)
2110
if err := googleapi.CheckResponse(res); err != nil {
2114
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2119
// "description": "Update a circle's description. This method supports patch semantics.",
2120
// "httpMethod": "PATCH",
2121
// "id": "plusDomains.circles.patch",
2122
// "parameterOrder": [
2127
// "description": "The ID of the circle to update.",
2128
// "location": "path",
2129
// "required": true,
2133
// "path": "circles/{circleId}",
2141
// "https://www.googleapis.com/auth/plus.circles.write",
2142
// "https://www.googleapis.com/auth/plus.login"
2148
// method id "plusDomains.circles.remove":
2150
type CirclesRemoveCall struct {
2153
opt_ map[string]interface{}
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
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)
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))
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,
2184
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2185
res, err := c.s.client.Do(req)
2189
defer googleapi.CloseBody(res)
2190
if err := googleapi.CheckResponse(res); err != nil {
2195
// "description": "Delete a circle.",
2196
// "httpMethod": "DELETE",
2197
// "id": "plusDomains.circles.remove",
2198
// "parameterOrder": [
2203
// "description": "The ID of the circle to delete.",
2204
// "location": "path",
2205
// "required": true,
2209
// "path": "circles/{circleId}",
2211
// "https://www.googleapis.com/auth/plus.circles.write",
2212
// "https://www.googleapis.com/auth/plus.login"
2218
// method id "plusDomains.circles.removePeople":
2220
type CirclesRemovePeopleCall struct {
2223
opt_ map[string]interface{}
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
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
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
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)
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))
2262
if v, ok := c.opt_["userId"]; ok {
2263
params.Set("userId", fmt.Sprintf("%v", v))
2265
if v, ok := c.opt_["fields"]; ok {
2266
params.Set("fields", fmt.Sprintf("%v", v))
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,
2274
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2275
res, err := c.s.client.Do(req)
2279
defer googleapi.CloseBody(res)
2280
if err := googleapi.CheckResponse(res); err != nil {
2285
// "description": "Remove a person from a circle.",
2286
// "httpMethod": "DELETE",
2287
// "id": "plusDomains.circles.removePeople",
2288
// "parameterOrder": [
2293
// "description": "The ID of the circle to remove the person from.",
2294
// "location": "path",
2295
// "required": true,
2299
// "description": "Email of the people to add to the circle. Optional, can be repeated.",
2300
// "location": "query",
2301
// "repeated": true,
2305
// "description": "IDs of the people to remove from the circle. Optional, can be repeated.",
2306
// "location": "query",
2307
// "repeated": true,
2311
// "path": "circles/{circleId}/people",
2313
// "https://www.googleapis.com/auth/plus.circles.write",
2314
// "https://www.googleapis.com/auth/plus.login"
2320
// method id "plusDomains.circles.update":
2322
type CirclesUpdateCall struct {
2326
opt_ map[string]interface{}
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
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)
2345
func (c *CirclesUpdateCall) Do() (*Circle, error) {
2346
var body io.Reader = nil
2347
body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
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))
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,
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)
2369
defer googleapi.CloseBody(res)
2370
if err := googleapi.CheckResponse(res); err != nil {
2374
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2379
// "description": "Update a circle's description.",
2380
// "httpMethod": "PUT",
2381
// "id": "plusDomains.circles.update",
2382
// "parameterOrder": [
2387
// "description": "The ID of the circle to update.",
2388
// "location": "path",
2389
// "required": true,
2393
// "path": "circles/{circleId}",
2401
// "https://www.googleapis.com/auth/plus.circles.write",
2402
// "https://www.googleapis.com/auth/plus.login"
2408
// method id "plusDomains.comments.get":
2410
type CommentsGetCall struct {
2413
opt_ map[string]interface{}
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
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)
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))
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,
2444
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2445
res, err := c.s.client.Do(req)
2449
defer googleapi.CloseBody(res)
2450
if err := googleapi.CheckResponse(res); err != nil {
2454
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2459
// "description": "Get a comment.",
2460
// "httpMethod": "GET",
2461
// "id": "plusDomains.comments.get",
2462
// "parameterOrder": [
2467
// "description": "The ID of the comment to get.",
2468
// "location": "path",
2469
// "required": true,
2473
// "path": "comments/{commentId}",
2475
// "$ref": "Comment"
2478
// "https://www.googleapis.com/auth/plus.login",
2479
// "https://www.googleapis.com/auth/plus.stream.read"
2485
// method id "plusDomains.comments.insert":
2487
type CommentsInsertCall struct {
2491
opt_ map[string]interface{}
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
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)
2510
func (c *CommentsInsertCall) Do() (*Comment, error) {
2511
var body io.Reader = nil
2512
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
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))
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,
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)
2534
defer googleapi.CloseBody(res)
2535
if err := googleapi.CheckResponse(res); err != nil {
2539
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2544
// "description": "Create a new comment in reply to an activity.",
2545
// "httpMethod": "POST",
2546
// "id": "plusDomains.comments.insert",
2547
// "parameterOrder": [
2552
// "description": "The ID of the activity to reply to.",
2553
// "location": "path",
2554
// "required": true,
2558
// "path": "activities/{activityId}/comments",
2560
// "$ref": "Comment"
2563
// "$ref": "Comment"
2566
// "https://www.googleapis.com/auth/plus.login",
2567
// "https://www.googleapis.com/auth/plus.stream.write"
2573
// method id "plusDomains.comments.list":
2575
type CommentsListCall struct {
2578
opt_ map[string]interface{}
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
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
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
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
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)
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))
2628
if v, ok := c.opt_["pageToken"]; ok {
2629
params.Set("pageToken", fmt.Sprintf("%v", v))
2631
if v, ok := c.opt_["sortOrder"]; ok {
2632
params.Set("sortOrder", fmt.Sprintf("%v", v))
2634
if v, ok := c.opt_["fields"]; ok {
2635
params.Set("fields", fmt.Sprintf("%v", v))
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,
2643
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2644
res, err := c.s.client.Do(req)
2648
defer googleapi.CloseBody(res)
2649
if err := googleapi.CheckResponse(res); err != nil {
2652
var ret *CommentFeed
2653
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2658
// "description": "List all of the comments for an activity.",
2659
// "httpMethod": "GET",
2660
// "id": "plusDomains.comments.list",
2661
// "parameterOrder": [
2666
// "description": "The ID of the activity to get comments for.",
2667
// "location": "path",
2668
// "required": true,
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",
2678
// "type": "integer"
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",
2686
// "default": "ascending",
2687
// "description": "The order in which to sort the list of comments.",
2692
// "enumDescriptions": [
2693
// "Sort oldest comments first.",
2694
// "Sort newest comments first."
2696
// "location": "query",
2700
// "path": "activities/{activityId}/comments",
2702
// "$ref": "CommentFeed"
2705
// "https://www.googleapis.com/auth/plus.login",
2706
// "https://www.googleapis.com/auth/plus.stream.read"
2712
// method id "plusDomains.media.insert":
2714
type MediaInsertCall struct {
2719
opt_ map[string]interface{}
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{})}
2730
c.collection = collection
2734
func (c *MediaInsertCall) Media(r io.Reader) *MediaInsertCall {
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)
2747
func (c *MediaInsertCall) Do() (*Media, error) {
2748
var body io.Reader = nil
2749
body, err := googleapi.WithoutDataWrapper.JSONReader(c.media)
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))
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")
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{
2769
"collection": c.collection,
2772
req.ContentLength = contentLength_
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)
2780
defer googleapi.CloseBody(res)
2781
if err := googleapi.CheckResponse(res); err != nil {
2785
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
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",
2800
// "multipart": true,
2801
// "path": "/resumable/upload/plusDomains/v1/people/{userId}/media/{collection}"
2804
// "multipart": true,
2805
// "path": "/upload/plusDomains/v1/people/{userId}/media/{collection}"
2809
// "parameterOrder": [
2818
// "enumDescriptions": [
2819
// "Upload the media to share on Google+."
2821
// "location": "path",
2822
// "required": true,
2826
// "description": "The ID of the user to create the activity on behalf of.",
2827
// "location": "path",
2828
// "required": true,
2832
// "path": "people/{userId}/media/{collection}",
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"
2844
// "supportsMediaUpload": true
2849
// method id "plusDomains.people.get":
2851
type PeopleGetCall struct {
2854
opt_ map[string]interface{}
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{})}
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)
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))
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{
2885
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2886
res, err := c.s.client.Do(req)
2890
defer googleapi.CloseBody(res)
2891
if err := googleapi.CheckResponse(res); err != nil {
2895
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2900
// "description": "Get a person's profile.",
2901
// "httpMethod": "GET",
2902
// "id": "plusDomains.people.get",
2903
// "parameterOrder": [
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,
2914
// "path": "people/{userId}",
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"
2929
// method id "plusDomains.people.list":
2931
type PeopleListCall struct {
2935
opt_ map[string]interface{}
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{})}
2942
c.collection = collection
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
2955
// OrderBy sets the optional parameter "orderBy": The order to return
2957
func (c *PeopleListCall) OrderBy(orderBy string) *PeopleListCall {
2958
c.opt_["orderBy"] = orderBy
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
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)
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))
2986
if v, ok := c.opt_["orderBy"]; ok {
2987
params.Set("orderBy", fmt.Sprintf("%v", v))
2989
if v, ok := c.opt_["pageToken"]; ok {
2990
params.Set("pageToken", fmt.Sprintf("%v", v))
2992
if v, ok := c.opt_["fields"]; ok {
2993
params.Set("fields", fmt.Sprintf("%v", v))
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{
3000
"collection": c.collection,
3002
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3003
res, err := c.s.client.Do(req)
3007
defer googleapi.CloseBody(res)
3008
if err := googleapi.CheckResponse(res); err != nil {
3012
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3017
// "description": "List all of the people in the specified collection.",
3018
// "httpMethod": "GET",
3019
// "id": "plusDomains.people.list",
3020
// "parameterOrder": [
3026
// "description": "The collection of people to list.",
3030
// "enumDescriptions": [
3031
// "The list of people who this user has added to one or more circles."
3033
// "location": "path",
3034
// "required": true,
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",
3044
// "type": "integer"
3047
// "description": "The order to return people in.",
3052
// "enumDescriptions": [
3053
// "Order the people by their display name.",
3054
// "Order people based on the relevence to the viewer."
3056
// "location": "query",
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",
3065
// "description": "Get the collection of people for the person identified. Use \"me\" to indicate the authenticated user.",
3066
// "location": "path",
3067
// "required": true,
3071
// "path": "people/{userId}/people/{collection}",
3073
// "$ref": "PeopleFeed"
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"
3084
// method id "plusDomains.people.listByActivity":
3086
type PeopleListByActivityCall struct {
3090
opt_ map[string]interface{}
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
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
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
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)
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))
3135
if v, ok := c.opt_["pageToken"]; ok {
3136
params.Set("pageToken", fmt.Sprintf("%v", v))
3138
if v, ok := c.opt_["fields"]; ok {
3139
params.Set("fields", fmt.Sprintf("%v", v))
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,
3148
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3149
res, err := c.s.client.Do(req)
3153
defer googleapi.CloseBody(res)
3154
if err := googleapi.CheckResponse(res); err != nil {
3158
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
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": [
3172
// "description": "The ID of the activity to get the list of people for.",
3173
// "location": "path",
3174
// "required": true,
3178
// "description": "The collection of people to list.",
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."
3189
// "location": "path",
3190
// "required": true,
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",
3200
// "type": "integer"
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",
3208
// "path": "activities/{activityId}/people/{collection}",
3210
// "$ref": "PeopleFeed"
3213
// "https://www.googleapis.com/auth/plus.login",
3214
// "https://www.googleapis.com/auth/plus.stream.read"
3220
// method id "plusDomains.people.listByCircle":
3222
type PeopleListByCircleCall struct {
3225
opt_ map[string]interface{}
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
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
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
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)
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))
3268
if v, ok := c.opt_["pageToken"]; ok {
3269
params.Set("pageToken", fmt.Sprintf("%v", v))
3271
if v, ok := c.opt_["fields"]; ok {
3272
params.Set("fields", fmt.Sprintf("%v", v))
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,
3280
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3281
res, err := c.s.client.Do(req)
3285
defer googleapi.CloseBody(res)
3286
if err := googleapi.CheckResponse(res); err != nil {
3290
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3295
// "description": "List all of the people who are members of a circle.",
3296
// "httpMethod": "GET",
3297
// "id": "plusDomains.people.listByCircle",
3298
// "parameterOrder": [
3303
// "description": "The ID of the circle to get the members of.",
3304
// "location": "path",
3305
// "required": true,
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",
3315
// "type": "integer"
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",
3323
// "path": "circles/{circleId}/people",
3325
// "$ref": "PeopleFeed"
3328
// "https://www.googleapis.com/auth/plus.circles.read",
3329
// "https://www.googleapis.com/auth/plus.login"