diff options
author | plegall <plg@piwigo.org> | 2008-09-24 20:25:39 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2008-09-24 20:25:39 +0000 |
commit | 6df515a54ff63812076dfbf8dc6514fa9416b08a (patch) | |
tree | 2ab3c894bcecfea01767794c5eee9646b3f1c4e2 /tools/piwigo_remote.pl | |
parent | 0d70e80ad8fcd2966c07c936d45f9752b91e5d8d (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | tools/piwigo_remote.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl index 30b8743b4..3c611fed0 100644 --- a/tools/piwigo_remote.pl +++ b/tools/piwigo_remote.pl @@ -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' ); |