seQuestion-class: Class '"seQuestion"': A class to represent a StackExchange...

Description Details Fields Author(s) See Also Examples

Description

Provides a model for a question from a StackExchange website

Details

The seQuestion class is implemented as a reference class. 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 seQuestionFactory. Accessor set & get methods are provided for every field using reference class $accessors() methodology (see setRefClass). As an example, the score field could be accessed with object$getScore() and object$setScore().

Fields

questionID:

Internal ID of the question

answerCount:

Number of answers for this question

favoriteCount:

How many times the question has been favorited

owner:

The owner of the question, a seUser object

creationDate:

POSIXct date of when this question was asked

lastActivityDate:

POSIXct date of the last activity on this question

upVoteCount:

Number of up votes given

downVoteCount:

Number of down votes given

viewCount:

Number of times the question has been viewed

score:

Total score of the question

communityOwned:

Logical, is this a community owned question

title:

Title of the question

comments:

List of seComment objects, providing all the comments on this question

tags:

List of seTag objects, providing all the tags associated with this question

answers:

List of seAnswer objects, providing all the answers for this question

site:

StackExchange site this answer belongs to

Author(s)

Jeff Gentry

See Also

getQuestions, getUnansweredQuestions, getNoAnswerQuestions, getQuestionLinks, getQuestionRelated, setRefClass

Examples

1
2
   zz <- getQuestions(num=5)
   sapply(zz, function(x) x$getScore())

geoffjentry/RStackExchange documentation built on May 17, 2019, 1:11 a.m.