1\name{dmGet}
2\alias{dmGet}
3\alias{dmSent}
4\alias{dmDestroy}
5\alias{dmSend}
6\title{ Functions to manipulate Twitter direct messages }
7\description{
8  These functions allow you to interact with, send, and delete direct
9  messages (DMs) in Twitter.
10}
11\usage{
12dmGet(n=25, sinceID=NULL, maxID=NULL, ...)
13dmSent(n=25, sinceID=NULL, maxID=NULL, ...)
14dmDestroy(dm, ...)
15dmSend(text, user, ...)
16}
17\arguments{
18  \item{text}{The text of a message to send}
19  \item{user}{The user to send a message to, either \code{character} or
20    an \code{\link{user}} object.}
21  \item{dm}{The message to delete, an object of class \code{\link{directMessage}}}
22  \item{n}{ The maximum number of direct messages to return }
23  \item{sinceID}{If not \code{NULL}, an ID representing the earliest
24    boundary}
25  \item{maxID}{If not \code{NULL}, an ID representing the newest ID you
26    wish to retrieve}
27  \item{...}{Further arguments to pass along the communication chain}
28}
29\value{
30  These functions will not work without \code{OAuth} authentication
31
32  The \code{dmGet} and \code{dmSent} functions will return a list of
33  \code{\link{directMessage}} objects.  The former will retrieve DMs
34  sent to the user while the latter retrieves messages sent from the user.
35
36  The \code{dmDestroy} function takes a \code{\link{directMessage}}
37  object (perhaps from either \code{dmGet} or \code{dmSent}) and will
38  delete it from the Twitter server.
39
40  The \code{dmSend} function will send a message to another Twitter user.
41}
42\author{Jeff Gentry}
43\seealso{\code{\link{directMessage}}, \code{\link{registerTwitterOAuth}}}
44\examples{
45  \dontrun{
46           dms <- dmGet()
47           dms
48           ## delete the first one
49           dms[[1]]$destroy()
50           dmDestroy(dms[[2]])
51           ## send a DM
52           dmSend('Testing out twitteR!', 'twitter')
53   }
54}
55\keyword{ interface }
56
57