/// <summary> /// Updates a MobileAppPanel. Currently the only property that can be updated is the owners property. /// Documentation https://developers.google.com/consumersurveys/v2/reference/mobileapppanels/update /// 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 ConsumerSurveys service.</param> /// <param name="panelId">External URL ID for the panel.</param> /// <param name="body">A valid ConsumerSurveys v2 body.</param> /// <returns>MobileAppPanelResponse</returns> public static MobileAppPanel Update(ConsumerSurveysService service, string panelId, MobileAppPanel body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (panelId == null) { throw new ArgumentNullException(panelId); } // Make the request. return(service.Mobileapppanels.Update(body, panelId).Execute()); } catch (Exception ex) { throw new Exception("Request Mobileapppanels.Update failed.", ex); } }
/// <summary> /// Updates a survey. Currently the only property that can be updated is the owners property. /// Documentation https://developers.google.com/consumersurveys/v2/reference/surveys/update /// 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 ConsumerSurveys service.</param> /// <param name="surveyUrlId">External URL ID for the survey.</param> /// <param name="body">A valid ConsumerSurveys v2 body.</param> /// <returns>SurveyResponse</returns> public static Survey Update(ConsumerSurveysService service, string surveyUrlId, Survey body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (surveyUrlId == null) { throw new ArgumentNullException(surveyUrlId); } // Make the request. return(service.Surveys.Update(body, surveyUrlId).Execute()); } catch (Exception ex) { throw new Exception("Request Surveys.Update failed.", ex); } }
/// <summary> /// Begins running a survey. /// Documentation https://developers.google.com/consumersurveys/v2/reference/surveys/start /// 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 ConsumerSurveys service.</param> /// <param name="resourceId">NA</param> /// <param name="body">A valid ConsumerSurveys v2 body.</param> /// <returns>SurveysStartResponseResponse</returns> public static SurveysStartResponse Start(ConsumerSurveysService service, string resourceId, SurveysStartRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (resourceId == null) { throw new ArgumentNullException(resourceId); } // Make the request. return(service.Surveys.Start(body, resourceId).Execute()); } catch (Exception ex) { throw new Exception("Request Surveys.Start failed.", ex); } }
/// <summary> /// Creates a survey. /// Documentation https://developers.google.com/consumersurveys/v2/reference/surveys/insert /// 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 ConsumerSurveys service.</param> /// <param name="body">A valid ConsumerSurveys v2 body.</param> /// <returns>SurveyResponse</returns> public static Survey Insert(ConsumerSurveysService service, Survey body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } // Make the request. return(service.Surveys.Insert(body).Execute()); } catch (Exception ex) { throw new Exception("Request Surveys.Insert failed.", ex); } }
/// <summary> /// Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. You must add "?alt=media" to the URL as an argument to get results. /// Documentation https://developers.google.com/consumersurveys/v2/reference/results/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 ConsumerSurveys service.</param> /// <param name="surveyUrlId">External URL ID for the survey.</param> /// <returns>SurveyResultsResponse</returns> public static SurveyResults Get(ConsumerSurveysService service, string surveyUrlId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (surveyUrlId == null) { throw new ArgumentNullException(surveyUrlId); } // Make the request. return(service.Results.Get(surveyUrlId).Execute()); } catch (Exception ex) { throw new Exception("Request Results.Get failed.", ex); } }
/// <summary> /// Lists the MobileAppPanels available to the authenticated user. /// Documentation https://developers.google.com/consumersurveys/v2/reference/mobileapppanels/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 ConsumerSurveys service.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>MobileAppPanelsListResponseResponse</returns> public static MobileAppPanelsListResponse List(ConsumerSurveysService service, MobileapppanelsListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } // Building the initial request. var request = service.Mobileapppanels.List(); // Applying optional parameters to the request. request = (MobileapppanelsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Mobileapppanels.List failed.", ex); } }