public override List<OrganisationalUnit> GetOrganisationalUnits(Municipality municipality) { var rawJson = string.Empty; /* * http://api.kolada.se/v2/ou?municipality=1290 * This is the URL that returns organisational units based on monicipality Id. * This is exactly what we need. */ var BaseUrlGetOperators = BaseUrl + "ou?" + "municipality=" + municipality.Id; var request = (HttpWebRequest)WebRequest.Create(BaseUrlGetOperators); using (var response = request.GetResponse()) using (var reader = new StreamReader(response.GetResponseStream())) { rawJson = reader.ReadToEnd(); } var OU = JsonConvert.DeserializeObject<OrganisationalUnits>(rawJson).Values; return OU; }
public IEnumerable<OperationalUnit> GetTownOperators(Municipality municipality, Category category) { //Method added becouse project would not compile without it!! throw new NotImplementedException(); }
//Methods public List<OperationalUnit> GetTownOperators(Municipality municipality, Category category) { return _townWebService.GetTownOperators(municipality, category); }
public List<OperationalUnit> GetTownOperators(Municipality municipality, Category category) { throw new NotImplementedException(); }
public abstract List<OrganisationalUnit> GetOrganisationalUnits(Municipality municipiality);