Structs in REST?
koreth
Registered Users Posts: 3 Beginner grinner
The documentation for smugmug.images.changeSettings says it takes a struct as input. Simple enough with XML-RPC, but what does a struct look like in SmugMug's REST API? Is it just not possible to use that API call with REST?
I naively tried a URL like https://api.smugmug.com/...&method=smugmug.images.changeSettings&Hidden=true (with session ID, image ID, etc. included) but that didn't seem to work. Do I have to wrap that "Hidden" value in something to make it look like a struct?
For that matter, why are the parameters to that method in a struct at all, given it can only operate on one image at a time and they're all optional?
I naively tried a URL like https://api.smugmug.com/...&method=smugmug.images.changeSettings&Hidden=true (with session ID, image ID, etc. included) but that didn't seem to work. Do I have to wrap that "Hidden" value in something to make it look like a struct?
For that matter, why are the parameters to that method in a struct at all, given it can only operate on one image at a time and they're all optional?
0
Comments
Which api version of REST are you referring to ?
The most recent version (1.2.2) documentation is here. The call you mentioned should have worked, if you sent the parameters with the correct case, eg. ImageID and SessionID.
Give it a try on version 1.2.2, I know that works.
Cheers,
David
SmugMug API Developer
My Photos