Learn R Programming

twitteR (version 0.99.2)

status-class: Class to contain a Twitter status

Description

Container for Twitter status messages, including the text as well as basic information

Arguments

Details

The status class is implemented as a reference class. This class was previously implemented as an S4 class, and for backward compatibility purposes the old S4 accessor methods have been left in, although new code should not be written with these. An instance of a generator for this class is provided as a convenience to the user as it is configured to handle most standard cases. To access this generator, use the object statusFactory. Accessor set & get methods are provided for every field using reference class $accessors() methodology (see setRefClass for more details). As an example, the screenName field could be accessed using object$getScreenName and object$setScreenName.

The constructor of this object assumes that the user is passing in a JSON encoded Twitter status. It is also possible to directly pass in the arguments.

See Also

publicTimeline, userTimeline, setRefClass

Examples

Run this code
## This example is run, but likely not how you want to do things
   st <- statusFactory$new(screenName="test", text="test message")
   st$getScreenName()
   st$getText()

   ## Assume 'json' is the return from a Twitter call
     st <- statusFactory$new(json)
     st$getScreenName()

Run the code above in your browser using DataLab