]> www.wagner.pp.ru Git - oss/vjournal.git/blob - bin/userinfo
0d92d6943e9d81b4b6ca2e77e6ded9541607ca40
[oss/vjournal.git] / bin / userinfo
1 #!/usr/bin/perl -T
2
3 =head1 NAME
4
5 vjuserinfo - return current user info as json
6
7 =head1 SYNOPSIS
8
9         http://your.server.org/cgi-bin/vjuserinfo/your-blog-top
10
11 =head1 DESCRIPTION
12
13 Returns info about current user using following format
14         
15         { 
16                 url:"somebody.livejournal.com",
17                 displayname:"somebody@lj",
18                 state: "guest",
19                 avatar: {src: "http://your.server.org/avatars/somebody@lj.gif",
20                 width:100, height:100},
21         }
22
23 B<state> can be B<owner>, B<guest> or B<banned>.
24
25 If user is not logged in, returns following structure:
26
27     {
28                 state: "notlogged",
29                 providers: [
30                         {name: "Live journal",icon:"/avatars/lj.gif",format: "%s.livejournal.com"}
31             ...
32         }
33
34 =cut