to post a question:
/api/question with the body parameter
question: {"messageText":String,"messageTitle":String,"messageTags":Array,"messageAuthor":ObjectID}
Returns:
to get questions:
/api/question/api/question?sortby=date/api/question?sortby=date&order=1/api/question?sortby=date&order=-1
The parameter sortby can take values date, views, scores, and n_answers; order is either 1 or -1. Default values are date and -1 respectively.
Returns an array of objects or error
Currently implemented APIs:
question
:/api/question
with thebody
parameterquestion: {"messageText":String,"messageTitle":String,"messageTags":Array,"messageAuthor":ObjectID}
Returns:questions
:/api/question
/api/question?sortby=date
/api/question?sortby=date&order=1
/api/question?sortby=date&order=-1
The parametersortby
can take valuesdate
,views
,scores
, andn_answers
;order
is either1
or-1
. Default values aredate
and-1
respectively. Returns an array of objects or error