0.8.3 • Published 10 years ago

sailor-module-user v0.8.3

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

Sailor Module User

Build Status Dependency status Dev Dependencies Status NPM Status Gittip

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 /user

The 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 /user

Find One User

GET /user/:id

You can specified the user that you want to recover in the url by id:

GET /user/1

or create a more specified query using url params:

GET /user/?username=user2&email=user2@sailor.com

Destroy an User

DELETE /user/:id

Authentication

Login

POST /user/login

You can login a user with his username:

{
	identifier: "user2",
	password: "yourpassword"
}

or with the email:

{
	identifier: "user2@sailor.com",
	password: "yourpassword"
}

Logout

GET /user/logout

Relationship

get following or followers users

GET /user/:id/following

or

GET /user/:id/follower

starts follow other User

POST /user/:id/following

with:

{
	follower: 'yourfollowerID'
}

status relationship

GET /user/:id/following/status

with:

{
	follower: 'yourfollowerID'
}

unfollow

DELETE /user/:id/following

with:

{
	follower: 'yourfollowerID'
}
0.8.3

10 years ago

0.8.2

10 years ago

0.8.1

10 years ago

0.8.0

10 years ago

0.7.8

10 years ago

0.7.7-c

10 years ago

0.7.7-b

10 years ago

0.7.7

10 years ago

0.7.5

10 years ago

0.7.3

10 years ago

0.7.2

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.13

10 years ago

0.5.12

10 years ago

0.5.11

10 years ago

0.5.10

10 years ago

0.5.6

10 years ago

0.5.5

10 years ago

0.5.1

10 years ago

0.4.4

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago