本文整理汇总了C#中Request.addQueryString方法的典型用法代码示例。如果您正苦于以下问题:C# Request.addQueryString方法的具体用法?C# Request.addQueryString怎么用?C# Request.addQueryString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Request
的用法示例。
在下文中一共展示了Request.addQueryString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: List
/// <summary>
/// Get a paginated list of scan forms.
/// </summary>
/// Optional dictionary containing parameters to filter the list with. Valid pairs:
/// * {"before_id", string} String representing a ScanForm ID. Starts with "sf_". Only retrieve ScanForms created before this id. Takes precedence over after_id.
/// * {"after_id", string} String representing a ScanForm ID. Starts with "sf_". Only retrieve ScanForms created after this id.
/// * {"start_datetime", string} ISO 8601 datetime string. Only retrieve ScanForms created after this datetime.
/// * {"end_datetime", string} ISO 8601 datetime string. Only retrieve ScanForms created before this datetime.
/// * {"page_size", int} Max size of list. Default to 20.
/// All invalid keys will be ignored.
/// <param name="parameters">
/// </param>
/// <returns>Instance of EasyPost.ScanForm</returns>
public static ScanFormList List(Dictionary<string, object> parameters = null)
{
Request request = new Request("scan_forms");
request.addQueryString(parameters ?? new Dictionary<string, object>());
ScanFormList scanFormList = request.Execute<ScanFormList>();
scanFormList.filters = parameters;
return scanFormList;
}
示例2: List
/// <summary>
/// Get a paginated list of shipments.
/// </summary>
/// Optional dictionary containing parameters to filter the list with. Valid pairs:
/// * {"before_id", string} String representing a Shipment. Starts with "shp_". Only retrieve shipments created before this id. Takes precedence over after_id.
/// * {"after_id", string} String representing a Shipment. Starts with "shp_". Only retrieve shipments created after this id.
/// * {"page_size", int} Size of page. Default to 20.
/// * {"purchased", bool} If true only display purchased shipments.
/// All invalid keys will be ignored.
/// <param name="parameters">
/// </param>
/// <returns>Instance of EasyPost.ShipmentList</returns>
public static ShipmentList List(Dictionary<string, object> parameters = null)
{
Request request = new Request("shipments");
request.addQueryString(parameters ?? new Dictionary<string, object>());
ShipmentList shipmentList = request.Execute<ShipmentList>();
shipmentList.filters = parameters;
return shipmentList;
}