sailor-module-user v0.8.3
Sailor Module User
Module User for Sailor
Install
Install as dependency in your sailor base application:
sailor install sailor-module-user [--save or --save-dev]API
Basic CRUD
Register new user
POST /userThe minimum information to create a new user is:
{
email: "user@sailor.com,"
password: "yourpassword",
username: "user1"
}Check the User Model for know the required, optional and the restriction of each field.
Find all Users
GET /userFind One User
GET /user/:idYou can specified the user that you want to recover in the url by id:
GET /user/1or create a more specified query using url params:
GET /user/?username=user2&email=user2@sailor.comDestroy an User
DELETE /user/:idAuthentication
Login
POST /user/loginYou can login a user with his username:
{
identifier: "user2",
password: "yourpassword"
}or with the email:
{
identifier: "user2@sailor.com",
password: "yourpassword"
}Logout
GET /user/logoutRelationship
get following or followers users
GET /user/:id/followingor
GET /user/:id/followerstarts follow other User
POST /user/:id/followingwith:
{
follower: 'yourfollowerID'
}status relationship
GET /user/:id/following/statuswith:
{
follower: 'yourfollowerID'
}unfollow
DELETE /user/:id/followingwith:
{
follower: 'yourfollowerID'
}11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago