Class: Ubiquitously::Service::Post
- Includes:
- Loggable::Post, Ownable::Post, Postable::Post, Restful::Post
- Defined in:
- lib/ubiquitously/models/service/post.rb
Direct Known Subclasses
BloggerDen::Post, Chetzit::Post, CodeProject::Post, Delicious::Post, DesignBump::Post, Designgizer::Post, DesignrFix::Post, Digg::Post, Digzign::Post, Diigo::Post, Dzone::Post, DzoneSnippets::Post, Facebook::Post, Faves::Post, Favshare::Post, Flikode::Post, Friendfeed::Post, Gist::Post, GoogleBuzz::Post, Identica::Post, JumpTags::Post, Kailoon::Post, MetaFilter::Post, Mixx::Post, Mmo::Post, MvcForge::Post, MySpace::Post, Nestdev::Post, Newsvine::Post, PixelGroovy::Post, Posterous::Post, ProgrammersHeaven::Post, Propeller::Post, Queness::Post, Reddit::Post, Ubiquitously::Scribd::Post, Ubiquitously::ScriptAndStyle::Post, Ubiquitously::Sharebrain::Post, Ubiquitously::Shoutwire::Post, Ubiquitously::Slideshare::Post, Ubiquitously::Smipple::Post, Ubiquitously::Snipplr::Post, Ubiquitously::Snipt::Post, Ubiquitously::Sphinn::Post, Ubiquitously::StumbleUpon::Post, Ubiquitously::Stumpedia::Post, Tumblr::Post, Tweako::Post, Twitter::Post, WebBlend::Post, Webdev5::Post, WhoFreelance::Post, Wordtaps::Post, YahooBuzz::Post, Youblr::Post, Zabox::Post
Instance Attribute Summary collapse
-
#captcha ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#description ⇒ Object
Returns the value of attribute description.
-
#downvotes ⇒ Object
Returns the value of attribute downvotes.
-
#extension ⇒ Object
plain, html, markdown.
-
#format ⇒ Object
plain, html, markdown.
-
#image ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
-
#kind ⇒ Object
kind == regular, link, quote, photo, conversation, video, audio, answer.
-
#must_be_unique ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
-
#privacy ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
-
#rating ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
-
#remote ⇒ Object
Returns the value of attribute remote.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
-
#service_url ⇒ Object
Returns the value of attribute service_url.
-
#slug ⇒ Object
max 55 chars, for custom url if possible.
-
#source ⇒ Object
the application that automates! (“Posted by TweetMeme”).
-
#source_url ⇒ Object
the application that automates! (“Posted by TweetMeme”).
-
#state ⇒ Object
published, draft, submission, queue.
-
#status ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
-
#token ⇒ Object
validates_presence_of :title, :description, :tags.
-
#upvotes ⇒ Object
Returns the value of attribute upvotes.
-
#url ⇒ Object
Returns the value of attribute url.
-
#user ⇒ Object
Returns the value of attribute user.
-
#vote ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also.
Instance Method Summary collapse
- #access_token ⇒ Object
-
#initialize(attributes = {}) ⇒ Post
constructor
A new instance of 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
#initialize(attributes = {}) ⇒ Post
Returns a new instance of Post.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ubiquitously/models/service/post.rb', line 34 def initialize(attributes = {}) apply attributes raise 'please give me a user' if self.user.blank? self.format ||= "text" self.privacy = 0 if self.privacy.nil? self.categories ||= [] self. ||= [] self.upvotes ||= 0 self.downvotes ||= 0 # for httparty @auth = {:username => username, :password => password} end |
Instance Attribute Details
#captcha ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def captcha @captcha end |
#categories ⇒ Object
Returns the value of attribute categories.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def categories @categories end |
#description ⇒ Object
Returns the value of attribute description.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def description @description end |
#downvotes ⇒ Object
Returns the value of attribute downvotes.
17 18 19 |
# File 'lib/ubiquitously/models/service/post.rb', line 17 def downvotes @downvotes end |
#extension ⇒ Object
plain, html, markdown
23 24 25 |
# File 'lib/ubiquitously/models/service/post.rb', line 23 def extension @extension end |
#format ⇒ Object
plain, html, markdown
23 24 25 |
# File 'lib/ubiquitously/models/service/post.rb', line 23 def format @format end |
#image ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def image @image end |
#kind ⇒ Object
kind == regular, link, quote, photo, conversation, video, audio, answer
21 22 23 |
# File 'lib/ubiquitously/models/service/post.rb', line 21 def kind @kind end |
#must_be_unique ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def must_be_unique @must_be_unique end |
#privacy ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def privacy @privacy end |
#rating ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def @rating end |
#remote ⇒ Object
Returns the value of attribute remote.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def remote @remote end |
#service_id ⇒ Object
Returns the value of attribute service_id.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def service_id @service_id end |
#service_url ⇒ Object
Returns the value of attribute service_url.
17 18 19 |
# File 'lib/ubiquitously/models/service/post.rb', line 17 def service_url @service_url end |
#slug ⇒ Object
max 55 chars, for custom url if possible
25 26 27 |
# File 'lib/ubiquitously/models/service/post.rb', line 25 def slug @slug end |
#source ⇒ Object
the application that automates! (“Posted by TweetMeme”)
19 20 21 |
# File 'lib/ubiquitously/models/service/post.rb', line 19 def source @source end |
#source_url ⇒ Object
the application that automates! (“Posted by TweetMeme”)
19 20 21 |
# File 'lib/ubiquitously/models/service/post.rb', line 19 def source_url @source_url end |
#state ⇒ Object
published, draft, submission, queue
27 28 29 |
# File 'lib/ubiquitously/models/service/post.rb', line 27 def state @state end |
#status ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def status @status end |
#tags ⇒ Object
Returns the value of attribute tags.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def title @title end |
#token ⇒ Object
validates_presence_of :title, :description, :tags
12 13 14 |
# File 'lib/ubiquitously/models/service/post.rb', line 12 def token @token end |
#upvotes ⇒ Object
Returns the value of attribute upvotes.
17 18 19 |
# File 'lib/ubiquitously/models/service/post.rb', line 17 def upvotes @upvotes end |
#url ⇒ Object
Returns the value of attribute url.
13 14 15 |
# File 'lib/ubiquitously/models/service/post.rb', line 13 def url @url end |
#user ⇒ Object
Returns the value of attribute user.
17 18 19 |
# File 'lib/ubiquitously/models/service/post.rb', line 17 def user @user end |
#vote ⇒ Object
some sites check to see if you’re posting duplicate content! perhaps “vote” can mean “favorite” also
16 17 18 |
# File 'lib/ubiquitously/models/service/post.rb', line 16 def vote @vote end |
Instance Method Details
#access_token ⇒ Object
54 55 56 |
# File 'lib/ubiquitously/models/service/post.rb', line 54 def access_token user.account_for(self).access_token end |