private async Task <MarsData> GetAsync(DateTime?earthDate = null, CameraName?camera = null, int?sol = null, int page = 1) { var messageArgs = new MessageArgs { { "page", page } }; if (earthDate != null) { messageArgs.Add("earth_date", earthDate.Value.ToDefault()); } if (camera != null) { messageArgs.Add("camera", camera); } if (sol != null) { messageArgs.Add("sol", sol); } var result = await Request <MarsData>(messageArgs); return(result); }
public async Task <ApodModel> GetAsync(DateTime?date = null, bool highDefinition = false) { var messageArgs = new MessageArgs { { "hd", highDefinition ? "True" : "False" } }; if (date != null) { messageArgs.Add("date", date.Value.ToDefault()); } var result = await Request <ApodModel>(messageArgs); return(result); }
public async Task <AsteroidsFeedData> GetAsync(DateTime startDate, DateTime?endDate = null) { var messageArgs = new MessageArgs { { "start_date", startDate.ToDefault() } }; if (endDate != null) { messageArgs.Add("end_date", endDate.Value.ToDefault()); } var result = await Request <AsteroidsFeedData>(messageArgs); return(result); }
public async Task <EarthAssetsData> GetAsync(double latitude, double longitude, DateTime?date = null, double sizeInDegrees = 0.25) { var message = new MessageArgs { { "lat", latitude }, { "lon", longitude }, { "dim", sizeInDegrees } }; if (date != null) { message.Add("date", date.Value.ToDefault()); } var result = await Request <EarthAssetsData>(message); return(result); }
public async Task <byte[]> GetAsync(double latitude, double longitude, DateTime?date = null, double sizeInDegrees = 0.25, bool cloudScore = false) { var message = new MessageArgs { { "lat", latitude }, { "lon", longitude }, { "dim", sizeInDegrees }, { "cloud_score", cloudScore } }; if (date != null) { message.Add("date", date.Value.ToDefault()); } var result = await RequestBinary(message); return(result); }
public async Task <TleResult> GetAsync(string query, SortField sortField, SortDirection sortDirection, int page, int pageSize, string pseudoRandomNoise = null) { var message = new MessageArgs(); if (!string.IsNullOrWhiteSpace(query)) { message.Add("search", query); } if (!string.IsNullOrWhiteSpace(pseudoRandomNoise)) { message.Add("prn", pseudoRandomNoise); } message.Add("sort", sortField); message.Add("sort-dir", sortDirection); message.Add("page", page); message.Add("page-size", pageSize); var result = await Request <TleResult>(message); return(result); }
public new TransitionValidationFailed AddMessageArgs(string key, string value) { MessageArgs.Add(key, value); return(this); }