Class: HTML2FB::FBPost

Inherits:
Object
  • Object
show all
Defined in:
lib/feedbooks.rb

Class Method Summary collapse

Class Method Details

.push(conf, tit, cont, type, path = nil) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/feedbooks.rb', line 55

def self.push(conf,tit,cont,type,path=nil)
  puts "Sending to feedbooks #{tit} with type #{type}"
  fb=FBSession.session
  if path.nil?
    post=AtomPost.new "http://#{fb.host}/#{fb.booktype}/#{fb.bookid}/contents.atom"
  else
    post=AtomPost.new "http://#{fb.host}#{path}"
  end

  post.content=cont
  post.user=fb.user
  post.pass=fb.pass
  post.date=Time.now
  post.author=fb.user
  post.title=tit
  post.type=type
  s=post.send
  post.down_url(s) unless s.nil?
end