게시글(사진)

show posts list(home)

GET http://api.phopo.best/api/posts

This endpoint

Query Parameters

Name
Type
Description

action

integer

1003

created_time

string

'처음에는 "" 로 벨류값을 보내고 페이징 할 때 마다 서버에서 보내준 created_time을 첨부해서 보냄'

page

string

'페이징 시 표시 해 줄 아이템 넘버 첨부하여 보내준다'

Headers

Name
Type
Description

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"
}

show posts list(map)

GET http://api.phopo.best/api/posts

Query Parameters

Name
Type
Description

lat_sw

number

'핸드폰 화면 좌측 상단(북서쪽) 위도 값' (float)

lat_ne

number

'핸드폰 화면 우측 하단(동남쪽) 위도 값' (float)

lng_sw

number

'핸드폰 화면 좌측 상단(북서쪽)경도 값' (float)

lng_ne

number

'핸드폰 화면 우측 하단(동남쪽)경도 값' (float)

action

integer

1004

Headers

Name
Type
Description

Authorization

string

'규칙 참

{
    "payload": [
        {
            "id": 1705,
            "posts_image": "https://avon-spott-imageserver.s3.ap-northeast-2.amazonaws.com/media/post/p20200225172514.jpg",
            "latitude": 37.5658438952597,
            "longitude": 126.980955787003
        },
        ...
        ...
        ...
        
  ],
    "message": "show posts list(lat,long)"
}

show posts detail

GET http://api.phopo.best/api/posts/:pk

Path Parameters

Name
Type
Description

pk

integer

'게시물의 primary key'

Headers

Name
Type
Description

Authorization

string

ex) 'jwt eyJ0eXAIOJKV1Q.....'

{
    "payload": {
        "id": 40,
        "user": {
            "user_uid": "user4@naver.com",
            "nickname": "지코",
            "profile_image": "https://avon-spott-imageserver.s3.ap-northeast-2.amazonaws.com/media/usr/EFzowrJUYAAT4oF.jpg"
        },
        "hashtag": [],
        "posts_image": "https://avon-spott-imageserver.s3.ap-northeast-2.amazonaws.com/media/post/seagull-4795739_640_ddbGmmg.jpg",
        "back_image": "https://avon-spott-imageserver.s3.ap-northeast-2.amazonaws.com/media/postb/seagull-4795739_640_8I7Oz2A.jpg",
        "latitude": 35.3401850120066,
        "longitude": 128.593568771927,
        "contents": "처",
        "views": 0,
        "created": "2020-02-01T16:30:14.724426+09:00",
        "public": true,
        "like_user": [],
        "comment": 0,
        "scrap_users": [],
        "count": 0,
        "like_checked": false,
        "scrap_checked": false,
        "myself": false
        "result": 1200
    },
    "message": "show posts detail success"
}

create posts

POST http://api.phopo.best/api/posts/:pk

Headers

Name
Type
Description

Authorization

string

ex) 'jwt eyJ0eXAIOJKV1Q....'

Request Body

Name
Type
Description

tag

string

"게시물에 해쉬태그가 있을 경우 #을 포함하여 string으로 전달 ex) "#하하#경복궁#셀렉티드#좋아요"

latitude

integer

'float 위도값'

longitude

integer

'float 경도값'

contents

string

'게시물 내용'

posts_image

object

'Multiform Data File게시물 이미지'

back_image

object

'Multiform Data File백그라운드 이미지'

"{
    \"payload\": {
        \"success\": true
    }, 
    \"message\": \"Created success\"
}"

partial_update

PATCH http://api.phopo.best/api/posts/:pk

Path Parameters

Name
Type
Description

pk

integer

'게시글의 pk'

Headers

Name
Type
Description

Authorization

string

ex) 'jwt asdkTOFK145F....'

Request Body

Name
Type
Description

contents

string

'수정 할 내용'

"{
    \"payload\": {
        \"result\": true
    }, 
    \"message\": \"partial_update success\"
}"

delete posts

DELETE http://api.phopo.best/api/posts/:pk

Path Parameters

Name
Type
Description

pk

integer

'게시글의 pk'

Headers

Name
Type
Description

Authorization

string

ex) 'jwt TOFkfeisk57.....'

"{
    \"payload\": {
        \"result\": true
    }, 
    \"message\": \"delete success\"
}"

Last updated

Was this helpful?