aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-10-11 20:37:54 +0000
committerplegall <plg@piwigo.org>2008-10-11 20:37:54 +0000
commit933b820e0799e413ab680eba1753cec506108b1e (patch)
tree88bb7cbfefa9f3707d5d3a88bc0cefbc76d8c9d9 /tools
parent6e9b50b27b6ae781604cdfbac2c62060cd93aac5 (diff)
feature 892 added: pwg.images.setInfo added so that once we have discovered
the photo was already in the database (thanks to pwg.images.exist), we can only set the photo metadata. git-svn-id: http://piwigo.org/svn/branches/2.0@2722 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'tools')
-rw-r--r--tools/piwigo_remote.pl21
1 files changed, 20 insertions, 1 deletions
diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl
index 3e3031c82..2a3876b87 100644
--- a/tools/piwigo_remote.pl
+++ b/tools/piwigo_remote.pl
@@ -18,7 +18,7 @@ our $ua = LWP::UserAgent->new;
$ua->cookie_jar({});
my %conf;
-$conf{base_url} = 'http://localhost/~pierrick/piwigo/trunk';
+$conf{base_url} = 'http://localhost/~pierrick/piwigo/2.0';
$conf{response_format} = 'json';
$conf{username} = 'pierrick';
$conf{password} = 'z0rglub';
@@ -192,6 +192,25 @@ if ($opt{action} eq 'pwg.images.exist') {
# print Dumper($response);
}
+if ($opt{action} eq 'pwg.images.setInfo') {
+ $form = {
+ method => $opt{action},
+ };
+
+ foreach my $key (keys %{ $opt{define} }) {
+ $form->{$key} = $opt{define}{$key};
+ }
+
+ my $response = $ua->post(
+ $conf{base_url}.'/ws.php?format=json',
+ $form
+ );
+
+ use Data::Dumper;
+ # print Dumper(from_json($response->content)->{result});
+ print Dumper($response);
+}
+
$query = pwg_ws_get_query(
method => 'pwg.session.logout'
);