-
Notifications
You must be signed in to change notification settings - Fork 4
API
Kyungrae Kim edited this page Nov 26, 2019
·
14 revisions
날짜 | 내용 | 버전 | 작성자 |
---|---|---|---|
2019-11-25 | 기본 포맷 정리 | 0.5 | 이상원 |
2019-11-26 | 개발 api 목록 추가 | 1.0 | 김경래 |
- 현재 개발 중인 api
url 주소 | 구분 | 설명 | link |
---|---|---|---|
/api/channels/ | POST | 채널 생성 | link |
/api/channels/:channelName | GET | 동일한 이름 채널 조회 | link |
/message/:snugId/:roomName | GET | 특정 채널 속 메시지 조회 | link |
/api/posts/ | POST | 메시지[포스트] 생성 | link |
- 개발 api 목록
method | 주소 | body/query | code | 결과 | 설명 |
---|---|---|---|---|---|
get | /api/users/:id/snugs | - | 200 | snug list | snug 리스트를 가져온다. |
get | /api/users/:id/snugs | - | 404 | error | 에러 코드와 메세지를 보낸다. |
- | - | - | - | - | - |
- | - | - | - | - | - |
post | /api/rooms | {room 정보} | 201 | 생성된 room | body 입력 값을 통해 room을 생성한다. |
post | /api/rooms | {room 정보} | 404 | error | 에러 코드와 메세지를 보낸다. |
patch | /api/rooms/:id | {변경 정보} | 202 | 변경된 room | 변경된 room 정보를 받는다. |
patch | /api/rooms/:id | {변경 정보} | 404 | error | 에러 코드와 메세지를 보낸다. |
delete | /api/rooms/:id | - | 202 | ? | 성공 코드와 메세지를 보낸다. |
delete | /api/rooms/:id | - | 404 | error | 에러 코드와 메세지를 보낸다. |
get | api/profiles/:id/rooms | - | 200/204 | room list | profileId가 참여하고 있는 room 리스트를 가져온다. |
get | /api/profiles/:id/rooms | - | 404 | error | 에러 코드와 메세지를 보낸다. |
get | /api/snugs/:id/rooms | - | 200/204 | room list | snug의 존재하는 룸 리스트를 보낸다. |
get | /api/snugs/:id/rooms | - | 404 | error | 에러 코드와 메세지를 보낸다. |
get | /api/snugs/:id/rooms/:name | - | 200/204 | room | snug의 존재하는 룸들의 이름 중복 검사 |
get | /api/snugs/:id/rooms/:name | - | 404 | error | 에러 코드와 메세지를 보낸다. |
- | - | - | - | - | - |
- | - | - | - | - | - |
post | /api/profiles/:Id/rooms/:id | {add} | 202 | ? | room에 참여하는 profile 추가 / 제거 |
delete | /api/profiles/:Id/rooms/:id | {delete} | 202 | ? | room에 참여하는 profile 추가 / 제거 |
- | - | - | - | - | - |
- | - | - | - | - | - |
get | /api/rooms/:id/posts | {offset, limit, content} | 200/204 | post list | room에 종속된 유저 정보가 포함된 post 리스트를 가져온다. |
get | /api/rooms/:id/posts | {offset, limit, content} | 404 | error | 에러 코드와 메세지를 보낸다. |
post | /api/posts | {post, roomId, userId} | 201 | 생성된 post | body 값으로 생성된 post 리턴 |
post | /api/posts | {post, roomId, userId} | 404 | error | 에러 코드와 메세지를 보낸다. |
patch | /api/posts/:id | {변경 정보} | 202 | 변경된 room | 변경된 post를 보내준다. |
patch | /api/posts/:id | {변경 정보} | 404 | error | 에러 코드와 메세지를 보낸다. |
delete | /api/posts/:id | - | 202 | ? | 성공 코드와 메세지를 보낸다. |
delete | /api/posts/:id | - | 404 | error | 에러 코드와 메세지를 보낸다. |
- | - | - | - | - | - |
- | - | - | - | - | - |
get | /api/rooms/:id/profiles | 200 | profile list | 룸에 포함된 profile list | |
get | /api/rooms/:id/profiles | 404 | error | 에러 코드와 메세지를 보낸다. | |
get | /api/profiles/:id | 200 | profile | profile 정보 | |
get | /api/profiles/:id | 404 | error | 에러 코드와 메세지를 보낸다. | |
post | /api/profiles | {profile} | 201 | profile | 생성된 profiles |
post | /api/profiles | {profile} | 404 | error | 에러 코드와 메세지를 보낸다. |
patch | /api/profiles/:id | {수정할 profile} | 202 | profile | 변경된 profile |
patch | /api/profiles/:id | {수정할 profile} | 404 | error | 에러 코드와 메세지를 보낸다. |
delete | /api/profiles/:id | 202 | ? | 성공 코드와 메세지를 보낸다. | |
delete | /api/profiles/:id | 404 | error | 에러 코드와 메세지를 보낸다. |