diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-02 00:05:53 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-02 00:05:53 +0500 |
| commit | 64ee8f8e7639c1e84a7e68d45e2aceec5299a4d6 (patch) | |
| tree | cbed19fbf96eceab891d8435eb80f69d51e7ed0f /src/api/twitch/helix_client.hpp | |
| parent | de0439408529a257f975e613a9ac6b31926844f6 (diff) | |
feat: client for twitch api
Diffstat (limited to 'src/api/twitch/helix_client.hpp')
| -rw-r--r-- | src/api/twitch/helix_client.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/api/twitch/helix_client.hpp b/src/api/twitch/helix_client.hpp new file mode 100644 index 0000000..fedec7f --- /dev/null +++ b/src/api/twitch/helix_client.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include <string> +#include <vector> + +#include "schemas/user.hpp" + +namespace bot::api::twitch { + class HelixClient { + public: + HelixClient(const std::string &token, const std::string &client_id); + ~HelixClient() = default; + + std::vector<schemas::User> get_users( + const std::vector<std::string> &logins) const; + std::vector<schemas::User> get_users(const std::vector<int> &ids) const; + + private: + std::vector<schemas::User> get_users_by_query( + const std::string &query) const; + std::string token, client_id; + const std::string base_url = "https://api.twitch.tv/helix"; + }; +} |
