jas0nhuang

[筆記] Axios 與 API 串接資料整理

為什麼要用 axios

因為課程裡介紹的 request 套件寫著 deprecated,所以就想說找個替代品,加上 axios 感覺現在正夯,所以就試著研究看看了。

參考資料:
request
npm - axios
詳解axios 全攻略之基本介紹與使用(GET 與 POST)
使用Axios你的API都怎麼管理?
How to make HTTP requests like a pro with Axios

試著用 Axios 串接 TWITCH API

使用 node 內建 HTTP 套件

Use the Node.js HTTP Module to Make a Request
The Top Node.js HTTP Libraries in 2020

串接 New Twitch API

可能是不知道看文件的方法……真的覺得 New Twitch API 的文件寫的很爛

Getting Started with the Twitch API
Sending user access and app access tokens
Twitch dev console
New Twitch API - Get STreams
[New Twitch API - OAuth autorization code flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow]