Interface - PM-XingYi/XingYi GitHub Wiki
| root | url | method | function | payload | auth | return |
|---|---|---|---|---|---|---|
| /login | /individual | post | login for individual user | {username, password} | redirect | |
| /organization | post | login for organization user | {username, password} | redirect | ||
| /superuser | post | login for superuser | {username, password} | redirect | ||
| /register | /individual | post | register for individual user | {username, password, email,mobile} | {success,message} | |
| /organization | post | register for organization user | {username, password, email, phone, instituteName, instituteNumber} | {success, message} | ||
| /project | /all | get | get all available projects | - | {total, project:[Project]} | |
| /:id | get | get project with specified id | - | Project | ||
| /:id/joinedIndividual | get | get public profile of joined individuals | - | T | {total, individual:[Individual]} | |
| /:id/donation | get | get donation list of a project | - | T | {total, donation:[Donation]} | |
| /:id/comment | get | get comment list of a project | - | {total, comment:[Comment]} | ||
| /latest | get | get latest project with number | total | {total, project:[Project]} | ||
| /publish | post | publish a project | {project} | T | {success, message} | |
| /individual | /profile | get | get user private profile | - | T | individual |
| /profile/edit | post | modify user profile | {key, value} | T | {success, message} | |
| get | get all watched project of current user | - | T | {total, project:[Project]} | ||
| get | get all joined project of current user | - | T | {total, project:[Project]} | ||
| /project/join/:projectId | post | join a project for current user | - | T | {success, message} | |
| /project/unjoin/:projectId | post | unjoin a project for current user | - | T | {success, message} | |
| /project/watch/:projectId | post | watch a project for current user | - | T | {success, message} | |
| /project/unwatch/:projectId | post | unwatch a project for current user | - | T | {success, message} | |
| get | get all comment of current user | - | T | {total, comment:[Comment]} | ||
| /comment | post | publish a new comment | comment | T | {success, message} | |
| /donate/all | get | get all donation of current user | - | T | {total, donation:[Donation]} | |
| /donate | post | make a donation for current user | donation | T | {success, message} | |
| /organization | /project | get | get all project for current user | - | T | {total, project:[Project]} |
| /milestone/add | post | add a milestone for a project | {projectID, date, title, desc} | T | {success, message} | |
| /expenditure/add | post | add a expenditure for a project | {projectID, date, expense, usage} | T | {success, message} | |
| /superuser | /allProject | get | get available or unavailble project | - | T | {total, project:[Project]} |
| /allComment | get | get available or unavailble comment | - | T | {total, comment:[Comment]} | |
| /examProject | post | examine a project | {projectID, approve, remark} | T | {success, message} | |
| /examComment | post | examine an comment | {commentID, approve, remark} | T | {success, message} |
for Project and Comment pls see database schema.
for all interfaces with auth==T, will redirect to login page if fail the auth.