Options

Feature Request: API calls with no return data

devbobodevbobo 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 ne_nau.gif

Thanks,

David
David Parry
SmugMug API Developer
My Photos

Comments

  • Options
    onethumbonethumb Administrators Posts: 1,269 Major grins
    edited March 10, 2005
    devbobo wrote:
    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 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
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited March 10, 2005
    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.

    onethumb wrote:
    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
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    onethumbonethumb Administrators Posts: 1,269 Major grins
    edited March 10, 2005
    devbobo wrote:
    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
  • Options
    onethumbonethumb Administrators Posts: 1,269 Major grins
    edited March 10, 2005
    devbobo wrote:
    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
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited March 10, 2005
    SWEET !!!! icon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gificon10.gif

    Thanks Don clap.gifclap.gifclap.gif
    onethumb wrote:
    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
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.