aboutsummaryrefslogtreecommitdiffstats
path: root/tools/piwigo_remote.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/piwigo_remote.pl')
-rw-r--r--tools/piwigo_remote.pl16
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'
);