Feature Request: API calls with no return data
devbobo
Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
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
Thanks,
David
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
Thanks,
David
0
Comments
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
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.
SmugMug API Developer
My Photos
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
(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
Thanks Don
SmugMug API Developer
My Photos