new: WebService method pwg.categories.add so that pLoader can create a

virtual category.


git-svn-id: http://piwigo.org/svn/trunk@2583 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2008-09-24 20:25:39 +00:00
commit 6df515a54f
3 changed files with 48 additions and 0 deletions

View file

@ -116,6 +116,22 @@ if ($opt{action} eq 'pwg.tags.list') {
print $t;
}
if ($opt{action} eq 'pwg.categories.add') {
$form = {
method => 'pwg.categories.add',
name => $opt{define}{name},
parent => $opt{define}{parent},
};
my $response = $ua->post(
$conf{base_url}.'/ws.php?format=json',
$form
);
use Data::Dumper;
print Dumper(from_json($response->content));
}
$query = pwg_ws_get_query(
method => 'pwg.session.logout'
);