Minimum Parameters in getSearchResults request

20 views
Skip to first unread message

san...@gmail.com

unread,
Apr 3, 2008, 1:15:44 AM4/3/08
to Fotolia API
Hi,

I am using Fotolia API using ASP.Net with C#. I am using
getSearchResults method with following parameters

APIKey, LanguageID, words, limit as given below :

GetSearchResponse[] GetSearchResults(string strApiKey, int
language_id, string words, int limit);

But the response contains following error :

--------- Server returned a fault exception: [623] Calling parameters
do not match signature


Can You please suggest me what are the minimum no. of parameters can
be passed to getSearchResult request.


thanks & regards

sanjeev kumar
san...@gmail.com




bender

unread,
Apr 8, 2008, 8:06:58 PM4/8/08
to Fotolia API
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
Reply all
Reply to author
Forward
0 new messages