PDA

View Full Version : getSubCategories


mattmattbobatt
Feb-14-2005, 11:35 AM
I'm working on an uploader for Mac OS X that's close to "send to smugmug". It's coming along but I have run in to a problem getting sub categories. I want to fill a pop up menu with the subcategories for the currently selected category. I think I have the correct categoryID because when I create albums the category is right.

It's a little hard to debug because I'm working from some existing code that uses the java bridge to do the rpc calls. When I call getSubCategories I get a java rpc exception with the message "no reason given". Other rpcs are working fine. Just not this one. Spelling is OK because I would get an unknown procedure name otherwise.

I'm calling it with the sessionID and categoryID but not a nickname.

Any clues about what I'm missing ?

Nikolai
Feb-14-2005, 11:52 AM
.. if you can post your exact rpc-xml (you can remove session id:-)

Word of warning, though: dgrin does not like rpc-xml formatting, so it tends to swallow 80% of the text. I only managed to get it work if I use "php" wrapper and do NOT preview/edit it later.

HTH

Nik

sdmeyers
Feb-14-2005, 11:58 AM
Just a thought, If you use getAlbums you get Catagories and Subcatagories of all albums (I'm not sure if it will give you info on empty (Sub)Catagories though so that may be a problem)

But you should be able to parse that information to get all the info you need in one XML-RPC trip.

BTW if you are working on Mac OS X you should know that AppleScript makes XML-RPC stuff quite easy.


I'm working on an uploader for Mac OS X that's close to "send to smugmug". It's coming along but I have run in to a problem getting sub categories. I want to fill a pop up menu with the subcategories for the currently selected category. I think I have the correct categoryID because when I create albums the category is right.

It's a little hard to debug because I'm working from some existing code that uses the java bridge to do the rpc calls. When I call getSubCategories I get a java rpc exception with the message "no reason given". Other rpcs are working fine. Just not this one. Spelling is OK because I would get an unknown procedure name otherwise.

I'm calling it with the sessionID and categoryID but not a nickname.

Any clues about what I'm missing ?

Nikolai
Feb-14-2005, 12:02 PM
.. only if you're going for already existing albums.
Otherwise you simply HAVE TO get categoreis/subcategories in at least two roundtrips..

Good luck!