Class: Ubiquitously::Twitter::Post
- Inherits:
-
Service::Post
- Object
- Base
- Service::Post
- Ubiquitously::Twitter::Post
- Defined in:
- lib/ubiquitously/services/twitter.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
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/ubiquitously/services/twitter.rb', line 46 def create response = access_token.post("/statuses/update.json", { "status" => token[:description], "include_entities" => true }) result = JSON.parse(response.body) if result.has_key?("error") raise result["error"].to_s end end |