/// <summary> /// Get the data values for the specific site, variable and time range as a list of Series objects /// </summary> /// <param name="siteCode">the full site code (networkPrefix:siteCode)</param> /// <param name="variableCode">the full variable code (vocabularyPrefix:variableCode)</param> /// <param name="startTime">the start date/time</param> /// <param name="endTime">the end date/time</param> /// <returns>The data series. Each data series object includes a list of data values, /// site, variable, method, source and quality control level information.</returns> /// <remarks>Usually the list of Series returned will only contain one series. However in some /// cases, it will contain two or more series with the same site code and variable code, but /// with a different method or quality control level</remarks> public IList <Series> GetValues(string siteCode, string variableCode, DateTime startTime, DateTime endTime) { IList <Series> result; var req = WebServiceHelper.CreateGetValuesRequest(_serviceURL, siteCode, variableCode, startTime, endTime); using (var resp = (HttpWebResponse)req.GetResponse()) { using (var stream = resp.GetResponseStream()) { result = _parser.ParseGetValues(stream); } } return(result); }
/// <summary> /// Get the data values for the specific site, variable and time range as a list of Series objects /// </summary> /// <param name="siteCode">the full site code (networkPrefix:siteCode)</param> /// <param name="variableCode">the full variable code (vocabularyPrefix:variableCode)</param> /// <param name="startTime">the start date/time</param> /// <param name="endTime">the end date/time</param> /// <returns>The data series. Each data series object includes a list of data values, /// site, variable, method, source and quality control level information.</returns> /// <remarks>Usually the list of Series returned will only contain one series. However in some /// cases, it will contain two or more series with the same site code and variable code, but /// with a different method or quality control level</remarks> public IList <Series> GetValues(string siteCode, string variableCode, DateTime startTime, DateTime endTime) { string xmlFile = GetValuesXML(siteCode, variableCode, startTime, endTime); return(_parser.ParseGetValues(xmlFile)); }