Esempio 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));
        }
Esempio 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);
 }
Esempio 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);
 }