You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

3941 rivejä
145 KiB

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