Doomshammer Published on October 12, 2008
by Doomshammerpro

Doomshammer's blog

Browse posts
Simple photo geotagging with an iPhone
Posted on March 14, 2009
Ipernity::API 0.06 released
Posted on December 29, 2008
Ipernity::API has it's own group now!
Posted on December 8, 2008
Bilderbuch Koeln
Posted on November 6, 2008
3 comments (latest 7 months ago)
Ipernity::API Perl Module
13 comments (latest 7 months ago)
One more day to go!
Posted on June 18, 2008
1 comment (latest 12 months ago)
CSS seems to be broken after commenting in Safari - anyone?
Posted on March 22, 2008
7 comments (latest 15 months ago)
Jack "the Fugee" Higgins at Work
Posted on March 4, 2008
Es twittert ;-)
Posted on February 21, 2008
12 comments (latest 16 months ago)

More information

This post is public
All rights reserved
  1. 3 people added it to their favorites
  2. Read 811 times

Ipernity::API Perl Module

Sunday October 12, 2008 at 02:50PM

I've written a Perl "framework" for the Ipernity API. Here is the first release. Maybe still little bit buggy and probably there are some things to improve. Let me know your comments.

Simply download: www.pebcak.de/tmp/Ipernity-API.tar.gz
To install, just extract the .tar.gz file, change to the new folder and run:

perl Makefile.PL
make
make test
make install

13 Comments / add your comment?

n0llpro says:
Super Idee - muss ich direkt mal reinschauen ...
Posted 8 months ago. ( permalink / translate )
Doomshammerpro replies:
Viel Spass- bin gespannt auf die ersten Anwendungen die das nutzen :)
Posted 8 months ago. ( permalink / translate )
n0llpro replies:
Hab gerade noch mal die aktuelle Version gesaugt und zumindest make test funktioniert. ;-)
Werd mir das dann die Tage näher anschauen.
Hat sich eigentlich schon mal jemand an einem Export-Plugin für Lightroom versucht?
Posted 8 months ago. ( permalink / translate )
Doomshammerpro replies:
Ich nicht, wuerde es aber sofort nutzen :-)
Posted 8 months ago. ( permalink / translate )
Doomshammerpro says:
Posted 8 months ago. ( permalink / translate )
Doomshammerpro says:
Another quick version update: blog.pebcak.de/tmp/Ipernity-API-0.05.tar.gz
Posted 8 months ago. ( permalink / translate )
Anthony le Bourlierpro says:
what is it for ?
Posted 8 months ago. ( permalink )
h-e-n-r-ypro says:
Schau mal: www.ipernity.com/blog/h-e-n-r-y/111123
Ich habe Dein Perl Modul erfolgreich eingesetzt.
Funktioniert super! Danke!!!!!

P.S. wollte es erst mit php probieren, kann aber auf meinem Server kein php5 installieren. Für Dein Modul musste ich zwar von perl5.8.1 auf 5.8.8 upgraden, aber danach war alles ok.
Posted 7 months ago. ( permalink / translate )
Doomshammerpro says:
Freut mich.
Posted 7 months ago. ( permalink / translate )
h-e-n-r-ypro replies:
Hallo! Ich nochmal. Habe jetzt erfolgreich Dein Perl-Modul auch im authorisierten (signed) Modus benutzt (habe allerdings ne Weile gebraucht, bis ich die frob-Token-Magie verstanden hatte :-)
Ich habe hier einen Fall, wo ich einen Fehler beim Holen des Dokuments im authorisierten Modus bekomme:

Entity: line 17: parser error : Input is not proper UTF-8, indicate encoding !

Und zwar ist hier bei doc.get/xml?doc_id=3522833

beim original ein filename mit Umlauten drin, die der xml-Parser nicht parsen kann (falsches Encoding?)

Leider sieht man das nur im signed mode, da ja sonst das original nicht mitkommt.

Kannst Du das nachvollziehen?

h-e-n-r-y

P.S. Nochmal vielen Dank für das Modul!!!! Ist ein super Einstieg für mich in die API.
Posted 7 months ago. ( permalink / translate )
Doomshammerpro replies:
Kannste mir den Call pasten den Du gemacht hast? (Key kannste natuerlich veraendern)
Posted 7 months ago. ( permalink / translate )
h-e-n-r-ypro replies:
my $api = Ipernity::API->new(
'args' => {
'api_key' => 'foo',
'secret' => 'bar',
'outputformat' => 'xml',
} );


my $hashref = $api->execute_xml(
'method' => 'doc.get',
'doc_id' => '3522833',
'auth_token' => Auth::getToken() ,);

my $doc = $hashref->{doc};

my $d = $doc->{description};

u.s.w.

reicht das?
Posted 7 months ago. ( permalink )
Doomshammerpro says:
my $hashref = $api->execute_xml(
'method' => 'doc.get',
'doc_id' => '3522833',
'auth_token' => Auth::getToken() ,);

Das wird nicht klappen. Du solltest getToken() nur einmal ausfuehren und den resultierenden AuthToken statisch in einer Variable speichern. Ein getToken() Request setzt voraus, dass vorher ein Frob angefordert wurde (oder bei 'ner Web-App der Request von 'ner Redirect Seite kommt).

my $hashref = $api->execute_xml(
'method' => 'doc.get',
'doc_id' => '3522833',
'auth_token' => '12345-123-1234567890',
);

So sollte es funktionieren.
Posted 7 months ago. ( permalink / translate )

Add your comment

Reply to this comment

Edit your comment

Please sign in to post a comment Sign in now?


rss Latest comments – Subscribe to the feed of this post comments.

 

Català | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά νεο | Français | Galego novo | Italiano | Nederlands | Português | More...