From 5adad7565c9c169dd623bac6704121f7d6aba151 Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 24 Sep 2008 21:30:33 +0000 Subject: new: WebService method pwg.tags.getAdminList was added. The difference with pwg.tags.getList is that this new method doesn't take permissions into account, and so is available only for administrator connected users. git-svn-id: http://piwigo.org/svn/trunk@2584 68402e56-0260-453c-a942-63ccdbb3a9ee --- tools/piwigo_remote.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tools') diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl index 3c611fed0..02e447eab 100644 --- a/tools/piwigo_remote.pl +++ b/tools/piwigo_remote.pl @@ -116,6 +116,26 @@ if ($opt{action} eq 'pwg.tags.list') { print $t; } +if ($opt{action} eq 'pwg.tags.getAdminList') { + $query = pwg_ws_get_query( + method => 'pwg.tags.getAdminList' + ); + + $result = $ua->get($query); + my $tags = from_json($result->content)->{result}{tags}; + + foreach my $tag (@{$tags}) { + # print join(',', keys %{$tag}), "\n"; exit(); + printf( + '{%u} %s ', + $tag->{id}, + $tag->{name} + ); + } + + print "\n"; +} + if ($opt{action} eq 'pwg.categories.add') { $form = { method => 'pwg.categories.add', -- cgit v1.2.3