Made with NodeJS, Express, a warm heart ❤️ and a stomach full of pasta 🍝 .
Go to https://dadjokes-api.herokuapp.com/api-docs/ to view the docs for the backend server.
This document outlines the expected JSON object response for the GET
requests
for each of the API resource types.
Note: all API requests expect an
Authorization
header containing the JWT token for the currently logged-in user (as defined byGET /api/users/me
).
/**
* GET /api/users/me
*
* @returns {<User>}
*/
{
id;
name;
email;
avatar_url: "url";
jokes: [
{
id,
setup,
punchline,
user_id
},
{
id,
setup,
punchline,
user_id
}
];
}
/**
* GET /api/jokes
*
* @returns {Array.<Joke>}
*/
[
{
id,
setup,
punchline,
user_id,
private
},
{
id,
setup,
punchline,
user_id,
private
}
];
/**
* GET /api/jokes/:id
*
* @returns {<Joke>}
*/
{
id, setup, punchline, user_id, private;
}
/**
* GET /api/jokes/:id
*
* @returns {<Avatars>}
*/
{
id, url, user_id;
}