[T1.gg] Riot APIλ₯Ό μ΄μ©νμ¬ λ‘€ μ μ κ²μ μ¬μ΄νΈ λ§λ€κΈ° (1)
π νλ‘μ νΈ κ°μ
λμ κ΄μ¬μ¬λ₯Ό κ°λ λ΄μ λμ μΌμΉμ μΆμ μ΄λ£¨κΈ° μν΄ T1 μ μλ€μ μλ μ μ μ νλ²μ νμΈν μ μκ³ , T1μ 곡μ μ νλΈλ₯Ό λ°λ‘ νμΈν μ μλ μ¬μ΄νΈλ₯Ό λ§λ€κΈ°λ‘ νλ€.
μ²μ λ€μ΄κ°λ©΄ T1μ 곡μ μ νλΈ μμμ΄ λμ΄λκ³ μνλ μμμ κ²μν μ μλ€. λλ²μ§Έ νμ΄μ§μλ T1μ μμλ μ μλ€μ μ 보λ₯Ό μλ €μ€ κ²μ΄κ³ , μ μ νλ‘νμ λλ₯΄λ©΄ ν΄λΉ μ μμ μλ μ μ μ 보λ₯Ό λ°λ‘ νμΈν μ μλλ‘ ν μμ μ΄λ€.
π€ κΈ°μ μ€ν
μ΄λ² νλ‘μ νΈμμ μ΄μ©ν κΈ°μ μ€νμ λ€μκ³Ό κ°λ€
- React, Redux Toolkit
- Typescript
- eslint, prettier
π©π»π» API key λ°κΈ λ° CORS Error ν΄κ²°
T1 곡μ μ νλΈ μ±λμμ μμμ κ°μ Έμ€κΈ° μν΄μ Youtube APIλ₯Ό μ΄μ©ν κ²μ΄κ³ μ μλ€μ μ μ μ λνλ΄μ£ΌκΈ° μν΄μ Riot API μμ μ΄μ©ν μμ μ΄λ€. API ν€ λ°κΈμ μ½κ² λ°κΈμ΄ κ°λ₯νκΈ°μ 5λΆ μμ ν΄λ¦¬μ΄νλ€.
https://console.cloud.google.com/projectselector2/apis/dashboard?supportedpurview=project
Google ν΄λΌμ°λ νλ«νΌ
λ‘κ·ΈμΈ Google ν΄λΌμ°λ νλ«νΌμΌλ‘ μ΄λ
accounts.google.com
https://developer.riotgames.com/
Riot Developer Portal
About the Riot Games API With this site we hope to provide the League of Legends developer community with access to game data in a secure and reliable way. This is just part of our ongoing effort to respond to players' and developers' requests for data and
developer.riotgames.com
μ¬κΈ°μμ youtube APIλ₯Ό μ΄μ©νκΈ° μν keyμ Riot APIλ₯Ό μ΄μ©νκΈ° μν keyλ₯Ό λ°κΈλ°μ μ μλ€. Riot Developerμ κ²½μ° μΉμΈ λ°μ§ μμ keyλ μ ν¨ μκ°μ΄ 24μκ° λ°μ μλκ³ tournament μ 보μ μ κ·Όν μ μλ€. λ°λΌμ λΌμ΄μμκ² μμ΄λ‘ λ΄κ° λ§λ€κ³ μ νλ μ¬μ΄νΈ μ 보λ₯Ό μ μ±μ€λ½κ² μ¨μ μΉμΈν΄λ¬λΌλ λ©μΈμ§λ₯Ό 보λ΄μΌνλλ°, μ΄κ² λλ¬ κ°κΉμ΄ κ±Έλ¦°λ€λ νκΈ°λ₯Ό μ½κ³ λμ λ κ·Έλ₯ ν루μ νλ²μ© keyλ₯Ό κ°±μ νλ©΄μ νλ‘μ νΈλ₯Ό μ§ννλ€. μ΄μ°¨νΌ tournament μ 보λ λμκ² νμκ° μκΈ°λ νκ³ .
Riot APIμ κ²½μ°, clientμμ μ§μ headerλ₯Ό λ£μ΄μ 보λ΄λ©΄ cors errorκ° λ¬λ€. κ·Έλμ server μͺ½μμ apiλ₯Ό μ΄μΌνλλ°, μ΄λ²μ λλ νΌμμ νλ‘μ νΈλ₯Ό μ§ννκΈ° λλ¬Έμ nodejsκΉμ§ 컀λ²νκΈ°μ νκ³κ° μμ΄μ google extenstionμΌλ‘ ν΄κ²°ν΄μ€¬λ€. Moesif Origin $ CORS Changerλ₯Ό κ²μν΄μ λ€μ΄λ°κ³ νμ±νμμΌμ£Όλ©΄ CORS μλ¬λ₯Ό ν΄κ²°ν μ μλ€!
μ΄λ κ² μ¬μ μμ μ λλ΄κ³ , μ΄μ μ§μ§ κ°λ°μ μμν΄λ³΄λλ‘ νκ² λ€.