Parent

Included Modules

Twitter::Status

Represents a status posted to Twitter by a Twitter user.

Public Class Methods

attributes() click to toggle source

Used as factory method callback

     # File lib/twitter/model.rb, line 235
235:       def attributes; @@ATTRIBUTES; end
create(params) click to toggle source

Creates a new status for the authenticated user of the given client context.

You MUST include a valid/authenticated client context in the given params argument.

For example:

 status = Twitter::Status.create(
   :text => 'I am shopping for flip flops',
   :client => client)

An ArgumentError will be raised if no valid client context is given in the params Hash. For example,

 status = Twitter::Status.create(:text => 'I am shopping for flip flops')

The above line of code will raise an ArgumentError.

The same is true when you do not provide a :text key-value pair in the params argument given.

The Twitter::Status object returned after the status successfully updates on the Twitter server side is returned from this method.

     # File lib/twitter/model.rb, line 264
264:       def create(params)
265:         client, text = params[:client], params[:text]
266:         raise ArgumentError, 'Valid client context must be provided' unless client.is_a?(Twitter::Client)
267:         raise ArgumentError, 'Must provide text for the status to update' unless text.is_a?(String)
268:         client.status(:post, text)
269:       end
find(id, client) click to toggle source

Returns status model object with given status using the configuration and credentials of the client object passed in.

     # File lib/twitter/model.rb, line 239
239:       def find(id, client)
240:         client.status(:get, id)
241:       end

Public Instance Methods

reply(status) click to toggle source
     # File lib/twitter/model.rb, line 276
276:     def reply(status)
277:       client.status(:reply, :status => status, :in_reply_to_status_id => @id)
278:     end
reply?() click to toggle source
     # File lib/twitter/model.rb, line 272
272:     def reply?
273:       !!@in_reply_to_status_id
274:     end

Protected Instance Methods

init() click to toggle source

Constructor callback

     # File lib/twitter/model.rb, line 282
282:       def init
283:         @user = User.new(@user) if @user.is_a?(Hash)
284:         @created_at = Time.parse(@created_at) if @created_at.is_a?(String)
285:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.