Future-proofing/improving XML-RPC requests
devbobo
Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
Hey Guys,
A lot of our 3rd XML-RPC applications rely on the order of parameters as the means of identifying parameters, there is a more robust method by which to make these calls.
Instead of calling smumug.login.withPassword...
the request can be made like this...
with no reliance on parameter order.
Something to think about
David
A lot of our 3rd XML-RPC applications rely on the order of parameters as the means of identifying parameters, there is a more robust method by which to make these calls.
Instead of calling smumug.login.withPassword...
<?xml version="1.0"?> <methodCall> <methodName>smugmug.login.withPassword</methodName> <params> <param> <value> <string>[insert email address]</string> </value> </param> <param> <value> <string>[insert password]</string> </value> </param> <param> <value> <string>1.2.0</string> </value> </param> <param> <value> <string>[insert api key]</string> </value> </param> </params> </methodCall>
the request can be made like this...
<?xml version="1.0" encoding="UTF-8"?> <methodCall> <methodName>smugmug.login.withPassword</methodName> <params> <param> <value> <struct> <member> <name>EmailAddress</name> <value> <string>[insert email address]</string> </value> </member> <member> <name>Password</name> <value> <string>[insert password]</string> </value> </member> <member> <name>APIKey</name> <value> <string>[insert api key]</string> </value> </member> </struct> </value> </param> </params> </methodCall>
with no reliance on parameter order.
Something to think about
David
0
Comments
Does anyone have links to sample C# code on how to make these calls in this manner?
"Know me through my lens."
My smugmug: http://peiklk.smugmug.com
My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
Nik,
It's possible to send like this now with no change on our end.
Cheers,
David
SmugMug API Developer
My Photos
I was planning on some fixup work tonight, so I might as well change this one, too:-)
FWIF S*E v.188 now uses the improved struct format on all the logins.
ok cool
however, structs can be used on all methods calls.
SmugMug API Developer
My Photos