Skip to content

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

Open
khustochka wants to merge 1 commit intoromanbsd:masterfrom
khustochka:alt-server
Open

Implement posting to alternative server. Allow connecting to server via HTTPS.#13
khustochka wants to merge 1 commit intoromanbsd:masterfrom
khustochka:alt-server

Conversation

@khustochka
Copy link
Contributor

@khustochka khustochka commented Mar 4, 2017

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

@romanbsd
Copy link
Owner

romanbsd commented Mar 4, 2017

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

@khustochka
Copy link
Contributor Author

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.

…ia HTTPS.

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
Copy link
Contributor Author

Fixed some issues and rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants