PDA

View Full Version : Feature Request: API calls with no return data


devbobo
Mar-10-2005, 02:22 PM
Don,

I am currently in the process of building a Firefox extension for Smugmug using the nsIXmlRpcClient interface.

The problem that I have found is when I do a function call (eg. getImages on an empty album) where no data exists, the API returns unpopulated XML, however, the nsIXmlRpcClient interface in this situation doesn't fire the onResult function.

Under these conditions, it makes it extremely difficult to do cleanup on asynchronous events, especially when trying to give user feedback on loading status, etc.

I was hoping that you might be able to include a BOOL or INT into result of set function calls, so that some sort of information always exists.

I am open to other suggestions http://dgrin.com/images/smilies/ne_nau.gif

Thanks,

David

onethumb
Mar-10-2005, 03:00 PM
Don,

I am currently in the process of building a Firefox extension for Smugmug using the nsIXmlRpcClient interface.

The problem that I have found is when I do a function call (eg. getImages on an empty album) where no data exists, the API returns unpopulated XML, however, the nsIXmlRpcClient interface in this situation doesn't fire the onResult function.

Under these conditions, it makes it extremely difficult to do cleanup on asynchronous events, especially when trying to give user feedback on loading status, etc.

I was hoping that you might be able to include a BOOL or INT into result of set function calls, so that some sort of information always exists.

I am open to other suggestions http://dgrin.com/images/smilies/ne_nau.gif

Thanks,

David

The best thing to do might be to return a fault code of "no images found" or something like that.

Can you give me a preliminary list of functions you're looking at that don't return something that interface likes?

Thanks,

Don

devbobo
Mar-10-2005, 03:21 PM
Don,

The main ones that I have had problems with are...

getSubCategories
getImages
logout

But I also see these as being a problem, if at least one instance didn't exist..

getAlbums
getAlbumTemplates

Thanks,

David

BTW, if ur interested in a preview, drop me a PM.


The best thing to do might be to return a fault code of "no images found" or something like that.

Can you give me a preliminary list of functions you're looking at that don't return something that interface likes?

Thanks,

Don

onethumb
Mar-10-2005, 03:45 PM
Don,

The main ones that I have had problems with are...

getSubCategories
getImages
logout

But I also see these as being a problem, if at least one instance didn't exist..

getAlbums
getAlbumTemplates

Thanks,

David

BTW, if ur interested in a preview, drop me a PM.


Your wish is my command. Try those calls now. (Make sure you're using the new API request URL, api.smugmug.com/xmlrpc/ , rather than the old).

Don

onethumb
Mar-10-2005, 03:47 PM
BTW, if ur interested in a preview, drop me a PM.

(And yes, I'm very interested, but alas, I have PMs disabled. People were getting angry at me when I didn't notice I had them and, thus, wouldn't reply).

I'll drop you an email when I have some free time to take a look.

Don

devbobo
Mar-10-2005, 03:52 PM
SWEET !!!! http://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gifhttp://dgrin.com/images/smilies/icon10.gif

Thanks Don http://dgrin.com/images/smilies/clap.gifhttp://dgrin.com/images/smilies/clap.gifhttp://dgrin.com/images/smilies/clap.gif

Your wish is my command. Try those calls now. (Make sure you're using the new API request URL, api.smugmug.com/xmlrpc/ , rather than the old).

Don