수많은 기업들에서 제공해주는 Open API는 저마다 사내 컨벤션에 기반한 API 양식이 있다. 넥슨이건, 넷마블이건, 등등..
그러한 기업들에서 제공해주는 API를 통해 값을 올바르게 받기 위해서는 요청에 따른 응답(보통 JSON)값을 정확하게 파악하고,
수많은 값들 중에서 내가 사용할 값들만 Request 혹은 DTO 형태로 추출하여 우리 브라우저에 뿌려줄 수 있다.
활용만 할 수 있다면 정말 유용하니 잘 알아두자.
API 엑세스 토큰 & API Key 얻기
https://www.themoviedb.org/settings/api
쿼리 파라미터 입력 정보에 대한것, discover 쓰고 있었기 때문에 도메인이 쿼리가 disvoer-movie임
https://developer.themoviedb.org/reference/discover-movie
ISO 3166, 한국 Code는 KR, ccTLD는 .kr
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
ISO 639, 한국 ISO Language Names는 Korean, Set1은 ko, set2와 set3은 kor
https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
쿼리 파라미터가 제대로 동작하지 않는데요? 등에 대한 질문글
https://www.themoviedb.org/talk/518ffb5619c295382c050233
확인할 때 사용한 JSON 정렬 사이트
예를들어
{"page":1,"results":[{"adult":false,"backdrop_path":null,"genre_ids":[28,80,18],"id":806381,"original_language":"en","original_t":"Japan","overview":"Code name Japan is a contract killer on a job. Accustomed to staying in hotels, Japan finds himself jet-lagged in the middle of the night and forced to eat in the hotel restaurant, room service being closed. There, he meets a man, Alfred. Alfred was recently evicted from their m
arital home by his now ex-wife and now lives at the hotel. A loner befriends another loner, and their unexpected friendship leads their faith to a twist and turn ending ...","popularity":1.8557,"poster_path":"/bLtGr8u3Lwxk27pIA3eyKg0Ypoj.jpg","release_date":"2008-01-01","title":"Japan","video":fa a
lse,"vote_average":4.2,"vote_count":2}
뭐 이런식으로 정렬되지않고 들어온 JSON을
{
"page":1,
"results":[
{
"adult":false,
"backdrop_path":null,
"genre_ids":[
28,
80,
18
],
"id":806381,
"original_language":"en",
"original_t":"Japan",
"overview":"Code name Japan is a contract killer on a job. Accustomed to staying in hotels, Japan finds himself jet-lagged in the middle of the night and forced to eat in the hotel restaurant, room service being closed. There, he meets a man, Alfred. Alfred was recently evicted from their m arital home by his now ex-wife and now lives at the hotel. A loner befriends another loner, and their unexpected friendship leads their faith to a twist and turn ending ...",
"popularity":1.8557,
"poster_path":"/bLtGr8u3Lwxk27pIA3eyKg0Ypoj.jpg",
"release_date":"2008-01-01",
"title":"Japan",
"video":fa a lse,
"vote_average":4.2,
"vote_count":2
}
이렇게 바꿔주며, 오탈자도 검은색 표시로 잡아준다

'Playlist > Open API' 카테고리의 다른 글
| TvSeriesApiService (0) | 2025.12.17 |
|---|---|
| TheMovieApiService (0) | 2025.12.17 |
| Open API : The Sports (1) | 2025.11.20 |
| Open API : TheMovie (0) | 2025.11.20 |
| Open API 설정하기 (진행중) (0) | 2025.11.16 |