Description Details Fields Methods Author(s) See Also Examples
Provides a model representing direct messages (DMs) from Twitter
The directMessage class is implemented as a reference class.
As there should be no backwards compatibility issues, there are no S4
methods provided as with the user and status classes.
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 dmFactory. Accessor set
& get methods are provided for every field using reference class
$accessors() methodology (see setRefClass for
more details). As an example, the sender field could be
accessed using object$getSender() and object$setSender().
The constructor of this object assumes that the user is passing in a JSON encoded Twitter Direct Message. It is also possible to directly pass in the arguments.
text:Text of the DM
recipient:A user object representing the
recipient of the message
recipientSN:Screen name of the recipient
recipientID:ID number of the recipient
sender:A user object representing the sender
of the message
senderSN:Screen name of the sender
senderID:ID number of the sender
created:When the messages was created
destroy:Deletes this DM from Twitter. A wrapper
around dmDestroy
toDataFrame:Converts this into a one row
data.frame, with each field representing a column.
This can also be accomplished by the S4 style
as.data.frame(objectName).
Jeff Gentry
dmGet, dmSend, dmDestroy, setRefClass
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.