Python API programming
API(Application Programming Interface)
web API (over the network or internet using HTTP request verbs)
: GET, POST, PUT
: HEAD, CONNECT, OPTIONS, TRACE, PATCH
https://api.coindesk.com/v1/bpi/currentprice.json
vscode ~ new file ~ select language : json ~ Shift+Option(alt)+ F ==> json 예쁘게 보기
json
https://docs.python.org/3.10/library/json.html
형태 변화 없이 형변환만 str으로
API사용하는 이유
- 여러 Application 을 통합
- cross-platform Application 만들기
- Application의 기능 강화
- Application에 외부접근 제공
- app backend로써
API Design Patterns
복잡한 HTTP methods를 간략하기 위해 , HTTP architecture patterns을 사용
- RESTful APIs
- GraphQL APIs
- CRUD APIs
- SOAP APIs
RESTful APIs 의 methods
- GET
- POST
- PUT
- DELETE
Building API
