twitch.h - frontends - front-ends for some sites (experiment) | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
twitch.h (1877B) | |
--- | |
1 struct game { | |
2 char id[16]; | |
3 char name[256]; | |
4 // char box_art_url[256]; | |
5 }; | |
6 | |
7 struct stream { | |
8 char id[16]; | |
9 char user_id[16]; | |
10 char user_name[256]; | |
11 char game_id[16]; | |
12 // char type[32]; | |
13 char title[256]; | |
14 long long viewer_count; | |
15 // char started_at[24]; | |
16 char language[8]; | |
17 // char thumbnail_url[256]; | |
18 | |
19 /* added (not part of API) */ | |
20 struct game *game; /* will be set if matched and not a specific … | |
21 struct user *user; /* will be set if matched */ | |
22 }; | |
23 | |
24 struct user { | |
25 char id[16]; | |
26 char login[256]; | |
27 char display_name[256]; | |
28 // char broadcaster_type[256]; /* "partner" */ | |
29 // char description[256]; | |
30 // char profile_image_url[256]; | |
31 // char offline_image_url[256]; | |
32 long long view_count; | |
33 }; | |
34 | |
35 struct video { | |
36 char id[16]; | |
37 char user_id[16]; | |
38 char user_name[64]; | |
39 char title[256]; | |
40 char created_at[32]; | |
41 char url[1024]; | |
42 long long view_count; | |
43 char duration[32]; | |
44 }; | |
45 | |
46 #define MAX_ITEMS 100 | |
47 | |
48 struct games_response { | |
49 struct game data[MAX_ITEMS + 1]; | |
50 size_t nitems; | |
51 // char pagination[256]; | |
52 }; | |
53 | |
54 struct streams_response { | |
55 struct stream data[MAX_ITEMS + 1]; | |
56 size_t nitems; | |
57 // char pagination[256]; | |
58 }; | |
59 | |
60 struct users_response { | |
61 struct user data[MAX_ITEMS + 1]; | |
62 size_t nitems; | |
63 }; | |
64 | |
65 struct videos_response { | |
66 struct video data[MAX_ITEMS + 1]; | |
67 size_t nitems; | |
68 // char pagination[256]; | |
69 }; | |
70 | |
71 struct games_response *twitch_games_bygameids(const char *param); | |
72 struct games_response *twitch_games_top(void); | |
73 struct streams_response *twitch_streams(void); | |
74 struct streams_response *twitch_streams_bygame(const char *game_id); | |
75 struct users_response *twitch_users_bylogin(const char *login); | |
76 struct users_response *twitch_users_byuserids(const char *param); | |
77 struct videos_response *twitch_videos_byuserid(const char *user_id); | |
78 | |
79 struct games_response *twitch_streams_games(struct streams_response *… | |
80 struct users_response *twitch_streams_users(struct streams_response *… |