XML-RPC API

View previous topic View next topic Go down

XML-RPC API

Post  osi on Tue Apr 10, 2012 1:09 am

Here is a list of the functions you can call through the API, and some information on their return values.

Developer Functions
Code:
foo($value);

This function is just to test that the server responds correctly : it returns an int : $value + 42.

User Functions

Code:
get_key($login,$pass)

Use this function to get the key associated to this account. All of the XML-RPC transactions will require this key, to recognize the user. If you develop an application, it is advised to store this key, instead of storing the login/pass of the user Smile

Code:
whoami($key)

Returns an array of information about the user (login, name, language, ...).

Files Functions

Code:
list_dirs($key,$dir)

Returns an array of the directories located in $dir, visible by the user associated to $key.

Code:
list_files($key,$dir)

Returns an array of the files located in $dir, visible by the user associated to $key.

Code:
get_img($key,$img,$type)

Returns the image $img, if the user associated to $key is authorized to access it.

$type lets you choose between 3 sizes for your image :

  • thumb : 200x200 max
  • small : 800x800 max
  • large : original size (no max)


Note : if $type isn't submitted, "large" will be selected by default.

That's it for now, but more functions will come to complete the API.

osi
Admin

Posts : 6
Join date : 2012-04-06

View user profile http://photoshow-gallery.forumga.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum