# Ruby to Gallery2 remote API

**URL:** <https://www.ruby-forum.com/t/ruby-to-gallery2-remote-api/146048>\
**Category:** Ruby\
**Created:** [August 16, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/ruby-to-gallery2-remote-api/146048 "2008-08-16T18:09:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sajal](https://www.ruby-forum.com/u/sajal)\
**Post date:** [August 16, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/ruby-to-gallery2-remote-api/146048/1 "2008-08-16T18:09:53Z")

</div>

Hello all,

I am a total noob at ruby and not a programmer by trade.

Gallery2 is an image hosting script made in php which has an API as  
defined at : [http://codex.gallery2.org/Gallery\_Remote:Protocol](http://codex.gallery2.org/Gallery_Remote:Protocol)

What I want to accomplish is to be able to upload images to my Gallery2  
from the ruby script. The upload feature is just a small function of the  
script.

the add-item is defined at  
[http://codex.gallery2.org/Gallery\_Remote:Protocol#add-item](http://codex.gallery2.org/Gallery_Remote:Protocol#add-item)

What would be the best way to go about it?  
What functions to look at?

There is an existing ruby script which can do most of the stuff, its a  
little confusing but im able to use its classes to get properties, album  
details, etc, but it doesnt have “add-item”

The ruby script is available at [http://www.mvmanila.com/PhotoMv/chkg2.rb](http://www.mvmanila.com/PhotoMv/chkg2.rb)

Any pointers what would i need to do to upload images?

The perl script at

> **[Best Open Source Mac Software Development Software 2023](https://sourceforge.net/directory/software-development/mac/)**
>
> Compare the best free open source Mac Software Development Software at SourceForge. Free, secure and fast Mac Software Development Software downloads from the largest Open Source applications and software directory

allows uploading images, in fact currently im calling it from ruby using  
the system command, but i need to customise some fields and the perl  
code is unreadable 😛

Would appereciate any help.

Thanks in Advance.
