Changeset 2584 for trunk/tools


Ignore:
Timestamp:
Sep 24, 2008, 11:30:33 PM (16 years ago)
Author:
plg
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/piwigo_remote.pl

    r2583 r2584  
    117117}
    118118
     119if ($opt{action} eq 'pwg.tags.getAdminList') {
     120    $query = pwg_ws_get_query(
     121        method => 'pwg.tags.getAdminList'
     122    );
     123
     124    $result = $ua->get($query);
     125    my $tags = from_json($result->content)->{result}{tags};
     126
     127    foreach my $tag (@{$tags}) {
     128        # print join(',', keys %{$tag}), "\n"; exit();
     129        printf(
     130            '{%u} %s ',
     131            $tag->{id},
     132            $tag->{name}
     133        );
     134    }
     135
     136    print "\n";
     137}
     138
    119139if ($opt{action} eq 'pwg.categories.add') {
    120140    $form = {
Note: See TracChangeset for help on using the changeset viewer.