View Full Version : [RESOLVED] Getting albums in category
nickarls
Oct-04-2006, 01:03 AM
Is there some way of getting all the albums in a category without iterating through all the albums using the REST API and checking the category?
devbobo
Oct-04-2006, 04:23 PM
Is there some way of getting all the albums in a category without iterating through all the albums using the REST API and checking the category?
Hi Nick,
You could use smugmug.users.getTree, which returns the full list of categories and associated subcategories and albums.
I am going to raise an enhancement request to include an optional category parameter to return only a partial branch of the tree.
Until then, perhaps getting the whole tree will suffice.
Cheers,
David
TazzyTazzy
Oct-04-2006, 04:55 PM
Mod Edit: Logged as SmugBug (http://smugmug.jot.com/BugReporter/SmugBug8)
[ErrorMsg] => server error. method not found.
smugmug.users.getTree
:dunno
devbobo
Oct-04-2006, 05:00 PM
[ErrorMsg] => server error. method not found.
smugmug.users.getTree
:dunno
:lol3 :lol3
sorry it's a beta method, make sure u use version 1.1.1
TazzyTazzy
Oct-05-2006, 08:46 AM
:lol3 :lol3
sorry it's a beta method, make sure u use version 1.1.1
I'm fairly sure I'm using 1.1.1... Here's some PHP...
$login_struct = array(
new xmlrpcval(variable_get('smugmug_email','')),
new xmlrpcval($pass),
new xmlrpcval('1.1.1'),
new xmlrpcval( $api_key ));
devbobo
Oct-05-2006, 02:00 PM
I'm fairly sure I'm using 1.1.1... Here's some PHP...
$login_struct = array(
new xmlrpcval(variable_get('smugmug_email','')),
new xmlrpcval($pass),
new xmlrpcval('1.1.1'),
new xmlrpcval( $api_key ));
Tazzy,
Passing the version like that is depreciated now with latest release.
You should be using this endpoint instead...
http[s]://api.smugmug.com/hack/xmlrpc/1.1.1/
so versions will now be denoted by the url, not a parameter being passed with login.
more info here (http://smugmug.jot.com/WikiHome/API/Versions/1.1.1)
Please note, that I haven't had a chance to test the new release of the API with xml-rpc.
Cheers,
David
TazzyTazzy
Oct-09-2006, 11:44 AM
Tazzy,
Passing the version like that is depreciated now with latest release.
You should be using this endpoint instead...
http[s]://api.smugmug.com/hack/xmlrpc/1.1.1/
I am.. Still no go..
$smugmug_client = new xmlrpc_client("/hack/xmlrpc/1.1.1/", "api.smugmug.com", "443");
....Wishing I could get this to work...
-Mitch
devbobo
Oct-09-2006, 03:58 PM
I am.. Still no go..
$smugmug_client = new xmlrpc_client("/hack/xmlrpc/1.1.1/", "api.smugmug.com", "443");
....Wishing I could get this to work...
-Mitch
Hi Tazzy,
I started building my API test harness last night, I have confirmed your problem. It has been logged as a SmugBug, so hopefully it will get looked at soonish.
Cheers,
David
claudermilk
Oct-11-2006, 08:10 AM
So when it does return values, does GetTree return good data? In helping another user debug a call to that routine, I saw the XML returned is all borked up & not usable; cat & subcat info did not match the image it was returned with IIRC.
mhilbush
Oct-11-2006, 02:05 PM
So when it does return values, does GetTree return good data? In helping another user debug a call to that routine, I saw the XML returned is all borked up & not usable; cat & subcat info did not match the image it was returned with IIRC. Yes, this latest version returns very usable results.
Mark
claudermilk
Oct-12-2006, 07:01 AM
:thumb
Stardog
Oct-13-2006, 05:24 AM
Yes, this latest version returns very usable results.
Mark
I assume you are reffering to the REST version? I still get method not found with XML-RPC.
mhilbush
Oct-13-2006, 03:19 PM
Yes, I was referring to the REST version.
Mark
devbobo
Nov-17-2006, 01:23 AM
Fixed in API release 1.1.1 17/11/2006
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.