Topic List
Topic Object 전체 리스트를 반환합니다.
Pagination: page를 통해 다음 페이지를 Access 할 수 있습니다. 한 페이지에는 5개의 post가 나옵니다.
next 를 통해 다음 5개의 post가 있는 페이지, previous 를 통해 이전 5개의 post가 있는 페이지를 부를 수 있습니다.
URL
/topic/
Filter Query Parameters
Parameter | Description | Type | uri |
---|---|---|---|
page | page - 전체 result에서 몇번째 페이지에 해당하는 result를 가지고 올 지 요 | Int | /topic/?page=4 |
page_szie | 한 페이지에 담겨질 Topic의 개수. 1~100까지 | Int | /topic/?page_size=100 |
Method
GET
Success Response
HTTP Status Code
200
Content
Key | Description | Type |
---|---|---|
count | 총 반환된 Topic의 개수 | Int |
next | 다음 페이지로의 링크 | Str |
previous | 이전 페이지로의 링크 | Str |
pk | Topic의 pk | Int |
url | Topic Detail페이지 링크 | Str |
creator | Topic을 만든 유저의 Profile Detail 링크 | Str |
name | Topic의 이름 | Str |
description | Topic에 대한 설명 | Str |
image | Topic에 대한 썸네일 사진으로의 링크 | Str |
answer_count | Topic과 관련된 답변의 개수 | Int |
question_count | Topic과 관련된 질문의 개수 | Int |
expert_count | Topic과 관련된 전문가 Follower수 | Int |
interest_count | Topic과 관련된 관심 Follower수 | Int |
created_at | 생성된 날짜 | Date |
modified_at | 마지막으로 수정된 날짜 - 처음 생성되었을 때는 created_at과 같음 | Date |
{
"count": 38,
"next": "http://localhost:8000/topic/?page=2",
"previous": null,
"results": [
{
"pk": 27,
"url": "http://localhost:8000/topic/27/",
"creator": "http://localhost:8000/user/5/profile/main-detail/",
"name": "사학",
"description": "",
"image": null,
"answer_count": 0,
"question_count": 0,
"expert_count": 0,
"interest_count": 0,
"created_at": "2017-12-09T01:52:23.137686+09:00",
"modified_at": "2017-12-09T01:52:23.137708+09:00"
},
{
"pk": 28,
"url": "http://localhost:8000/topic/28/",
"creator": "http://localhost:8000/user/5/profile/main-detail/",
"name": "미술",
"description": "",
"image": null,
"answer_count": 0,
"question_count": 0,
"expert_count": 0,
"interest_count": 0,
"created_at": "2017-12-09T01:57:27.888900+09:00",
"modified_at": "2017-12-09T01:57:27.888926+09:00"
},
{
"pk": 29,
"url": "http://localhost:8000/topic/29/",
"creator": "http://localhost:8000/user/5/profile/main-detail/",
"name": "정치",
"description": "",
"image": null,
"answer_count": 0,
"question_count": 0,
"expert_count": 0,
"interest_count": 0,
"created_at": "2017-12-09T01:57:53.731898+09:00",
"modified_at": "2017-12-09T01:57:53.731925+09:00"
},
{
"pk": 30,
"url": "http://localhost:8000/topic/30/",
"creator": "http://localhost:8000/user/5/profile/main-detail/",
"name": "외교",
"description": "",
"image": null,
"answer_count": 0,
"question_count": 0,
"expert_count": 0,
"interest_count": 0,
"created_at": "2017-12-09T01:58:08.342466+09:00",
"modified_at": "2017-12-09T01:58:08.342491+09:00"
},
{
"pk": 31,
"url": "http://localhost:8000/topic/31/",
"creator": "http://localhost:8000/user/5/profile/main-detail/",
"name": "컴퓨터공학",
"description": "",
"image": null,
"answer_count": 0,
"question_count": 0,
"expert_count": 0,
"interest_count": 0,
"created_at": "2017-12-09T02:04:15.686065+09:00",
"modified_at": "2017-12-09T02:04:15.686093+09:00"
}
]
}