]> www.wagner.pp.ru Git - oss/vjournal.git/blobdiff - bin/userinfo
stubs for scripts
[oss/vjournal.git] / bin / userinfo
diff --git a/bin/userinfo b/bin/userinfo
new file mode 100644 (file)
index 0000000..0d92d69
--- /dev/null
@@ -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<state> can be B<owner>, B<guest> or B<banned>.
+
+If user is not logged in, returns following structure:
+
+    {
+               state: "notlogged",
+               providers: [
+                       {name: "Live journal",icon:"/avatars/lj.gif",format: "%s.livejournal.com"}
+           ...
+       }
+
+=cut