Options

API Update: Hidden images

devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
G'day All,

The following API methods have been updated to reflect the addition of hidden images...

- smugmug.images.get with Heavy
- smugmug.images.getInfo
- smugmug.images.changeSettings

smugmug.images.get and smugmug.images.getInfo return a boolean variable "Hidden" for the owner.

And smugmug.images.changeSettings accepts a boolean argument "Hidden".

Cheers,

David
David Parry
SmugMug API Developer
My Photos

Comments

  • Options
    NitroDeskNitroDesk Registered Users Posts: 38 Big grins
    edited February 12, 2008
    ChangeSettings with Hidden parameter
    devbobo wrote:
    G'day All,

    The following API methods have been updated to reflect the addition of hidden images...

    - smugmug.images.get with Heavy
    - smugmug.images.getInfo
    - smugmug.images.changeSettings

    smugmug.images.get and smugmug.images.getInfo return a boolean variable "Hidden" for the owner.

    And smugmug.images.changeSettings accepts a boolean argument "Hidden".

    Cheers,

    David

    David,
    If i call images.ChangeSettings with the original Caption and Keywords, but just flipping the hidden flag, i get a system error. However, if i change the caption while doing this, it seems to work fine. Is this by design that you require a change in some other field before the update can go through?
    thanks!
    -goutham
    www.NitroDesk.com
    www.NitroDesk.com
    A better way to manage your Online Photos

    http://nitrodesk.blogspot.com
  • Options
    flyingdutchieflyingdutchie Registered Users Posts: 1,286 Major grins
    edited February 12, 2008
    NitroDesk wrote:
    David,
    If i call images.ChangeSettings with the original Caption and Keywords, but just flipping the hidden flag, i get a system error. However, if i change the caption while doing this, it seems to work fine. Is this by design that you require a change in some other field before the update can go through?
    thanks!
    -goutham
    www.NitroDesk.com

    I had that happen too.
    If you send the Caption in your request, it must be different than the current caption in the smugmug database.

    Basically, if you don't change a value/attribute, don't send it.

    In your case, sending only the image-id and the hidden-flag is enough.

    (In my API (SmugFig API) i track every attribute of each object and see if it is changed. Only if it has changed the new value will be sent to smugmug)
    I can't grasp the notion of time.

    When I hear the earth will melt into the sun,
    in two billion years,
    all I can think is:
        "Will that be on a Monday?"
    ==========================
    http://www.streetsofboston.com
    http://blog.antonspaans.com
  • Options
    NitroDeskNitroDesk Registered Users Posts: 38 Big grins
    edited February 12, 2008
    Thanks!
    I had that happen too.
    If you send the Caption in your request, it must be different than the current caption in the smugmug database.

    Basically, if you don't change a value/attribute, don't send it.

    In your case, sending only the image-id and the hidden-flag is enough.

    (In my API (SmugFig API) i track every attribute of each object and see if it is changed. Only if it has changed the new value will be sent to smugmug)

    Ah! i see, i will try that for sure.. thanks!
    -goutham
    www.NitroDesk.com
    A better way to manage your Online Photos

    http://nitrodesk.blogspot.com
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 12, 2008
    NitroDesk wrote:
    David,
    If i call images.ChangeSettings with the original Caption and Keywords, but just flipping the hidden flag, i get a system error. However, if i change the caption while doing this, it seems to work fine. Is this by design that you require a change in some other field before the update can go through?
    thanks!
    -goutham
    www.NitroDesk.com

    That's a bug, i'll fix it thumb.gif
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    NitroDeskNitroDesk Registered Users Posts: 38 Big grins
    edited February 12, 2008
    you're the best
    devbobo wrote:
    That's a bug, i'll fix it thumb.gif

    Phew David.. you saved me some serious sweat

    -goutham
    www.NitroDesk.com
    A better way to manage your Online Photos

    http://nitrodesk.blogspot.com
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 12, 2008
    NitroDesk wrote:
    Phew David.. you saved me some serious sweat

    -goutham

    This fix is live now.
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.