Twitch SDK (Internal)
chatjson.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * Twitch Broadcasting SDK
3 *
4 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5 * may not be copied or used except in accordance with the terms of that agreement
6 * Copyright (c) 2012-2016 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
14 
15 namespace ttv
16 {
17  namespace chat
18  {
19  bool ParseParticipantJson(const ttv::json::Value& jParticipant, ChatUserInfo& user);
20  bool ParseThreadJson(const ttv::json::Value& jThread, const TokenizationOptions& tokenizationOptions, const std::shared_ptr<BitsConfiguration>& bitsConfig, const std::vector<std::string>& localUserNames, ThreadData& result);
21  bool ParseRaidStatusJson(const ttv::json::Value& jRaid, RaidStatus& status);
22 
26  bool ParseMessageJson(const ttv::json::Value& jMessage, const TokenizationOptions& tokenizationOptions, const std::shared_ptr<BitsConfiguration>& bitsConfig, const std::vector<std::string>& localUserNames, WhisperMessage& result);
27  bool ParseChatReplayMessageJson(const ttv::json::Value& jMessage, const TokenizationOptions& tokenizationOptions, const std::shared_ptr<BitsConfiguration>& bitsConfig, const std::vector<std::string>& localUserNames, ReplayMessage& result);
28  bool ParseMillisecondTimestampChatReplayMessageJson(const ttv::json::Value& jMessage, uint64_t& result);
29 
33  bool ParseGraphQLErrorCode(const ttv::json::Value& jVal, const std::string& mutationName, GraphQLErrorCode& code);
34  bool ParseEditRoomMessage(const ttv::json::Value& jVal, ChatRoomMessage& result);
35  bool ParseSendRoomMessage(const ttv::json::Value& jVal, ChatRoomMessage& result, SendRoomMessageError& error);
36  bool ParseRoomMessages(const ttv::json::Value& jVal, std::vector<ChatRoomMessage>& result, std::string& resultCursor, bool& resultMoreMessages);
37  bool ParseCreateRoom(const ttv::json::Value& jVal, ChatRoomInfo& result, CreateRoomError& error);
38  bool ParseUpdateRoom(const ttv::json::Value& jVal, ChatRoomInfo& result, UpdateRoomError& error);
39  bool ParseUpdateRoomModes(const ttv::json::Value& jVal, ChatRoomInfo& result, UpdateRoomModesError& error);
40  bool ParseRoomInfo(const ttv::json::Value& jVal, ChatRoomInfo& result);
41  bool ParseGraphQLChatRooms(const ttv::json::Value& jVal, std::vector<ChatRoomInfo>& result);
42  bool ParseGraphQLChatRoomView(const ttv::json::Value& jVal, const std::string& mutationName, ChatRoomInfo& result);
43  bool ParseGraphQLUserMods(const ttv::json::Value& jVal, std::vector<std::string>& result, std::string& cursor);
44  bool ParseBanUser(const ttv::json::Value& jVal, BanUserError& error);
45  bool ParseUnbanUser(const ttv::json::Value& jVal, UnbanUserError& error);
46 
47  bool ParseUserEmoticonSets(const ttv::json::Value& jVal, std::vector<EmoticonSet>& result);
48  }
49 }
bool ParseEditRoomMessage(const ttv::json::Value &jVal, ChatRoomMessage &result)
bool ParseUnbanUser(const ttv::json::Value &jVal, UnbanUserError &error)
bool ParseParticipantJson(const ttv::json::Value &jParticipant, ChatUserInfo &user)
bool ParseRoomInfo(const ttv::json::Value &jVal, ChatRoomInfo &result)
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
Represents a JSON value.
Definition: value.h:114
bool ParseGraphQLErrorCode(const ttv::json::Value &jVal, const std::string &mutationName, GraphQLErrorCode &code)
bool ParseGraphQLUserMods(const ttv::json::Value &jVal, std::vector< std::string > &result, std::string &cursor)
bool ParseGraphQLChatRooms(const ttv::json::Value &jVal, std::vector< ChatRoomInfo > &result)
bool ParseThreadJson(const ttv::json::Value &jThread, const TokenizationOptions &tokenizationOptions, const std::shared_ptr< BitsConfiguration > &bitsConfig, const std::vector< std::string > &localUserNames, ThreadData &result)
bool ParseCreateRoom(const ttv::json::Value &jVal, ChatRoomInfo &result, CreateRoomError &error)
bool ParseGraphQLChatRoomView(const ttv::json::Value &jVal, const std::string &mutationName, ChatRoomInfo &result)
bool ParseUserEmoticonSets(const ttv::json::Value &jVal, std::vector< EmoticonSet > &result)
bool ParseUpdateRoomModes(const ttv::json::Value &jVal, ChatRoomInfo &result, UpdateRoomModesError &error)
bool ParseBanUser(const ttv::json::Value &jVal, BanUserError &error)
bool ParseChatReplayMessageJson(const ttv::json::Value &jMessage, const TokenizationOptions &tokenizationOptions, const std::shared_ptr< BitsConfiguration > &bitsConfig, const std::vector< std::string > &localUserNames, ReplayMessage &result)
bool ParseMessageJson(const ttv::json::Value &jMessage, const TokenizationOptions &tokenizationOptions, const std::shared_ptr< BitsConfiguration > &bitsConfig, const std::vector< std::string > &localUserNames, WhisperMessage &result)
bool ParseUpdateRoom(const ttv::json::Value &jVal, ChatRoomInfo &result, UpdateRoomError &error)
bool ParseRoomMessages(const ttv::json::Value &jVal, std::vector< ChatRoomMessage > &result, std::string &resultCursor, bool &resultMoreMessages)
bool ParseMillisecondTimestampChatReplayMessageJson(const ttv::json::Value &jMessage, uint64_t &result)
GraphQLErrorCode
Definition: chaterrortypes.h:85
bool ParseRaidStatusJson(const ttv::json::Value &jRaid, RaidStatus &status)
bool ParseSendRoomMessage(const ttv::json::Value &jVal, ChatRoomMessage &result, SendRoomMessageError &error)