Class: SocialPoster::Poster::LiveJournal
- Inherits:
-
Object
- Object
- SocialPoster::Poster::LiveJournal
- Includes:
- Helper
- Defined in:
- lib/social_poster/poster/live_journal.rb
Instance Method Summary collapse
-
#initialize ⇒ LiveJournal
constructor
A new instance of LiveJournal.
- #write(text, title) ⇒ Object
Methods included from Helper
Constructor Details
#initialize ⇒ LiveJournal
Returns a new instance of LiveJournal.
9 10 11 12 |
# File 'lib/social_poster/poster/live_journal.rb', line 9 def initialize @user = ::LiveJournal::User.new(config_key(:user), config_key(:password)) ::LiveJournal::Request::Login.new(@user).run end |
Instance Method Details
#write(text, title) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/social_poster/poster/live_journal.rb', line 14 def write(text, title) lj = ::LiveJournal::Entry.new lj.subject = title lj.event = text ::LiveJournal::Request::PostEvent.new(@user, lj).run end |