/// <summary> /// List all of the comments for an activity. /// Documentation https://developers.google.com/plus/v1/reference/comments/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="activityId">The ID of the activity to get comments for.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>CommentFeedResponse</returns> public static CommentFeed List(plusService service, string activityId, CommentsListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (activityId == null) { throw new ArgumentNullException(activityId); } // Building the initial request. var request = service.Comments.List(activityId); // Applying optional parameters to the request. request = (CommentsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Comments.List failed.", ex); } }
/// <summary> /// Search public activities. /// Documentation https://developers.google.com/plus/v1/reference/activities/search /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="query">Full-text search query string.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>ActivityFeedResponse</returns> public static ActivityFeed Search(plusService service, string query, ActivitiesSearchOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (query == null) { throw new ArgumentNullException(query); } // Building the initial request. var request = service.Activities.Search(query); // Applying optional parameters to the request. request = (ActivitiesResource.SearchRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Activities.Search failed.", ex); } }
/// <summary> /// List all of the activities in the specified collection for a particular user. /// Documentation https://developers.google.com/plus/v1/reference/activities/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="userId">The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.</param> /// <param name="collection">The collection of activities to list.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>ActivityFeedResponse</returns> public static ActivityFeed List(plusService service, string userId, string collection, ActivitiesListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (userId == null) { throw new ArgumentNullException(userId); } if (collection == null) { throw new ArgumentNullException(collection); } // Building the initial request. var request = service.Activities.List(userId, collection); // Applying optional parameters to the request. request = (ActivitiesResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Activities.List failed.", ex); } }
/// <summary> /// List all of the people in the specified collection for a particular activity. /// Documentation https://developers.google.com/plus/v1/reference/people/listByActivity /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="activityId">The ID of the activity to get the list of people for.</param> /// <param name="collection">The collection of people to list.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>PeopleFeedResponse</returns> public static PeopleFeed ListByActivity(plusService service, string activityId, string collection, PeopleListByActivityOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (activityId == null) { throw new ArgumentNullException(activityId); } if (collection == null) { throw new ArgumentNullException(collection); } // Building the initial request. var request = service.People.ListByActivity(activityId, collection); // Applying optional parameters to the request. request = (PeopleResource.ListByActivityRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request People.ListByActivity failed.", ex); } }
/// <summary> /// Get a comment. /// Documentation https://developers.google.com/plus/v1/reference/comments/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="commentId">The ID of the comment to get.</param> /// <returns>CommentResponse</returns> public static Comment Get(plusService service, string commentId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (commentId == null) { throw new ArgumentNullException(commentId); } // Make the request. return(service.Comments.Get(commentId).Execute()); } catch (Exception ex) { throw new Exception("Request Comments.Get failed.", ex); } }
/// <summary> /// Get an activity. /// Documentation https://developers.google.com/plus/v1/reference/activities/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="activityId">The ID of the activity to get.</param> /// <returns>ActivityResponse</returns> public static Activity Get(plusService service, string activityId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (activityId == null) { throw new ArgumentNullException(activityId); } // Make the request. return(service.Activities.Get(activityId).Execute()); } catch (Exception ex) { throw new Exception("Request Activities.Get failed.", ex); } }
/// <summary> /// 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. /// Documentation https://developers.google.com/plus/v1/reference/people/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated plus service.</param> /// <param name="userId">The ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user.</param> /// <returns>PersonResponse</returns> public static Person Get(plusService service, string userId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (userId == null) { throw new ArgumentNullException(userId); } // Make the request. return(service.People.Get(userId).Execute()); } catch (Exception ex) { throw new Exception("Request People.Get failed.", ex); } }