Primary tools used: NodeJS, Express, MongoDB and Mongoose.
- You can
POSTto/api/userswith form datausernameto create a new user. The returned response will be an object withusernameand_idproperties. - You can make a
GETrequest to/api/usersto get an array of all users. Each element in the array is an object containing a user'susernameand_id. - You can
POSTto/api/users/:_id/exerciseswith form datadescription,duration, and optionallydate. If no date is supplied, the current date will be used. The response returned will be the user object with the exercise fields added. - You can make a
GETrequest to/api/users/:_id/logsto retrieve a full exerciselogof any user. The returned response will be the user object with a log array of all the exercises added. Each log item has thedescription,duration, anddateproperties. - A request to a user's log (
/api/users/:_id/logs) returns an object with acountproperty representing the number of exercises returned. - You can add
from,toandlimitparameters to a/api/users/:_id/logsrequest to retrieve part of thelogof any user.fromandtoare dates inyyyy-mm-ddformat.limitis an integer of how many logs to send back.