A server that graphical photo apps on linux can talk to to post images. replacement for non free web services.
Needs to be run on port 80 to replace facebook, the first target.
Requirements :
For running in apache:
- Plack::Runner
The server when all the facebook requests are directed to it, handles more than just the photo handling, I have added in url handlers for all requests that occured while testing.
The rest api is implemented, but this is deprecated: http://developers.facebook.com/docs/reference/rest/users.getInfo/ an xml object is expected.
- get /dialog/oauth
- users.getLoggedInUser
- users.getInfo
- photos.getAlbums
- photos.createAlbum
- photos.upload
- get '/services/oauth/request_token'
- get '/services/oauth/authorize'
- get '/services/oauth/access_token'
- get '/services/rest'
- post '/services/upload'
The current stable version uses the deprecated interface
-
user login https://www.google.com/accounts/ClientLogin
POST /accounts/ClientLogin
The new version uses the oauth2,
-
get /o/oauth2/auth browse to here and get a token
-
POST /o/oauth2/token enter in app and it posts it here.
-
GET /oauth2/v1/userinfo get the user info
-
GET /data/feed/api/user/default get the albums
-
POST /data/feed/api/user/default post the new album
-
post "/data/feed/api/user//albumid/" upload the data.
this fails here :https://github.com/h4ck3rm1k3/photo-librarian-server/issues/2
- digikam notices the certificate is bogus, good for you digikam. accept the cert.
- POST /accounts/ClientLogin
- GET /data/feed/api/user/ The user default is optional and digicam leaves it out.
- GET /data/feed/api/user/brad.gushue
- GET /data/feed/api/user/brad.gushue/albumid/9810315389720904593?thumbsize=200 One new call to a the get for the album before it posts
- POST /data/feed/api/user/brad.gushue/albumid/9810315389720904593 the post fails with the boundry just like before.
Bug has been reported to the perl module author. https://rt.cpan.org/Public/Bug/Display.html?id=79697
http://localhost/images/jzFINxQxn7.jpg/upload/commons
#details about one file http://localhost/images/jzFINxQxn7.jpg/details
http://localhost/images/jzFINxQxn7.jpg/upload/commons
supports the basic wikimedia api
-
GET /w/api.php?maxlag=5&format=json&action=query&meta=userinfo Returning {"query":{"userinfo":{"rights":["all","bot"],"groups":["sysop"],"name":"Mdupont"}}}
-
GET /w/api.php?maxlag=5&format=json&uiprop=rights%7Cgroups&action=query&meta=userinfo Returning {"query":{"userinfo":{"rights":["all","bot"],"groups":["sysop"],"name":"Mdupont"}}}
-
GET /w/api.php?prop=info&maxlag=5&format=json&titles=TestjzFINxQxn7.jpg&intoken=edit&action=query Returning {"query":{"token":"yeahright!","pages":{"editoken":{"edittoken":"Funky1"}}}}
-
POST /w/api.php with a file, the body has these variable: { 'maxlag' => '5', 'format' => 'json', 'comment' => '', 'filename' => 'TestjzFINxQxn7.jpg', 'action' => 'upload', 'file' => 'TestjzFINxQxn7.jpg', 'token' => 'Funky1' };
- create bucket is just a put /, no special response is expected by the s3 command, you need to have a hostname for the bucket.
- put file is a simple put the body contains the file, response is an Etag with the md5_hex
only those two commands implemented.
#piwigo support
upload now working.
- "pwg.session.login"
- "pwg.session.getStatus"
- "pwg.categories.getList"
- 'pwg.categories.add optional
- 'pwg.images.addSimple')
See also my blog post on the basic ideas : http://rdfintrospector2.blogspot.de/2012/09/more-ideas-from-my-kosovo-trip.html