当前位置: 首页>>代码示例>>C#>>正文


C# RequestSettings.Add方法代码示例

本文整理汇总了C#中RequestSettings.Add方法的典型用法代码示例。如果您正苦于以下问题:C# RequestSettings.Add方法的具体用法?C# RequestSettings.Add怎么用?C# RequestSettings.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RequestSettings的用法示例。


在下文中一共展示了RequestSettings.Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetResponseCounts

 public Collector GetResponseCounts(long collectorId)
 {
     try {
         const string endPoint = "/surveys/get_response_counts";
         var parameters = new RequestSettings();
         parameters.Add("collector_id", collectorId.ToString());
         var o = MakeApiRequest(endPoint, parameters);
         Collector collector = o.ToObject<Collector>();
         return collector;
     }
     catch (Exception e)
     {
         throw new SurveyMonkeyException("Error communicating with endpoint", e);
     }
 }
开发者ID:jspraul,项目名称:SurveyMonkeyApi,代码行数:15,代码来源:SurveyMonkeyApi.Endpoints.cs

示例2: CreateRecipients

		private RecipientReport CreateRecipients(long collectorId, List<Recipient> recipients, object settings)
		{
			RequestSettings parameters = new RequestSettings();
			parameters.Add("collector_id", collectorId.ToString());
			parameters.Add("recipients", recipients);
			return CreateRecipientsRequest(parameters);
		}
开发者ID:jspraul,项目名称:SurveyMonkeyApi,代码行数:7,代码来源:SurveyMonkeyApi.Endpoints.cs

示例3: GetResponsesRequest

 private List<Response> GetResponsesRequest(long surveyId, List<long> respondents)
 {
     try
     {
         const string endPoint = "/surveys/get_responses";
         var parameters = new RequestSettings();
         parameters.Add("survey_id", surveyId.ToString());
         parameters.Add("respondent_ids", respondents.Select(r => r.ToString()));
         var o = MakeApiRequest(endPoint, parameters);
         List<Response> responses = o.ToObject<List<Response>>();
         return responses;
     }
     catch (Exception e)
     {
         throw new SurveyMonkeyException("Error communicating with endpoint", e);
     }
 }
开发者ID:jspraul,项目名称:SurveyMonkeyApi,代码行数:17,代码来源:SurveyMonkeyApi.Endpoints.cs

示例4: GetSurveyDetails

 public Survey GetSurveyDetails(long surveyId)
 {
     try {
         const string endPoint = "/surveys/get_survey_details";
         var parameters = new RequestSettings();
         parameters.Add("survey_id", surveyId.ToString());
         var o = MakeApiRequest(endPoint, parameters);
         JsonDeserializeGetSurveyDetails rawSurvey = o.ToObject<JsonDeserializeGetSurveyDetails>();
         Survey survey = rawSurvey.ToSurvey();
         return survey;
     }
     catch (Exception e)
     {
         throw new SurveyMonkeyException("Error communicating with endpoint", e);
     }
 }
开发者ID:jspraul,项目名称:SurveyMonkeyApi,代码行数:16,代码来源:SurveyMonkeyApi.Endpoints.cs


注:本文中的RequestSettings.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。