게시글(사진)
show posts list(home)
GET http://api.phopo.best/api/posts
This endpoint
Query Parameters
action
integer
1003
created_time
string
'처음에는 "" 로 벨류값을 보내고 페이징 할 때 마다 서버에서 보내준 created_time을 첨부해서 보냄'
page
string
'페이징 시 표시 해 줄 아이템 넘버 첨부하여 보내준다'
Headers
Authorization
string
ex) 'jwt eyJ0eXAIOIJKV1Q.....'
{
"payload": {
"items": [
{
"id": 1643,
"posts_image": "https://avon-spott-imageserver.s3.ap-northeast-2.amazonaws.com/media/post/p20200208231013.jpg",
"created": "2020-02-08T23:10:15.101964+09:00"
},
...
...
...
],
"created_time": "2020-02-08 14:10:15.101964+00:00",
"pageable": true
},
"message": "show posts list"
}{
"error": {
"message": "Send it in a bundle name 'sending'"
}
}{
"error": {
"<required key>": "<required key> field is required"
...
...
...
}
}show posts list(map)
GET http://api.phopo.best/api/posts
Query Parameters
lat_sw
number
'핸드폰 화면 좌측 상단(북서쪽) 위도 값' (float)
lat_ne
number
'핸드폰 화면 우측 하단(동남쪽) 위도 값' (float)
lng_sw
number
'핸드폰 화면 좌측 상단(북서쪽)경도 값' (float)
lng_ne
number
'핸드폰 화면 우측 하단(동남쪽)경도 값' (float)
action
integer
1004
Headers
Authorization
string
'규칙 참
show posts detail
GET http://api.phopo.best/api/posts/:pk
Path Parameters
pk
integer
'게시물의 primary key'
Headers
Authorization
string
ex) 'jwt eyJ0eXAIOJKV1Q.....'
create posts
POST http://api.phopo.best/api/posts/:pk
Headers
Authorization
string
ex) 'jwt eyJ0eXAIOJKV1Q....'
Request Body
tag
string
"게시물에 해쉬태그가 있을 경우 #을 포함하여 string으로 전달 ex) "#하하#경복궁#셀렉티드#좋아요"
latitude
integer
'float 위도값'
longitude
integer
'float 경도값'
contents
string
'게시물 내용'
posts_image
object
'Multiform Data File게시물 이미지'
back_image
object
'Multiform Data File백그라운드 이미지'
partial_update
PATCH http://api.phopo.best/api/posts/:pk
Path Parameters
pk
integer
'게시글의 pk'
Headers
Authorization
string
ex) 'jwt asdkTOFK145F....'
Request Body
contents
string
'수정 할 내용'
delete posts
DELETE http://api.phopo.best/api/posts/:pk
Path Parameters
pk
integer
'게시글의 pk'
Headers
Authorization
string
ex) 'jwt TOFkfeisk57.....'
Last updated
Was this helpful?