My Group List
요청을 보낸 사용자가 가입한 MyGroup object의 목록을 돌려줍니다.
GET Parameter로 Pagination 번호인 page를 받을 수 있으며, 주어지지 않을 경우 1페이지로 취급됩니다.
URL/group/my-group/
MethodGET
Header
Key | Description | Value | Type | Require |
---|---|---|---|---|
Authorization | 요청을 보내는 유저의 token | user token | String | True |
URL Params
Key | Description | Value | Type | Require |
---|---|---|---|---|
page | 페이지 번호 | Page number | Integer | False |
Success response
HTTP Status code200
Content
{
"count": [사용자가 가입한 MyGroup 개수],
"next" [다음 page API주소 링크, 존재하지 않으면 null],
"previous": [이전 page API주소 링크, 존재하지 않으면 null],
"results" [
//해당 page에 속하는 MyGroup 목록
{
//각 Group object
},
{
...
}
]
}
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"pk": 1,
"name": "Test Group",
"profile_img": "http://localhost:8000/static/images/no_image.png",
"owner": {
"pk": 1,
"email": "[email protected]",
"nickname": "admin",
"username": "",
"profile_img": "http://localhost:8000/static/images/no_profile.png"
},
"group_type": "PUBLIC",
"description": "description input test",
"num_of_members": 2,
"tags": [
{
"pk": 1,
"name": "test1"
},
{
"pk": 2,
"name": "test2"
},
{
"pk": 3,
"name": "test3"
}
]
},
{
"pk": 2,
"name": "Test Group2",
"profile_img": "http://localhost:8000/static/images/no_image.png",
"owner": {
"pk": 1,
"email": "[email protected]",
"nickname": "admin",
"username": "",
"profile_img": "http://localhost:8000/static/images/no_profile.png"
},
"group_type": "PUBLIC",
"description": "description input test",
"num_of_members": 1,
"tags": [
{
"pk": 9,
"name": "test4"
},
{
"pk": 10,
"name": "test5"
},
{
"pk": 11,
"name": "test6"
}
]
}
]
}
Error response
Unauthorized error
HTTP Status code401
Content
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}
Page does not exist error
HTTP Status code404
Content
{
"detail": "Invalid page."
}