using System.Collections.Generic; using System.ServiceModel; using System.ServiceModel.Web; using WeatherService.Devices; using WeatherService.Remote; using WeatherService.Values; namespace WeatherService { [ServiceContract] public interface IWeatherService { [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] List GetDevices(); [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] ReadingBase GetLatestReading(string deviceAddress, WeatherValueType valueType); [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] DeviceHistory GetDeviceHistory(string deviceAddress); [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] Dictionary> GetDeviceHistoryByValueType(WeatherValueType valueType); [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] Dictionary> GetWindSpeedHistory(int groupIntervalMinutes); [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] Dictionary GetWindDirectionHistory(); } }