?

Log in

No account? Create an account
September 9th, 2012 - LiveJournal Development — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Development

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

September 9th, 2012

How to download all posts from journal [Sep. 9th, 2012|07:38 pm]
LiveJournal Development

lj_dev

[skoblov]
I try to make local copy of my friends posts for 2012 using flat API.

There are two ways to do this:

1. Get posts ID using mode=syncitems, and get posts later using mode=getevents. This method works only for my journal and communities. If I try to request data (mode=syncitems) from other journal, server answers "Client error: Don't have access to requested journal"

2. Downloads posts using mode=getevents & selecttype=syncitems & lastsync=.... This method works for any journals, but I can't find source of good value for lastsync time. If server returns first 100 posts, I need to continue using modification time of last received post. But LJ does not include it in answer (it present in mode=syncitems answer only)
link1 comment|post comment

navigation
[ viewing | September 9th, 2012 ]
[ go | Previous Day|Next Day ]