Class LiveJournal::Request::CheckFriends
In: lib/livejournal/friends.rb
Parent: Req

An example of polling for friends list updates.

  req = LiveJournal::Request::CheckFriends.new(user)
  req.run   # always will return false on the first run.
  loop do
    puts "Waiting for new entries..."
    sleep req.interval   # uses the server-recommended sleep time.
    break if req.run == true
  end
  puts "#{user.username}'s friends list has been updated!"

Methods

new   run  

Attributes

interval  [R]  The server-recommended number of seconds to wait between running this.
lastupdate  [R]  If you want to keep your CheckFriends state without saving the object, save the lastupdate field and pass it to a new object.

Public Class methods

Public Instance methods

Returns true if there are new posts available.

[Validate]