LiveJournal API
npm install livejournal
This package provides access to both XMLRPC and JSONRPC APIs for LiveJournal.
XMLRPC
- http://wh.lj.ru/s2/developers/f/LiveJournal_XML-RPC_Specification_(EN).pdf
- http://www.livejournal.com/doc/server/ljp.csp.xml-rpc.protocol.html
Examples
// get posts inside the journal using XMLRPCLiveJournalxmlrpc;
// get post content using XMLRPCLiveJournalxmlrpc;
JSONRPC
There is no official public description of LiveJournal JSON RPC methods, but you can check Site.rpc.public
on http://livejournal.com
. Because the data is stored on CDN, you can access the data from anywhere.
Those are current ones (badly documented, contributions are welcome):
discovery.author_posts
comment.get_thread
Get comments thread
Params:
journal -- Journal username
itemid -- Post id
latest.get_entries
Get latest posts
Params:
first_timepost
browse.get_posts
gifts.get_gifts_categories
gifts.get_all_gifts
homepage.get_categories
discovery.suggest
sitemessage.get_message
discovery.get_categories
browse.get_categories
writers_block.get_list
discovery.today
discovery.get_feed
discovery.get_item
homepage.get_rating
browse.get_communities
Examples
// get latest posts using JSONRPCLiveJournaljsonrpc;
// get comments using JSONRPCLiveJournaljsonrpc;
You can access method list using LiveJournal.jsonrpc.methods
.
API
LiveJournal.API is wrapper around some resources provided at http://www.livejournal.com/bots/
Other docs and resources
- http://www.livejournal.com/developer/
- http://lj-dev.livejournal.com/
- http://www.livejournal.com/bots/
Tests
npm install jasmine -g
npm test