X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fvjournal.git;a=blobdiff_plain;f=bin%2Fuserinfo;fp=bin%2Fuserinfo;h=0d92d6943e9d81b4b6ca2e77e6ded9541607ca40;hp=0000000000000000000000000000000000000000;hb=8a3c7e4b84b480cdcdde4d163d753e4447a4ffbf;hpb=226b9593b28fc6eacf1b1f27cb76838f77716ed2 diff --git a/bin/userinfo b/bin/userinfo new file mode 100644 index 0000000..0d92d69 --- /dev/null +++ b/bin/userinfo @@ -0,0 +1,34 @@ +#!/usr/bin/perl -T + +=head1 NAME + +vjuserinfo - return current user info as json + +=head1 SYNOPSIS + + http://your.server.org/cgi-bin/vjuserinfo/your-blog-top + +=head1 DESCRIPTION + +Returns info about current user using following format + + { + url:"somebody.livejournal.com", + displayname:"somebody@lj", + state: "guest", + avatar: {src: "http://your.server.org/avatars/somebody@lj.gif", + width:100, height:100}, + } + +B can be B, B or B. + +If user is not logged in, returns following structure: + + { + state: "notlogged", + providers: [ + {name: "Live journal",icon:"/avatars/lj.gif",format: "%s.livejournal.com"} + ... + } + +=cut