Class: LiveJournal::Request::PostEvent
- Defined in:
- lib/livejournal/entry.rb
Instance Method Summary collapse
-
#initialize(user, entry) ⇒ PostEvent
constructor
A new instance of PostEvent.
-
#run ⇒ Object
Post an #Entry as a new post.
Methods inherited from Req
#dryrun!, #dumpresponse, #verbose!
Constructor Details
#initialize(user, entry) ⇒ PostEvent
Returns a new instance of PostEvent.
277 278 279 280 281 |
# File 'lib/livejournal/entry.rb', line 277 def initialize(user, entry) super(user, 'postevent') entry.add_to_request @request @entry = entry end |
Instance Method Details
#run ⇒ Object
Post an #Entry as a new post. Fills in the itemid
and anum
fields on the #Entry, which are necessary for Entry#display_itemid and Entry#url.
286 287 288 289 290 |
# File 'lib/livejournal/entry.rb', line 286 def run super @entry.itemid = @result['itemid'].to_i @entry.anum = @result['anum'].to_i end |