Class: Ubiquitously::Webdev5::Post
- Inherits:
-
Service::Post
- Object
- Base
- Service::Post
- Ubiquitously::Webdev5::Post
- Defined in:
- lib/ubiquitously/services/webdev5.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
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ubiquitously/services/webdev5.rb', line 18 def create page = agent.get("http://webdev5.com/submit") form = page.forms.detect {|form| form.form_node["id"] == "node-form"} form["url"] = token[:url] form["title"] = token[:title] form["body"] = token[:body] form.field_with(:name => "taxonomy[1]")..each do |option| end form["taxonomy[tags][2]"] = token[:tags] end |