public static RestRequest AddHeaders( this RestRequest request, ITicketSettings settings) { request.AddHeader("Content-Type", settings.ContentType); return(request); }
public static RestRequest AddQueryParameters( this RestRequest request, ITicketSettings settings, string origin, string destination) { request.AddQueryParameter("origin", origin); request.AddQueryParameter("destination", destination); foreach (var key in settings.Values.Keys) { request.AddQueryParameter(key, settings.Values[key]); } return(request); }
public TicketSearcher(ITicketSettings searchSettings) { Settings = searchSettings ?? throw new System.ArgumentNullException(nameof(searchSettings)); Client = new RestClient(Settings.Url); }