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


C# Request.addQueryString方法代码示例

本文整理汇总了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;
        }
开发者ID:dmmatson,项目名称:easypost-csharp,代码行数:22,代码来源:ScanForm.cs

示例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;
        }
开发者ID:swrhim,项目名称:EasyPostPoC,代码行数:21,代码来源:Shipment.cs


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