Open robinlavallee opened 4 years ago
@pallaire Here is the API to use. You need to specify a time range to obtain the list of played games. https://api.streamcamel.com/users/lirik/games?after=2020-06-20T12:00:00Z&before=2020-06-27T12:00:00Z For now, you can just hard-code it to the last 7 days, or 30 days, or whatever makes sense.
Sample response:
[{
"game_id": 492546,
"name": "Star Wars: Battlefront II",
"slug": "star-wars-battlefront-ii",
"viewers_average": 26288,
"viewers_peak": 26966
}, {
"game_id": 498859,
"name": "MORDHAU",
"slug": "mordhau",
"viewers_average": 25897,
"viewers_peak": 25956
}, {
"game_id": 495064,
"name": "Splatoon 2",
"slug": "splatoon-2",
"viewers_average": 24834,
"viewers_peak": 25813
}, {
"game_id": 370472,
"name": "Wreckfest",
"slug": "wreckfest",
"viewers_average": 24622,
"viewers_peak": 24622
}, {
"game_id": 263490,
"name": "Rust",
"slug": "rust",
"viewers_average": 24048,
"viewers_peak": 25672
}, {
"game_id": 490382,
"name": "For Honor",
"slug": "for-honor",
"viewers_average": 23075,
"viewers_peak": 27629
}, {
"game_id": 65876,
"name": "Cyberpunk 2077",
"slug": "cyberpunk-2077",
"viewers_average": 22477,
"viewers_peak": 32892
}, {
"game_id": 26175,
"name": "PlanetSide 2",
"slug": "planetside-2",
"viewers_average": 21813,
"viewers_peak": 26161
}, {
"game_id": 65632,
"name": "DayZ",
"slug": "dayz",
"viewers_average": 20256,
"viewers_peak": 25414
}, {
"game_id": 512710,
"name": "Call Of Duty: Modern Warfare",
"slug": "call-of-duty-modern-warfare",
"viewers_average": 18420,
"viewers_peak": 22699
}]
Possible implementation:![image](https://user-images.githubusercontent.com/9902566/85929446-985d6580-b87a-11ea-953c-2f6a0def1512.png)