From 600e2d87ecc359b3bd202c4b471c042f319e1e2b Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 1 Oct 2008 21:08:51 +0000 Subject: feature 874 added: new Web API method pwg.tags.add. git-svn-id: http://piwigo.org/svn/trunk@2634 68402e56-0260-453c-a942-63ccdbb3a9ee --- tools/piwigo_remote.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools/piwigo_remote.pl') diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl index 02e447eab..776802589 100644 --- a/tools/piwigo_remote.pl +++ b/tools/piwigo_remote.pl @@ -152,6 +152,21 @@ if ($opt{action} eq 'pwg.categories.add') { print Dumper(from_json($response->content)); } +if ($opt{action} eq 'pwg.tags.add') { + $form = { + method => 'pwg.tags.add', + name => $opt{define}{name}, + }; + + 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' ); -- cgit v1.2.3