METHOD : POST
HOST : IP:PORT/users/signin/kakao
BODY :
{
"code" : char_type
}
{"token" : access_token}
{"message" : "KEY_ERROR"}
METHOD : GET
HOST : IP:PORT/users
HEADERS :
{
"Authorization" : token
}
{
"result": {
"user_id" : int_type,
"nickname" : char_type,
"email" : char_type
}
}
METHOD : POST
HOST : IP:PORT/users/like
HEADERS :
{
"Authorization" : token
}
BODY :
{
"project_id" : int_type
}
{
"message": "SUCCESS",
"like_count": 1
}
{
"message": "KEY_ERROR"
}
METHOD : GET
HOST : IP:PORT/users/like
HEADERS :
{
"Authorization" : token
}
{
"result": [
{
"user_id": int_type,
"project_id": int_type,
"thumbnail": char_type,
"category": char_type,
"title": char_type,
"summary": char_type,
"total_amount": int_type,
"remain_days": int_type
},
{
"user_id": int_type,
"project_id": int_type,
"thumbnail": char_type,
"category": char_type,
"title": char_type,
"summary": char_type,
"total_amount": int_type,
"remain_days": int_type
},
]
}
METHOD : POST
HOST : IP:PORT/projects
HEADERS : {"Authorization" : token}
BODY :
{
"formData" : img_file,
"category" : int_type,
"title" : char_type,
"summary" : char_type,
"target_amount" : datetime_type,
"start_datetime" : datetime_type,
"end_datetime" : datetime_type,
}
category의 value값은 아래 테이블를 참고하여 id 값으로 요청한다.
id name
1 쥬얼리
2 의류
3 신발
4 가방
ex)
{
"category" : 1 #카테고리가 쥬얼리인 경우,
"title" : "사파이어 링",
...
}
{
'message' : 'PROJECT_CREATED'
}
{
'message' : 'KEY_ERROR'
}
METHOD : GET
HOST : IP:PORT/projects?order={likes or recent or random}
정렬
좋아요순 : order=likes
최신순 : order=recent
랜덤순 : order=random
{
"results": [
{
"id": int_type,
"thumbnail": char_type,
"category": char_type,
"title": char_type,
"summary": char_type,
"target_amount": int_type,
"remain_days": int_type,
"date": YYYY-MM-DD,
"like_count": int_type
},
{
"id": int_type,
"thumbnail": char_type,
"category": char_type,
"title": char_type,
"summary": char_type,
"target_amount": int_type,
"remain_days": int_type,
"date": YYYY-MM-DD,
"like_count": int_type
},
{
"id": int_type,
"thumbnail": char_type,
"category": char_type,
"title": char_type,
"summary": char_type,
"target_amount": int_type,
"remain_days": int_type,
"date": YYYY-MM-DD,
"like_count": int_type
},
{
"id": int_type,
"thumbnail": char_type,
"category": char_type,
"title": char_type,
"summary": char_type,
"target_amount": int_type,
"remain_days": int_type,
"date": YYYY-MM-DD,
"like_count": int_type
},
...
]
}
METHOD : GET
HOST : IP:PORT/projects/<int_type>
{
"results": {
"id": int_type,
"thumbmail": char_type,
"category": char_type,
"title": char_type,
"like_count": int_type,
"target_amount": int_type,
"price": int_type,
"start_datetime": YYYY-MM-DD,
"end_datetime": YYYY-MM-DD,
"pay_end_date": YYYY-MM-DD,
"settlement_date": YYYY-MM-DD,
"introduction": char_type,
"total_amount": int_type,
"organizations": [
{
"id": int_type,
"name": char_type
},
{
"id": int_type,
"name": char_type
},
{
"id": int_type,
"name": char_type
}
],
"images": [
{
"id": int_type,
"url": char_type
},
{
"id": int_type,
"url": char_type
}
],
"remain_days": int_type
}
}