GLO-3112 - Développement avancé d'applications web - API - Livrable 2
The API is available at the following address : http://sample-env.ttuhj5f6tu.us-east-1.elasticbeanstalk.com/
npm install
node app.js
No argument.
Returns all users in the database.
Returns information of one user.
To create a new user.
The body must have :
id
: The idpassword
: The passwordemail
: The emailfirstName
: The first namelastName
: The last namephoneNumber
: The phone number
To update its information.
You can only update your profile. Require authentication and following in header :
{
"Authorization": "Bearer " + "token"
}
The body must have :
email
: new emailfirstName
: new first namelastName
: new last namephoneNumber
: new phone number
To delete user.
You can only delete your profile. Require authentication and following in header :
{
"Authorization": "Bearer " + "token jwt"
}
To connect to the application.
The body must have :
id
: namepassword
: password
It returns the following :
{
"token": "Bearer " + "token"
}
To connect to the application with a Facebook account. If it is the first connection, an account is created with the user's information
No argument.
Returns all pictures in the database.
Returns all pictures of one user.
Returns information of one user's picture.
To upload a picture.
Require authentication and following in header :
{
"Authorization": "Bearer " + "token"
}
The body must have :
file
: The picture
The body can have :
description
: The descriptionmentions
: The mentionstags
: The tags
To update a picture.
You can only update your pictures. Require authentication and following in header :
{
"Authorization": "Bearer " + "token"
}
The body must have :
description
: new descriptionmentions
: new mentionstags
: new tags
To delete a picture.
You can only delete your pictures. Require authentication and following in header :
{
"Authorization": "Bearer " + "token jwt"
}