hi sanjeev,
you need to define 2 structs, one for the api key and the other for
the search params.
like so:
[XmlRpcMissingMapping(MappingAction.Error)] public struct Category
{
public int id;
[XmlRpcMember("api_key")] public string ApiKey;
}
[XmlRpcMissingMapping(MappingAction.Ignore)] public struct
SearchRequest
{
[XmlRpcMember("language_id")] public int LanguageID
[XmlRpcMember("words")] public string Words
[XmlRpcMember("creator_id")] public int CreatorID
[XmlRpcMember("cat1_id")] public int Category1ID
[XmlRpcMember("cat2_id")] public int Category2ID
[XmlRpcMember("gallery_id")] public int GalleryID
[XmlRpcMember("color_name")] public string ColorName
[XmlRpcMember("country_id")] public int CountryID
[XmlRpcMember("media_id")] public int MediaID
[XmlRpcMember("model_id")] public int ModelID
[XmlRpcMember("serie_id")] public int SerieID
[XmlRpcMember("similia_id")] public int SimiliaID
// TODO: filters
[XmlRpcMember("order")] public string Order
[XmlRpcMember("limit")] public int Limit
[XmlRpcMember("offset")] public int Offset
[XmlRpcMember("thumbnail_size")] public int ThumbnailSize
[XmlRpcMember("detail_level")] public int DetailLevel
}
define the function like this:
[XmlRpcMethod("xmlrpc.getSearchResults")] SearchResult
GetSearchResults(Auth ApiKey, SearchRequest Paras)
where SearchResult is the struct for the response.
i dind'nt find out how to handle the response, because the result
items
has numbers as names and with that i found no way to define an
struct.
if you have an solution let me know.
best regards,
bender
>
sanj...@gmail.com