Use New 7TV Cosmetics System (#4512)
* feat(seventv): use new cosmetics system * chore: add changelog entry * fix: old `clang-format` * fix: small suggestions pt1 * refactor: add 7tv api wrapper * fix: small clang-tidy things * fix: remove unused constants * fix: old clangtidy * refactor: rename * fix: increase interval to 60s * fix: newline * fix: Twitch * docs: add comment * fix: remove v2 badges endpoint * fix: deadlock This is actually really sad. * fix: remove api entry * fix: old clang-format * Sort functions in SeventvBadges.hpp/cpp * Remove unused vector include * Add comments to SeventvBadges.hpp functions * Rename `addBadge` to `registerBadge` * fix: cleanup eventloop * ci(test): add timeout --------- Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <magic_enum.hpp>
|
||||
|
||||
namespace chatterino::seventv {
|
||||
|
||||
enum class CosmeticKind {
|
||||
Badge,
|
||||
Paint,
|
||||
EmoteSet,
|
||||
|
||||
INVALID,
|
||||
};
|
||||
|
||||
} // namespace chatterino::seventv
|
||||
|
||||
template <>
|
||||
constexpr magic_enum::customize::customize_t
|
||||
magic_enum::customize::enum_name<chatterino::seventv::CosmeticKind>(
|
||||
chatterino::seventv::CosmeticKind value) noexcept
|
||||
{
|
||||
using chatterino::seventv::CosmeticKind;
|
||||
switch (value)
|
||||
{
|
||||
case CosmeticKind::Badge:
|
||||
return "BADGE";
|
||||
case CosmeticKind::Paint:
|
||||
return "PAINT";
|
||||
case CosmeticKind::EmoteSet:
|
||||
return "EMOTE_SET";
|
||||
|
||||
default:
|
||||
return default_tag;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user