本文整理汇总了C#中IRestRequest.AddQueryParameter方法的典型用法代码示例。如果您正苦于以下问题:C# IRestRequest.AddQueryParameter方法的具体用法?C# IRestRequest.AddQueryParameter怎么用?C# IRestRequest.AddQueryParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRestRequest
的用法示例。
在下文中一共展示了IRestRequest.AddQueryParameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Apply
internal void Apply(IRestRequest request)
{
_ops.ForEach((op) =>
{
request.AddQueryParameter(op.Type.ToString(), op.Value);
});
}
示例2: FillExtended
private IRestRequest FillExtended(IRestRequest request, TraktExtendEnum extended)
{
string extendedText;
switch (extended)
{
case TraktExtendEnum.MIN:
extendedText = "min";
break;
case TraktExtendEnum.IMAGES:
extendedText = "images";
break;
case TraktExtendEnum.FULL:
extendedText = "full";
break;
case TraktExtendEnum.FULL_IMAGES:
extendedText = "full,images";
break;
case TraktExtendEnum.METADATA:
extendedText = "metadata";
break;
default:
extendedText = "min";
break;
}
return request.AddQueryParameter("extended", extendedText);
}
示例3: SetAssetQuerystring
/// <summary>
/// Sets the proper querystring for getting or deleting a single asset.
/// </summary>
/// <param name="req">The request to modify.</param>
/// <param name="key">The key value of the asset, e.g. 'templates/index.liquid' or 'assets/bg-body.gif'.</param>
/// <param name="themeId">The id of the theme that the asset belongs to.</param>
/// <returns>The request with the proper querystring.</returns>
IRestRequest SetAssetQuerystring(IRestRequest req, string key, long themeId)
{
//QS should look like:
//?asset[key]={key}&theme_id={themeId}
req.AddQueryParameter("asset[key]", key);
req.AddQueryParameter("theme_id", themeId.ToString());
return req;
}