mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-18 23:28:33 -05:00
Add support to resolve variables on action queue add
This commit is contained in:
@@ -110,8 +110,9 @@ TwitchChannel::GetLiveInfo(const TwitchToken &token)
|
||||
return {};
|
||||
}
|
||||
|
||||
httplib::Params params = {
|
||||
{"first", "1"}, {"after", ""}, {"user_id", id}};
|
||||
httplib::Params params = {{"first", "1"},
|
||||
{"after", ""},
|
||||
{"user_id", id}};
|
||||
auto result = SendGetRequest(token, "https://api.twitch.tv",
|
||||
"/helix/streams", params, true);
|
||||
if (result.status != 200) {
|
||||
@@ -151,8 +152,9 @@ std::optional<ChannelInfo> TwitchChannel::GetInfo(const TwitchToken &token)
|
||||
return {};
|
||||
}
|
||||
|
||||
httplib::Params params = {
|
||||
{"first", "1"}, {"after", ""}, {"broadcaster_id", id}};
|
||||
httplib::Params params = {{"first", "1"},
|
||||
{"after", ""},
|
||||
{"broadcaster_id", id}};
|
||||
auto result = SendGetRequest(token, "https://api.twitch.tv",
|
||||
"/helix/channels", params, true);
|
||||
if (result.status != 200) {
|
||||
@@ -183,6 +185,11 @@ std::optional<ChannelInfo> TwitchChannel::GetInfo(const TwitchToken &token)
|
||||
return info;
|
||||
}
|
||||
|
||||
void TwitchChannel::ResolveVariables()
|
||||
{
|
||||
_name.ResolveVariables();
|
||||
}
|
||||
|
||||
bool TwitchChannel::IsValid(const std::string &id) const
|
||||
{
|
||||
return id != "invalid" && !id.empty();
|
||||
|
||||
Reference in New Issue
Block a user