Options

how do I use smugmug.albums.create with REST from C++?

figbugfigbug Registered Users Posts: 41 Big grins
I'm writing an app in C++ and using the REST api. So far it is working well. I can log in, get the list of albums and categories.

What I don't understand is how to pass a struct. For most things, I just add parameters to my url. But what do I do for a struct? Does anybody have an example?

Comments

  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited June 9, 2007
    G'day figbug,

    Technically, the struct only applies to XML-RPC, just pass the parameters in by name as you are doing for the other calls.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    figbugfigbug Registered Users Posts: 41 Big grins
    edited June 9, 2007
    devbobo wrote:
    G'day figbug,

    Technically, the struct only applies to XML-RPC, just pass the parameters in by name as you are doing for the other calls.

    Cheers,

    David

    Wow, thanks for the quick reply. That sounds easy enough, I'll give it a try.
  • Options
    figbugfigbug Registered Users Posts: 41 Big grins
    edited June 9, 2007
    I'm having trouble getting my HTTP PUT uploads to work. Are their any examples around?


    The error I'm getting is: err code="5" msg="system error (nogallery)"

    What does that mean, I'm pretty sure I'm giving a valid gallery id.
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited June 9, 2007
    figbug wrote:
    I'm having trouble getting my HTTP PUT uploads to work. Are their any examples around?


    The error I'm getting is: err code="5" msg="system error (nogallery)"

    What does that mean, I'm pretty sure I'm giving a valid gallery id.

    Can you please post your header for this message.

    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    figbugfigbug Registered Users Posts: 41 Big grins
    edited June 10, 2007
    devbobo wrote:
    Can you please post your header for this message.

    Thanks,

    David

    I got it figured out. I was putting an extra \r\n in my headers.

    Thanks for your help... my app is now uploading. This smug mug api is pretty slick.
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited June 10, 2007
    figbug wrote:
    I got it figured out. I was putting an extra \r\n in my headers.

    Thanks for your help... my app is now uploading. This smug mug api is pretty slick.

    great thumb.gif
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.