-
URL
-
Method:
POST
-
URL Params
Required:
name=[string]
,email=[string]
,password=[string]
,phone=[integer]
Optional:
id=[integer]
-
Data Params
{ "name": "Sean Zhang", "email": "sean@randomemail.com", "password": "psw123", "phone": 2023334444 }
-
Success Response:
- Code: 200
Content:{ id : 12 }
- Code: 200
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:{ error : "registration error" }
- Code: 401 UNAUTHORIZED
-
URL
-
Method:
GET
-
URL Params
Required:
id=[integer]
-
Data Params
{ "id": 1, }
-
Success Response:
- Code: 200
Content:{ id : 11 }
- Code: 200
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:{ error : "can't find user" }
- Code: 401 UNAUTHORIZED
-
URL
-
Method:
GET
-
URL Params
NONE
-
Success Response:
- Code: 200
Content:[ { "id": 1, "name": "Kevin Hart", "email": "kevin@gmail.com", "password": "$2a$10$cVR6XquMOMHlKQzay8lErui3w6/.j2ZtVm5ai5IeeY90ZeYGXGGza", "phone": 1231231122, "createdAt": "2018-08-11", "updatedAt": "2018-08-11" }, { "id": 2, "name": "2 Pac", "email": "twopac@gmail.com", "password": "$2a$10$5COzp14UCuBBPxqvxOAxNesRkbwLdtVdD24I9SJIat9Nxumg3z0WW", "phone": 1231231122, "createdAt": "2018-08-11", "updatedAt": "2018-08-11" } ]
- Code: 200
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:{ error : "users can be listed" }
- Code: 401 UNAUTHORIZED
-
URL
-
Method:
GET
-
URL Params
term=[string]
,lat=[double]
,long=[double]
,x-access-token=[string]
-
Success Response:
- Code: 200
Content:[ { "name": "Vero Pizza Napoletana", "url": "https://s3-media4.fl.yelpcdn.com/bphoto/OjoO-z3WBwRzlHifvP0vcA/o.jpg", "rating": 4, "price": "$$", "review_count": 156 }, { "name": "Dewey's Pizza", "url": "https://s3-media1.fl.yelpcdn.com/bphoto/iOboHiGvLgp24eOkVRyEiQ/o.jpg", "rating": 4.5, "price": "$$", "review_count": 147 } ]
- Code: 200
-
Error Response:
- Code: 401 UNAUTHORIZED
Content:{ error : "business can be listed" }
- Code: 401 UNAUTHORIZED
- The api is build on Bitrise and deployed to the dev server
- If you are contributing and want to build the dev server, please DM sean7218
- The api test needs to be written and test needs to be running every day trigger on the Bitrise