Last active
February 26, 2019 05:59
-
-
Save nevivurn/8c0180f058ed84ef06955e82510288be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/api | |
/group: | |
GET: list of groups and my relation to group | |
200: | |
[{ | |
"idx": 1, "name": {"ko": "korean name", "en": "english name"}, "description": {"ko": "kor desc", "en": "en desc"}, | |
"is_pending": false, | |
"is_member": true, | |
"is_owner": true | |
}, {...}] | |
401: not logged in | |
/group/123/apply: | |
POST: apply to group 123 | |
200: success | |
400: errors, eg. already applied, invalid group, etc. | |
401: not logged in | |
/group/123/pending: | |
GET: list applications for group 123 | |
200: | |
[{ | |
"uid": 1, "username": "hong ggildong" | |
}, {...}] | |
401: if not owner | |
400: errors, eg. invalid group, etc. | |
/group/123/members: | |
GET: list of members in group 123 | |
same as applications | |
(check if this returns 200 instead of a dedicated check-ownership endpoint?) | |
/group/123/accept: | |
POST: accept some applications for group 123 | |
[1,2,3,4,44] | |
200: success | |
400: error on at least one approval | |
401: if not owner | |
/group/123/reject: | |
POST: reject some applications | |
same as group/accept | |
/group/123/leave: | |
POST: leave a group | |
200: success | |
400: errors, eg. not in group, etc. | |
all endpoints 401 if not logged in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment