上回
之前写过一个同步我当前正在听的音乐,大概长这样
这次
尝试把当前正在玩的 Steam 游戏展示到个人简介中
于是去看了一下 Steam API,发现还真行,效果是这样的
开源:imba97/me
开源库
为了方便调用,简单封装了一下用到的 Steam API
你可以直接使用 steam-playing-game 的 getUserPlayingGame
import { getUserPlayingGame } from 'steam-playing-game'
getUserPlayingGame('steam-api-key', 'user-id')
或者使用 useSteamApi
获取更详细的参数
import { useSteamApi } from 'steam-playing-game'
const { getPlayerSummary, getGameDetail } = useSteamApi('steam-api-key')
getPlayerSummary('user-id')
getGameDetail('game-id')
分享主题:
城市:
前端做的页面就是漂亮。