logo       

Re: [Flickr APIs] Flickr .NET Library: msg#00020

web.flickr.api

Subject: Re: [Flickr APIs] Flickr .NET Library

: I'm posting here (and in the API Group
(http://www.flickr.com/groups/api/))
: to prompt a discussion on how (and what) we should return from our
methods.

the perl api kit returns a structure containing a
few things:
http://search.cpan.org/~iamcal/Flickr-API-0.02/API/Response.pm

the request that was made and the success status of
the request are the main elements. if the request
was sucessful then the 'tree' slot is filled with
a parse tree of the xml response. if the request
failed then the error code and message slots are
filled.

this allows us to change the transport behind the
scenes (rest, xmlrpc, soap, whatever we add) and
the interface will stay the same. returning a
single value is of little use for the data fetching
methods. perhaps in the C idiom you'd return a
success bool and have an in/out parameter that
gets filled with a response object as detailed
above.


--cal




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise