public ApiUrlBuilder WithTagAndPeriod(string tag, string period) { MakeSure.ArgumentNotNull(tag, nameof(tag)); MakeSure.ArgumentNotNull(period, nameof(period)); _apiUrl = _apiUrl + $"{tag}/{period}"; return(this); }
public ApiUrlBuilder WithIds(List <string> ids, string route = "") { MakeSure.ArgumentNotNullOrEmptyEnumerable(ids, nameof(ids)); var idsToEncode = string.Join(";", ids.ToArray()); if (string.IsNullOrEmpty(route) || string.IsNullOrWhiteSpace(route)) { _apiUrl = _apiUrl + $"{HttpUtility.UrlEncode(idsToEncode)}"; } else { _apiUrl = _apiUrl + $"{HttpUtility.UrlEncode(idsToEncode)}/{route}"; } return(this); }
public ApiUrlBuilder WithFilter(Filter filter, string inName = "") { MakeSure.ArgumentNotNull(filter, nameof(filter)); if (string.IsNullOrEmpty(inName) || string.IsNullOrWhiteSpace(inName)) { _filter = filter.GetQueryParams(); } else { _filter = $"{filter.GetQueryParams()}&inname={inName}"; } return(this); }