Twitch SDK (Internal)
Public Types | Public Member Functions | Public Attributes | List of all members
ttv::chat::BadgeVersion Struct Reference

#include <chattypes.h>

Public Types

enum  Action { Action::None, Action::SubscribeToChannel, Action::VisitUrl, Action::Turbo }
 

Public Member Functions

 BadgeVersion ()
 
TTV_ErrorCode FindImage (float scale, BadgeImage &result) const
 

Public Attributes

std::string name
 
std::string title
 
std::string description
 
std::string clickUrl
 The url to visit if clickAction is "visit_url". More...
 
std::vector< BadgeImageimages
 
Action clickAction
 The action to take when a user invokes the badge via a click. More...
 

Detailed Description

BadgeVersion - Information about a specific version of a badge.

Member Enumeration Documentation

◆ Action

Enumerator
None 
SubscribeToChannel 
VisitUrl 
Turbo 

Constructor & Destructor Documentation

◆ BadgeVersion()

ttv::chat::BadgeVersion::BadgeVersion ( )

Member Function Documentation

◆ FindImage()

TTV_ErrorCode ttv::chat::BadgeVersion::FindImage ( float  scale,
BadgeImage result 
) const

Finds the closest matching image for the given scale. Returns: TTV_EC_SUCCESS if found and copies into result. TTV_EC_NOT_AVAILABLE if no images available.

Member Data Documentation

◆ clickAction

Action ttv::chat::BadgeVersion::clickAction

The action to take when a user invokes the badge via a click.

◆ clickUrl

std::string ttv::chat::BadgeVersion::clickUrl

The url to visit if clickAction is "visit_url".

◆ description

std::string ttv::chat::BadgeVersion::description

◆ images

std::vector<BadgeImage> ttv::chat::BadgeVersion::images

◆ name

std::string ttv::chat::BadgeVersion::name

◆ title

std::string ttv::chat::BadgeVersion::title

The documentation for this struct was generated from the following file: