name
:screenName
:id
:lastStatus
:description
:statusesCount
:followersCount
:favoritesCount
:friendsCount
:url
:created
:protected
:verified
:location
:listedCount
:followRequestSent
:profileImageUrl
:getFollowerIDs(n=NULL, ...)
:n
values. If n
is NULL, all followers
will be returnedgetFollowers(n=NULL, ...)
:user
objects representing followers of this user, up to a
maximum of n
values. If n
is NULL, all followers
will be returnedgetFriendIDs(n=NULL, ...)
:n
values. If n
is NULL, all friends
will be returnedgetFriends(n=NULL, ...)
:user
objects representing users this user follows, up to a
maximum of n
values. If n
is NULL, all friendss
will be returnedtoDataFrame(row.names=NULL, optional=FALSE)
:data.frame
, with each field except for
lastStatus
representing a column.
This can also be accomplished by the S4 style
as.data.frame(objectName)
.user
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, user the object userFactory
. 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 user. It is also possible to directly pass in the arguments.
status
, setRefClass
## This example is run, but likely not how you want to do things
us <- userFactory$new(screenName="test", name="Joe Smith")
us$getScreenName()
us$getName()
## Not run:
# ## Assume 'json' is the return from a Twitter call
# us <- userFactory$new(json)
# us$getScreenName()
# ## End(Not run)
Run the code above in your browser using DataLab