コード例 #1
0
        public RequestMessage Build()
        {
            var qs = new List <string>();

            if (_page != null)
            {
                qs.Add(_page.ToQueryString());
            }
            if (_instrument != null)
            {
                qs.Add("instrument={0}".Uri(_instrument));
            }
            if (_status != null)
            {
                qs.Add("status={0}".Uri(_status));
            }

            var qss = qs.Any()
                                ? "?" + string.Join("&", qs)
                                : string.Empty;

            return(new RequestMessage {
                Method = HttpMethod.Get,
                RequestUri = new Uri("/v1/wallets/{0}/orders{1}".Uri(_walletId, qss), UriKind.Relative)
            });
        }
コード例 #2
0
 public RequestMessage Build()
 {
     return(new RequestMessage {
         Method = HttpMethod.Get,
         RequestUri = new Uri("/v1/wallets?userId={0}&{1}"
                              .Uri(_userId, _page.ToQueryString()), UriKind.Relative)
     });
 }