Class: Ubiquitously::Kailoon::Post
- Inherits:
-
Service::Post
- Object
- Base
- Service::Post
- Ubiquitously::Kailoon::Post
- Defined in:
- lib/ubiquitously/services/kailoon.rb
Instance Attribute Summary
Attributes inherited from Service::Post
#captcha, #categories, #description, #downvotes, #extension, #format, #image, #kind, #must_be_unique, #privacy, #rating, #remote, #service_id, #service_url, #slug, #source, #source_url, #state, #status, #tags, #title, #token, #upvotes, #url, #user, #vote
Instance Method Summary collapse
Methods inherited from Service::Post
Methods included from Loggable::Post
Methods included from Restful::Post
Methods included from Postable::Post
Methods included from Ownable::Post
Methods inherited from Base
Methods included from SubclassableCallbacks
Constructor Details
This class inherits a constructor from Ubiquitously::Service::Post
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ubiquitously/services/kailoon.rb', line 10 def create page = agent.get("http://kailoon.com/web-design-news/") form = page.forms.detect { |form| form.form_node["id"] == "commentform" } # weird, but this is how they're doing it form["author"] = title form["url"] = url form["email"] = user.email # 200 word max form["comment"] = description page = form.submit true end |