PHP API for calling into Gallery

petrov76

Joined: 2004-06-16
Posts: 1
Posted: Thu, 2004-06-17 20:02

I'd like to write some scripts that run on our server that perform some tasks automatically with gallery. Is their a published API that I can use to do things like:
a) when a customer buys cameras from our shopping cart software, automatically create an album for them in our gallery installation?
b) take all the pictures in a single directory on the server and import them into a given album in gallery.

This is similar to the Gallery Remote protocol used by galleryadd.pl (and others) but I'm looking to do it locally, not remotely. Should I just look into Gallery Remote and call it with localhost:80, or is there an actual API for programs to interface with local gallery installations?

I can write the local scripts in any programming language, but I'd imagine the API is most likely to be available in PHP which is fine with me.

Thanks,
--Sam

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2004-06-19 17:32

AFAIK there's no published API for Gallery 1.x.
It's a good idea to use the Gallery Remote protocol:
http://gallery.menalto.com/modules.php?op=modload&name=phpWiki&file=index&pagename=Gallery%20Remote%20Documents

Then again the G1 code is quite good documented and Gallery Remote is open source ((i guess) and you could read both sources.