/// <summary> /// Setting with url, query and path params and toaster settings /// </summary> /// <param name="url"></param> /// <param name="queryParameters"></param> /// <param name="pathParameters"></param> /// <param name="toasterSettings"></param> public HttpSettings(string url, HttpQueryParameters queryParameters, HttpPathParameters pathParameters, ToasterSettings toasterSettings) { this.SetUrl(url); this.QueryParameters = queryParameters ?? new HttpQueryParameters(); this.PathParameters = pathParameters ?? new HttpPathParameters(); this.ToasterSettings = toasterSettings ?? new ToasterSettings(); }
/// <summary> /// Setting with url, query and path params and toaster caption /// </summary> /// <param name="url"></param> /// <param name="queryParameters"></param> /// <param name="pathParameters"></param> /// <param name="toasterCaption"></param> public HttpSettings(string url, HttpQueryParameters queryParameters, HttpPathParameters pathParameters, string toasterCaption) { this.SetUrl(url); this.QueryParameters = queryParameters ?? new HttpQueryParameters(); this.PathParameters = pathParameters ?? new HttpPathParameters(); this.ToasterSettings = string.IsNullOrEmpty(toasterCaption) ? new ToasterSettings() : new ToasterSettings(toasterCaption); }
public async Task <List <TList> > GetAll(string orderBy, string direction = "asc") { var queryParams = new HttpQueryParameters(); if (!string.IsNullOrEmpty(orderBy)) { queryParams.Add("orderBy", orderBy); } if (!string.IsNullOrEmpty(direction)) { queryParams.Add("direction", direction); } var settings = new HttpSettings($"{this.Url}", queryParams, null); return(await this.Http.Get <List <TList> >(settings)); }