<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <region:regions xmlns:region="http://rest.immobilienscout24.de/schema/search/region/1.0"> <region> <name>Porta Westfalica</name> <geoCodeId>1276010032008</geoCodeId> <amount>0</amount> </region> </region:regions>
namespace ImmoScout24RestApiTest.Models
{
class RegionInfo
{
public string Name { get; set; }
public int GeoCodeId { get; set; }
public int Amount { get; set; }
}
}
var geoRequest = new RestRequest { Resource = "restapi/api/search/v1.0/region" };
geoRequest.AddParameter("q", "porta");
IRestResponse response = client.Execute<List<RegionInfo>>(geoRequest);
Felix,
Execute<T> actually returns an IRestResponse<T> instance. IRestResponse<T> is a subinterface of IRestResponse that adds the Data property.
-pete
--
You received this message because you are subscribed to the Google Groups "RestSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to restsharp+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.