Skip to content

Che0807/schedule-API

Repository files navigation

Schedule API 명세서

일정 생성 API (POST /schedules)

설명

새로운 일정을 생성합니다.

Request Body:

{
  "username": "유정명",
  "title": "할일 제목",
  "todo": "할일 내용",
  "created_at": "2025-05-19",
  "updated_at": "2025-05-19"
}

Response Body:

{
  "id": 1,
  "username": "유정명",
  "title": "할일 제목",
  "todo": "할일 내용",
  "created_at": "2025-05-19",
  "updated_at": "2025-05-19"
}
일정 목록 조회 API (GET /schedules)

설명

전체 일정을 조회합니다.

Response Body:

[
  {
    "id": 1,
    "username": "유정명",
    "title": "할일 제목",
    "todo": "할일 내용",
    "created_at": "2025-05-19",
    "updated_at": "2025-05-19"
  },
  {
    "id": 2,
    "username": "박지민",
    "title": "다른 할일",
    "todo": "다른 내용",
    "created_at": "2025-05-20",
    "updated_at": "2025-05-20"
  }
]
일정 상세 조회 API (GET /schedules/{id})

설명

지정된 ID의 일정을 조회합니다.

Response Body:

{
  "id": 1,
  "username": "유정명",
  "title": "할일 제목",
  "todo": "할일 내용",
  "created_at": "2025-05-19",
  "updated_at": "2025-05-19"
}
일정 수정 API (PUT /schedules/{id})

설명

지정된 ID의 일정을 수정합니다.

Request Body:

{
  "title": "수정된 제목",
  "todo": "수정된 내용",
  "updated_at": "2025-05-20"
}

Response Body:

{
  "id": 1,
  "username": "유정명",
  "title": "수정된 제목",
  "todo": "수정된 내용",
  "created_at": "2025-05-19",
  "updated_at": "2025-05-20"
}
일정 삭제 API (DELETE /schedules/{id})

설명

지정된 ID의 일정을 삭제합니다.

Response Body:

{
  "message": "삭제가 완료되었습니다."
}

유저 API 명세서

유저 API (POST /users)

설명

새로운 사용자를 등록합니다.

Request Body:

{
  "username": "user123",
  "email": "user@example.com",
  "password": "password123"
}

Response Body:

{
  "id": 1,
  "username": "user123",
  "email": "user@example.com",
  "created_at": "2025-05-26"
}
유저 정보 조회 API (GET /users/{id})

설명

사용자 ID로 회원 정보를 조회합니다.

Response Body:

{
  "id": 1,
  "username": "user123",
  "email": "user@example.com",
  "created_at": "2025-05-26"
}
유저 수정 API (PUT /users/{id})

설명

사용자 정보를 수정합니다.

Request Body:

{
  "username": "newUser123",
  "email": "newemail@example.com"
}

Response Body:

{
  "id": 1,
  "username": "newUser123",
  "email": "newemail@example.com",
  "updated_at": "2025-05-26"
}
유저 API (DELETE /users/{id})

설명

사용자를 삭제(탈퇴)합니다.

Response Body:

{
  "message": "회원 탈퇴가 완료되었습니다."
}

3. 로그인 기능 API 명세 예시

로그인 API (POST /auth/login)

설명

사용자 로그인 요청을 처리합니다.

Request Body:

{
  "email": "user@example.com",
  "password": "password123"
}

Response Body:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": 1,
    "username": "user123",
    "email": "user@example.com"
  }
}
로그아웃 API (POST /auth/logout)

설명

사용자 로그아웃 요청을 처리합니다.

Response Body:

{
  "message": "로그아웃 되었습니다."
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages