Ejemplo n.º 1
0
        private async Task <RequestResult <T> > ExecuteGetCoreAsync <T>(string path, string resultRootElt, Parameterizable queryParams, string fields, CancellationToken cancellationToken)
        {
            var req = PrepareRequest(path);

            if (queryParams != null)
            {
                req.QueryParams.AddRange(queryParams.ToQueryParameters());
            }

            if (!string.IsNullOrEmpty(fields))
            {
                req.QueryParams.Add("fields", fields);
            }

            return(await ExecuteRequestAsync <T>(req, HttpMethod.Get, cancellationToken : cancellationToken, rootElement : resultRootElt));
        }
Ejemplo n.º 2
0
 protected async Task <T> ExecuteGetAsync <T>(string path, string resultRootElt, Parameterizable queryParams = null, CancellationToken cancellationToken = default)
 {
     return((await ExecuteGetCoreAsync <T>(path, resultRootElt, queryParams, null, cancellationToken)).Result);
 }
Ejemplo n.º 3
0
 protected async Task <T> ExecuteGetAsync <T>(string path, string resultRootElt, Parameterizable queryParams = null)
 {
     return((await ExecuteGetCoreAsync <T>(path, resultRootElt, queryParams, null)).Result);
 }