-
Notifications
You must be signed in to change notification settings - Fork 1
Anniversary
songz1 edited this page Jan 7, 2019
·
13 revisions
메소드 | 경로 | 설명 |
---|---|---|
GET | /anniversary | 기념일 전체 목록 조회 |
Content-Type :application/json
Authorization: token
{
"status": 200,
"message": "기념일 조회 성공",
"data": [
{
"anniversaryIdx": 1,
"content": "지은 생일",
"date": "1996-09-09T00:00:00",
"anniversaryType": 0,
"groupIdx": 2
},
{
"anniversaryIdx": 2,
"content": "늦둥이 생일",
"date": "2018-12-09T00:00:00",
"anniversaryType": 0,
"groupIdx": 2
}
]
}
필드 | 타입 | 필수여부 | 설명 |
---|---|---|---|
anniversaryIdx | Int | Required | 기념일 고유 번호 |
content | String | Required | 기념일 내용 |
date | LocalDateTime | Required | 기념일 날짜 |
anniversaryType | Int | Required | 기념일 타입 기본정보 생일 0 / 추가 생일 1 / 결혼기념일 2 / 기타 3 |
groupIdx | Int | Required | 그룹 고유 번호 |
{
"status": 404,
"message": "회원을 찾을 수 없습니다.",
"data": null
}
{
"status": 600,
"message": "데이터베이스 에러",
"data": null
}
{
"status": 500,
"message": "서버 내부 에러",
"data": null
}
메소드 | 경로 | 설명 |
---|---|---|
POST | /anniversary/{anniversaryType} | 기념일 추가 |
필드 | 타입 | 필수여부 | 설명 |
---|---|---|---|
anniversaryType | Int | Required | 기념일 타입 추가 생일 1 / 결혼기념일 2 / 기타 3 |
Content-Type :application/json
Authorization: token
- 결혼기념일의 경우 content 생략
{
"content": "댕댕이 생일",
"dateStr": "2015-09-01T00:00:00"
}
필드 | 타입 | 필수여부 | 설명 |
---|---|---|---|
content | String | Required | 기념일 내용 |
dateStr | String | Required | 기념일 날짜 |
{
"status": 200,
"message": "기념일 추가 성공",
"data": null
}
{
"status": 404,
"message": "잘못된 기념일 타입입니다.",
"data": null
}
{
"status": 404,
"message": "회원을 찾을 수 없습니다.",
"data": null
}
{
"status": 600,
"message": "데이터베이스 에러",
"data": null
}
{
"status": 500,
"message": "서버 내부 에러",
"data": null
}
메소드 | 경로 | 설명 |
---|---|---|
PUT | /anniversary/{anniversaryIdx} | 기념일 수정 |
필드 | 타입 | 필수여부 | 설명 |
---|---|---|---|
anniversaryIdx | Int | Required | 기념일 고유 번호 |
Content-Type :application/json
Authorization: token
{
"dateStr": "2017-09-01T00:00:00"
}
필드 | 타입 | 필수여부 | 설명 |
---|---|---|---|
dateStr | String | Required | 기념일 날짜 |
{
"status": 200,
"message": "기념일 수정 성공",
"data": null
}
{
"status": 404,
"message": "잘못된 기념일 타입입니다.",
"data": null
}
{
"status": 404,
"message": "기념일을 찾을 수 없습니다.",
"data": null
}
{
"status": 600,
"message": "데이터베이스 에러",
"data": null
}
{
"status": 500,
"message": "서버 내부 에러",
"data": null
}
메소드 | 경로 | 설명 |
---|---|---|
DELETE | /anniversary | 기념일 삭제 |
Content-Type :application/json
Authorization: token
{
"anniversaryIdx": [8, 12, 15]
}
필드 | 타입 | 필수여부 | 설명 |
---|---|---|---|
anniversaryIdx | Int[] | Required | 기념일 고유 번호 배열 |
{
"status": 200,
"message": "기념일 삭제 성공",
"data": null
}
{
"status": 404,
"message": "잘못된 기념일 타입입니다.",
"data": null
}
{
"status": 404,
"message": "기념일을 찾을 수 없습니다.",
"data": null
}
{
"status": 600,
"message": "데이터베이스 에러",
"data": null
}
{
"status": 500,
"message": "서버 내부 에러",
"data": null
}