Question List - Main Feed
메인 피드 리스트
내가 한 질문을 제외한 내가 팔로우 한 유저의 글, 내가 선택한 전문분야, 내가 선택한 관심분야의 질문들을 모두 보여 줍니다.Pagination query parameter의 key값으로 page를 전달하여 원하는 페이지에 접근이 가능합니다. 한 페이지당 5개의 objects가 리턴됩니다.
next 를 통해 다음 5개의 post가 있는 페이지, previous 를 통해 이전 5개의 post가 있는 페이지를 부를 수 있습니다.
최대 페이지 이후의 값은 최대 페이지와 동일한 objects들을 리턴합니다.
URL
/post/question/main_feed/
Method
GET
Query Parameters
Key | Description | Type | URI |
---|---|---|---|
page | 해당 페이지의 질문들을 가져옴 | Integer | /post/question/?page=1 |
Seccess Response
HTTP Status Code
200
Key | Description | Type |
---|---|---|
count | objects의 갯수 | Integer |
next | 다음 페이지 URI | Integer |
previous | 이전 페이지 URI | Integer |
pk | Question pk | Integer |
url | pk에 해당하는 질문의 question-detail 페이지 링크 | String |
user | 질문을 생성한 유저의 profile-main-detail 페이지 링크 | String |
content | 질문 내용 | String |
bookmark_count | 해당 질문을 북마크 한 수 | Integer |
follow_count | 해당 질문을 팔로우 한 수 | Integer |
comment_count | 해당 질문에 달린 댓글 수 | Integer |
created_at | 질문 생성 날짜 | Date |
modified_at | 질문 수정 날짜 | Date |
topics | 해당 질문이 속하는 토픽들의 topic-detail 링크 | String |
content
{
"count": 10,
"next": "http://localhost:8000/post/question/?page=3",
"previous": "http://localhost:8000/post/question/?page=2",
"results": [
{
"question": {
"pk": 3,
"url": "http://localhost:8000/post/question/3/",
"user": "http://localhost:8000/user/1/profile/main-detail/",
"content": "대통령 선거날짜가 언제인가요?",
"bookmark_count": 0,
"follow_count": 0,
"comment_count": 0,
"created_at": "2017-12-13",
"modified_at": "2017-12-13T08:57:41.774859+09:00"
},
"topics": [
"http://localhost:8000/topic/1/",
"http://localhost:8000/topic/2/"
]
},
{
"question": {
"pk": 4,
"url": "http://localhost:8000/post/question/4/",
"user": "http://localhost:8000/user/1/profile/main-detail/",
"content": "대통령 선거날짜가 언제인가요?",
"bookmark_count": 0,
"follow_count": 0,
"comment_count": 0,
"created_at": "2017-12-13",
"modified_at": "2017-12-13T08:58:28.189260+09:00"
},
"topics": [
"http://localhost:8000/topic/3/",
"http://localhost:8000/topic/5/"
]
}
]
}