livejournal icon indicating copy to clipboard operation
livejournal copied to clipboard

Implement posting to alternative server. Allow connecting to server via HTTPS.

Open khustochka opened this issue 7 years ago • 3 comments

Recently there's been a noticeable migration of LiveJournal users to Dreamwidth.org. Dreamwidth supports the same API as Livejournal. This change allows to log into and post to an alternative server that supports this API. It also allows communication via HTTPS if the server url is declared with https schema. Example:

dreamwidth = LiveJournal::Server.new("Dreamwidth", "https://www.dreamwidth.org")
user = LiveJournal::User.new('test', 'test', dreamwidth)
login = LiveJournal::Request::Login.new(user)
login.run

khustochka avatar Mar 04 '17 03:03 khustochka

Where's the default, e.g. 'www.livejournal.com' specified?

romanbsd avatar Mar 04 '17 20:03 romanbsd

It's already there

https://github.com/romanbsd/livejournal/blob/master/lib/livejournal/basic.rb#L35

Existing code already has functionality to define a server and user registered on this server, but this information was not actually used when sending requests.

khustochka avatar Mar 05 '17 00:03 khustochka

Fixed some issues and rebased.

khustochka avatar Mar 05 '17 01:03 khustochka