Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

웹서비스설계 실습2 과제

컴퓨터인공지능학부 202312628 김예빈

백엔드 프레임워크로 FastAPI를 사용해서 간단한 가챠 API를 구현해 봤습니다.


패키지 설치

pip install fastapi

pip install "uvicorn[standard]

실행 방법

py -m uvicorn main:app --reload

접속 주소

http://http://127.0.0.1:8000

postman

json 형식 파일 첨부

API

POST

  1. 가챠 실행

  2. 캐릭터 생성

GET

  1. 전체 캐릭터 조회

  2. 내가 가진 캐릭터 조회

PUT

  1. 전체 캐릭터에서 이름 수정

  2. 내가 가진 캐릭터 favorite 수정

DELETE

  1. 전체 캐릭터에서 1개 삭제

  2. 내가 가진 캐릭터에서 1개 삭제

응답 코드

Code Case
200 정상 조회/수정/삭제
201 캐릭터 생성 성공
400 잘못된 입력 값
404 존재하지 않음(수정/삭제 시 일치하는 ID의 캐릭터 없음)
500 가챠 시도 횟수가 한번에 10번 이상일 시
503 캐릭터가 생성되어있지 않은 상태에서 가챠를 시도할 때

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages