FastComments.com

FastComments C++ SDK

ื–ื”ื• ื”-SDK ื”ืจืฉืžื™ ื‘-C++ ืขื‘ื•ืจ FastComments.

ื”-SDK ื”ืจืฉืžื™ ื‘-C++ ืขื‘ื•ืจ ื”-API ืฉืœ FastComments

ืžืื’ืจ

ืฆืคื” ื‘-GitHub

ื“ืจื™ืฉื•ืช Internal Link


  • C++17 ืื• ืžืื•ื—ืจ ื™ื•ืชืจ
  • CMake 3.14 ืื• ืžืื•ื—ืจ ื™ื•ืชืจ
  • OpenSSL
  • C++ REST SDK (cpprestsdk)
  • Boost
  • Google Test (ื™ื•ืจื“ ืื•ื˜ื•ืžื˜ื™ืช ืœืฆื•ืจืš ื‘ื“ื™ืงื•ืช)

ื”ืชืงื ื” Internal Link

ื”ืชืงื ืช ืชืœื•ื™ื•ืช

sudo apt install libcpprest-dev libboost-all-dev

ื‘ื ื™ื™ื” ืžื”ืžืงื•ืจ

mkdir build
cd build
cmake ..
make

ื”ืชืงื ื”

sudo make install

ืชื•ื›ืŸ ื”ืกืคืจื™ื™ื”

ืกืคืจื™ื™ื” ื–ื• ืžื›ื™ืœื” ืืช ืœืงื•ื— ื”-API ืฉื ื•ืฆืจ ื•ื›ืœื™ ื”-SSO ืฉืžืงืœื™ื ืขืœ ื”ืขื‘ื•ื“ื” ืขื ื”-API.

API ืฆื™ื‘ื•ืจื™ ืžื•ืœ API ืžืื•ื‘ื˜ื—

ืœืœืงื•ื— ื”-API ื™ืฉ ืฉืชื™ ืžื—ืœืงื•ืช, DefaultAPI ื•-PublicAPI. ื”ืžื—ืœืงื” DefaultAPI ืžื›ื™ืœื” ืฉื™ื˜ื•ืช ืฉื“ื•ืจืฉื•ืช ืืช ืžืคืชื— ื”-API ืฉืœืš, ื•-PublicAPI ืžื›ื™ืœื” ืงืจื™ืื•ืช API ืฉื ื™ืชืŸ ืœื‘ืฆืข ื™ืฉื™ืจื•ืช ืžื”ื“ืคื“ืคืŸ/ืžื›ืฉื™ืจ ื ื™ื™ื“/ื•ื›ื•' ืœืœื ืื™ืžื•ืช.

ื”ืขืจื•ืช Internal Link

Broadcast Ids

ืชืจืื” ืฉืขืœื™ืš ืœื”ืขื‘ื™ืจ broadcastId ื‘ื—ืœืง ืžื”ืงืจื™ืื•ืช ืœ-API. ื›ืฉืืชื” ืžืงื‘ืœ ืื™ืจื•ืขื™ื, ืชืงื‘ืœ ืืช ื”-ID ื”ื–ื” ื‘ื—ื–ืจื”, ื›ืš ืชื“ืข ืœื”ืชืขืœื ืžื”ืื™ืจื•ืข ืื ืืชื” ืžืชื›ื ืŸ ืœื™ื™ืฉื ืฉื™ื ื•ื™ื™ื ื‘ืื•ืคืŸ ืื•ืคื˜ื™ืžื™ืกื˜ื™ ื‘ืฆื“ ื”ืœืงื•ื— (ืฉื›ื ืจืื” ืชืจืฆื” ืœืขืฉื•ืช ืžื›ื™ื•ื•ืŸ ืฉื–ื” ืžืกืคืง ืืช ื”ื—ื•ื•ื™ื” ื”ื˜ื•ื‘ื” ื‘ื™ื•ืชืจ). ื”ืขื‘ืจ ื›ืืŸ UUID. ื”-ID ืฆืจื™ืš ืœื”ื™ื•ืช ืžืกืคื™ืง ื™ื™ื—ื•ื“ื™ ื›ื“ื™ ืฉืœื ื™ื•ืคื™ืข ืคืขืžื™ื™ื ื‘ืกืฉืŸ ื‘ื“ืคื“ืคืŸ.

SSO (ื›ื ื™ืกื” ื™ื—ื™ื“ื”)

ืœื“ื•ื’ืžืื•ืช SSO, ืจืื” ืœืžื˜ื”.

ืฉื™ืžื•ืฉ ื‘-SSO Internal Link


SSO ืคืฉื•ื˜

#include <fastcomments/sso/fastcomments_sso.hpp>
#include <iostream>

using namespace fastcomments::sso;

int main() {
    SimpleSSOUserData user("user-123", "user@example.com", "https://example.com/avatar.jpg");
    FastCommentsSSO sso = FastCommentsSSO::newSimple(user);
    std::string token = sso.createToken();

    std::cout << "SSO Token: " << token << std::endl;
    return 0;
}

SSO ืžืื•ื‘ื˜ื—

#include <fastcomments/sso/fastcomments_sso.hpp>
#include <iostream>

using namespace fastcomments::sso;

int main() {
    SecureSSOUserData user("user-123", "user@example.com", "johndoe", "https://example.com/avatar.jpg");

    std::string apiKey = "your-api-key";
    FastCommentsSSO sso = FastCommentsSSO::newSecure(apiKey, user);
    std::string token = sso.createToken();

    std::cout << "Secure SSO Token: " << token << std::endl;
    return 0;
}

ืื’ืจื’ืฆื™ื” Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
aggregationRequest AggregationRequest ื›ืŸ
parentTenantId string ืœื
includeStats bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AggregationResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช aggregate
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3AggregationRequest aggReq;
4boost::optional<utility::string_t> parentTenant = boost::optional<utility::string_t>(U("parent-org-456"));
5boost::optional<bool> includeStats = boost::optional<bool>(true);
6auto aggTask = api->aggregate(tenantId, aggReq, parentTenant, includeStats)
7 .then([](pplx::task<std::shared_ptr<AggregationResponse>> t) {
8 try {
9 auto res = t.get();
10 auto out = std::make_shared<AggregationResponse>(*res);
11 return out;
12 } catch (...) {
13 return std::shared_ptr<AggregationResponse>();
14 }
15 });
16

ืงื‘ืœืช ื™ื•ืžื ื™ ื‘ื™ืงื•ืจืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
limit double ืœื
skip double ืœื
order SORT_DIR ืœื
after double ืœื
before double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetAuditLogs_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getAuditLogs
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> limit = 100;
4boost::optional<double> skip = 0;
5boost::optional<SORT_DIR> order = SORT_DIR::DESC;
6boost::optional<double> after = 1633046400;
7boost::optional<double> before = 1633132800;
8api->getAuditLogs(tenantId, limit, skip, order, after, before)
9.then([](pplx::task<std::shared_ptr<GetAuditLogs_200_response>> t) {
10 try {
11 auto resp = t.get();
12 if (resp) {
13 auto copy = std::make_shared<GetAuditLogs_200_response>(*resp);
14 (void)copy;
15 }
16 } catch (...) {
17 }
18});
19

ื—ืกื™ืžื” ืžืชื•ืš ืชื’ื•ื‘ื” (ืฆื™ื‘ื•ืจื™) Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
publicBlockFromCommentParams PublicBlockFromCommentParams ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: BlockFromCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-blockFromCommentPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-987654321");
4PublicBlockFromCommentParams params;
5params.reason = U("Repeated harassment");
6params.durationMinutes = 1440;
7boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("sso-token-abc123"));
8auto placeholder = std::make_shared<BlockFromCommentPublic_200_response>();
9api->blockFromCommentPublic(tenantId, commentId, params, sso)
10.then([](pplx::task<std::shared_ptr<BlockFromCommentPublic_200_response>> t) {
11 try {
12 auto resp = t.get();
13 if (resp) std::wcout << U("Comment blocked successfully\n");
14 else std::wcout << U("Block request returned empty response\n");
15 } catch (...) {
16 std::wcout << U("Block request failed\n");
17 }
18});
19

ื‘ื™ื˜ื•ืœ ื—ืกื™ืžื” ืฉืœ ืชื’ื•ื‘ื” (ืฆื™ื‘ื•ืจื™) Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ื˜ื™ืคื•ืก ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
publicBlockFromCommentParams PublicBlockFromCommentParams ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UnBlockCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-unBlockCommentPublic
Copy Copy
1
2auto publicParams = std::make_shared<PublicBlockFromCommentParams>();
3boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(utility::string_t(U("user@example.com")));
4api->unBlockCommentPublic(utility::string_t(U("my-tenant-123")), utility::string_t(U("comment-98765")), *publicParams, sso)
5.then([](pplx::task<std::shared_ptr<UnBlockCommentPublic_200_response>> task) {
6 try {
7 auto resp = task.get();
8 if (resp) std::cout << "Unblocked comment successfully" << std::endl;
9 } catch (const std::exception& e) {
10 std::cerr << "Unblock failed: " << e.what() << std::endl;
11 }
12});
13

ื‘ื“ื™ืงืช ืชื’ื•ื‘ื•ืช ื—ืกื•ืžื•ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentIds string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CheckedCommentsForBlocked_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-checkedCommentsForBlocked
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3utility::string_t commentIds = utility::conversions::to_string_t("cmt-456,cmt-789");
4boost::optional<utility::string_t> sso = utility::conversions::to_string_t("user@example.com");
5auto task = api->checkedCommentsForBlocked(tenantId, commentIds, sso)
6 .then([=](std::shared_ptr<CheckedCommentsForBlocked_200_response> resp) -> std::shared_ptr<CheckedCommentsForBlocked_200_response> {
7 if (!resp) return std::make_shared<CheckedCommentsForBlocked_200_response>();
8 return resp;
9 });
10

ื—ืกื™ืžืช ืžืฉืชืžืฉ ืžืชื•ืš ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
blockFromCommentParams BlockFromCommentParams ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: BlockFromCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-blockUserFromComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456789");
4auto blockParams = std::make_shared<BlockFromCommentParams>();
5boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("user@example.com"));
6boost::optional<utility::string_t> anonUserId = boost::optional<utility::string_t>(U("anon-98765"));
7api->blockUserFromComment(tenantId, commentId, *blockParams, userId, anonUserId)
8.then([](std::shared_ptr<BlockFromCommentPublic_200_response> resp){
9 if (resp) {
10 std::cout << "User blocked successfully\n";
11 } else {
12 std::cout << "Block request returned empty response\n";
13 }
14}).wait();
15

ื™ืฆื™ืจืช ืชื’ื•ื‘ื” ืฆื™ื‘ื•ืจื™ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
broadcastId string ื›ืŸ
commentData CommentData ื›ืŸ
sessionId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createCommentPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlId = U("/articles/2026/fastcomments-cpp-integration");
4utility::string_t broadcastId = U("broadcast-001");
5CommentData commentData;
6commentData.content = U("Hello from the C++ SDK โ€” great article!");
7commentData.authorEmail = U("reader@example.com");
8commentData.authorName = U("Jane Reader");
9boost::optional<utility::string_t> sessionId = boost::optional<utility::string_t>(U("sess-9f3a2"));
10boost::optional<utility::string_t> sso = boost::none;
11auto task = api->createCommentPublic(tenantId, urlId, broadcastId, commentData, sessionId, sso)
12 .then([](pplx::task<std::shared_ptr<CreateCommentPublic_200_response>> t) {
13 try {
14 auto resp = t.get();
15 if (resp) {
16 auto resultCopy = std::make_shared<CreateCommentPublic_200_response>(*resp);
17 }
18 } catch (const std::exception&) {}
19 });
20task.wait();
21

ืžื—ื™ืงืช ืชื’ื•ื‘ื” Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
contextUserId string ืœื
isLive bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-987654321");
4boost::optional<utility::string_t> contextUserId = boost::optional<utility::string_t>(U("moderator@acme.com"));
5boost::optional<bool> isLive = boost::optional<bool>(true);
6api->deleteComment(tenantId, commentId, contextUserId, isLive)
7.then([](pplx::task<std::shared_ptr<DeleteComment_200_response>> t){
8 try {
9 auto resp = t.get();
10 if (resp) {
11 auto processed = std::make_shared<DeleteComment_200_response>(*resp);
12 }
13 } catch (const std::exception&) {
14 }
15});
16

ืžื—ื™ืงืช ืชื’ื•ื‘ื” ืฆื™ื‘ื•ืจื™ืช Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteCommentPublic
Copy Copy
1
2utility::string_t tenantId(U("my-tenant-123"));
3utility::string_t commentId(U("cmt-456"));
4utility::string_t broadcastId(U("brd-789"));
5boost::optional<utility::string_t> editKey = boost::optional<utility::string_t>(utility::string_t(U("editkey-abc123")));
6boost::optional<utility::string_t> sso;
7
8api->deleteCommentPublic(tenantId, commentId, broadcastId, editKey, sso)
9.then([](pplx::task<std::shared_ptr<DeleteCommentPublic_200_response>> t){
10 try {
11 auto resp = t.get();
12 if (resp) {
13 auto copied = std::make_shared<DeleteCommentPublic_200_response>(*resp);
14 (void)copied;
15 }
16 } catch (const std::exception&) {
17 auto fallback = std::make_shared<DeleteCommentPublic_200_response>();
18 (void)fallback;
19 }
20});
21

ื”ืกืจืช ื”ืฆื‘ืขืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
commentId string ื›ืŸ
voteId string ื›ืŸ
urlId string ื›ืŸ
broadcastId string ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteCommentVote_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช deleteCommentVote
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-789");
4utility::string_t voteId = U("vote-456");
5utility::string_t urlId = U("/articles/2026/fastcomments-guide");
6utility::string_t broadcastId = U("broadcast-001");
7boost::optional<utility::string_t> editKey = boost::optional<utility::string_t>(U("editkey-abc"));
8boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
9auto placeholder = std::make_shared<DeleteCommentVote_200_response>();
10api->deleteCommentVote(tenantId, commentId, voteId, urlId, broadcastId, editKey, sso)
11.then([=](pplx::task<std::shared_ptr<DeleteCommentVote_200_response>> t){
12 try {
13 auto resp = t.get();
14 if (resp) std::cout << "Vote deleted\n";
15 } catch (const std::exception &e) {
16 std::cerr << "Delete failed: " << e.what() << '\n';
17 }
18});
19

ื“ื™ื•ื•ื— ืขืœ ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-flagComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456789");
4boost::optional<utility::string_t> userId{ utility::string_t(U("user@example.com")) };
5boost::optional<utility::string_t> anonUserId;
6
7api->flagComment(tenantId, commentId, userId, anonUserId)
8.then([](std::shared_ptr<FlagComment_200_response> resp) {
9 auto result = resp ? resp : std::make_shared<FlagComment_200_response>();
10 (void)result;
11});
12

ืงื‘ืœืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getComment
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3boost::optional<utility::string_t> maybeId = utility::conversions::to_string_t("comment-98765");
4auto getTask = api->getComment(tenantId, *maybeId)
5 .then([](pplx::task<std::shared_ptr<GetComment_200_response>> t) {
6 try {
7 auto resp = t.get();
8 auto result = resp ? resp : std::make_shared<GetComment_200_response>();
9 return result;
10 } catch (const std::exception&) {
11 return std::make_shared<GetComment_200_response>();
12 }
13 });
14

ืงื‘ืœืช ืชื’ื•ื‘ื•ืช Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
page int32_t ืœื
limit int32_t ืœื
skip int32_t ืœื
asTree bool ืœื
skipChildren int32_t ืœื
limitChildren int32_t ืœื
maxTreeDepth int32_t ืœื
urlId string ืœื
userId string ืœื
anonUserId string ืœื
contextUserId string ืœื
hashTag string ืœื
parentId string ืœื
direction SortDirections ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetComments_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getComments
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<int32_t> page(1);
4boost::optional<int32_t> limit(50);
5boost::optional<int32_t> skip(0);
6boost::optional<bool> asTree(true);
7boost::optional<int32_t> skipChildren(0);
8boost::optional<int32_t> limitChildren(10);
9boost::optional<int32_t> maxTreeDepth(3);
10boost::optional<utility::string_t> urlId(U("/articles/2025/fast-api"));
11boost::optional<utility::string_t> userId(U("user@example.com"));
12boost::optional<utility::string_t> anonUserId(U("anon-abc-123"));
13boost::optional<utility::string_t> contextUserId(U("context-user-789"));
14boost::optional<utility::string_t> hashTag(U("release"));
15boost::optional<utility::string_t> parentId(U("parent-comment-456"));
16boost::optional<SortDirections> direction(SortDirections::DESCENDING);
17
18api->getComments(tenantId, page, limit, skip, asTree, skipChildren, limitChildren, maxTreeDepth, urlId, userId, anonUserId, contextUserId, hashTag, parentId, direction)
19.then([](pplx::task<std::shared_ptr<GetComments_200_response>> task){
20 try {
21 auto response = task.get();
22 if (!response) response = std::make_shared<GetComments_200_response>();
23 } catch (const std::exception&) {
24 }
25});
26

ืงื‘ืœืช ืชื’ื•ื‘ื•ืช ืฆื™ื‘ื•ืจื™ื•ืช Internal Link

req tenantId urlId

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
page int32_t ืœื
direction SortDirections ืœื
sso string ืœื
skip int32_t ืœื
skipChildren int32_t ืœื
limit int32_t ืœื
limitChildren int32_t ืœื
countChildren bool ืœื
fetchPageForCommentId string ืœื
includeConfig bool ืœื
countAll bool ืœื
includei10n bool ืœื
locale string ืœื
modules string ืœื
isCrawler bool ืœื
includeNotificationCount bool ืœื
asTree bool ืœื
maxTreeDepth int32_t ืœื
useFullTranslationIds bool ืœื
parentId string ืœื
searchText string ืœื
hashTags vector<string ืœื
userId string ืœื
customConfigStr string ืœื
afterCommentId string ืœื
beforeCommentId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCommentsPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getCommentsPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlId = U("article-2026-01-12");
4boost::optional<int32_t> page(2);
5boost::optional<SortDirections> direction(SortDirections::DESC);
6boost::optional<bool> includeConfig(true);
7boost::optional<std::vector<utility::string_t>> hashTags(std::vector<utility::string_t>{ U("feature"), U("bug") });
8api->getCommentsPublic(
9 tenantId,
10 urlId,
11 page,
12 direction,
13 boost::optional<utility::string_t>(),
14 boost::optional<int32_t>(),
15 boost::optional<int32_t>(),
16 boost::optional<int32_t>(50),
17 boost::optional<int32_t>(),
18 boost::optional<bool>(false),
19 boost::optional<utility::string_t>(),
20 includeConfig,
21 boost::optional<bool>(),
22 boost::optional<bool>(),
23 boost::optional<utility::string_t>(),
24 boost::optional<utility::string_t>(),
25 boost::optional<bool>(),
26 boost::optional<bool>(),
27 boost::optional<bool>(),
28 boost::optional<int32_t>(),
29 boost::optional<bool>(),
30 boost::optional<utility::string_t>(),
31 boost::optional<utility::string_t>(),
32 hashTags,
33 boost::optional<utility::string_t>(U("user-789")),
34 boost::optional<utility::string_t>(),
35 boost::optional<utility::string_t>()
36).then([](pplx::task<std::shared_ptr<GetCommentsPublic_200_response>> t){
37 try {
38 auto resp = t.get();
39 auto fallback = std::make_shared<GetCommentsPublic_200_response>();
40 (void)(resp ? resp : fallback);
41 } catch (...) {}
42});
43

ืงื‘ืœืช ื˜ืงืกื˜ ื”ืชื’ื•ื‘ื” Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
commentId string ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCommentText_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getCommentText
Copy Copy
1
2utility::string_t tenantId(U("my-tenant-123"));
3utility::string_t commentId(U("cmt-456"));
4boost::optional<utility::string_t> editKey(utility::string_t(U("edit-key-789")));
5boost::optional<utility::string_t> sso(utility::string_t(U("user@example.com")));
6auto task = api->getCommentText(tenantId, commentId, editKey, sso)
7 .then([](std::shared_ptr<GetCommentText_200_response> resp){
8 if (resp) {
9 std::cout << "Comment text retrieved\n";
10 } else {
11 std::cout << "Comment not found\n";
12 }
13 });
14task.wait();
15

ืงื‘ืœืช ืฉืžื•ืช ืžืฉืชืžืฉื™ื ืฉื”ืฆื‘ื™ืขื• ืขืœ ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
dir int32_t ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCommentVoteUserNames_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getCommentVoteUserNames
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456");
4int32_t dir = 1;
5boost::optional<utility::string_t> sso{ utility::string_t(U("user@example.com")) };
6api->getCommentVoteUserNames(tenantId, commentId, dir, sso)
7 .then([](pplx::task<std::shared_ptr<GetCommentVoteUserNames_200_response>> t) {
8 try {
9 auto resp = t.get();
10 if (!resp) resp = std::make_shared<GetCommentVoteUserNames_200_response>();
11 } catch (const std::exception&) {
12 }
13 });
14

ื ืขื™ืœืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: LockComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-lockComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456");
4utility::string_t broadcastId = U("brdcst-789");
5boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
6
7api->lockComment(tenantId, commentId, broadcastId, sso)
8 .then([](pplx::task<std::shared_ptr<LockComment_200_response>> t)
9 {
10 try
11 {
12 auto resp = t.get();
13 if(!resp)
14 {
15 resp = std::make_shared<LockComment_200_response>();
16 }
17 }
18 catch(const std::exception& ex)
19 {
20 (void)ex;
21 }
22 });
23

ื ืขื™ืฆืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: PinComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช pinComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456789");
4utility::string_t broadcastId = U("broadcast-98765");
5boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
6
7api->pinComment(tenantId, commentId, broadcastId, sso)
8.then([](pplx::task<std::shared_ptr<PinComment_200_response>> t){
9 try {
10 auto resp = t.get();
11 if (!resp) resp = std::make_shared<PinComment_200_response>();
12 (void)resp;
13 } catch (...) {}
14}).wait();
15

ืฉืžื™ืจืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createCommentParams CreateCommentParams ื›ืŸ
isLive bool ืœื
doSpamCheck bool ืœื
sendEmails bool ืœื
populateNotifications bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: SaveComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-saveComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3auto createParamsPtr = std::make_shared<CreateCommentParams>();
4createParamsPtr->content = utility::string_t(U("This is a test comment posted via SDK"));
5createParamsPtr->authorEmail = utility::string_t(U("user@example.com"));
6createParamsPtr->threadId = utility::string_t(U("thread-456"));
7boost::optional<bool> isLive(true);
8boost::optional<bool> doSpamCheck(false);
9boost::optional<bool> sendEmails(true);
10boost::optional<bool> populateNotifications(false);
11auto task = api->saveComment(tenantId, *createParamsPtr, isLive, doSpamCheck, sendEmails, populateNotifications)
12.then([](std::shared_ptr<SaveComment_200_response> resp){
13 if (resp) std::cout << "Comment saved successfully\n";
14 else std::cout << "Failed to save comment\n";
15});
16task.wait();
17

ื”ื’ื“ืจืช ื˜ืงืกื˜ ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
commentTextUpdateRequest CommentTextUpdateRequest ื›ืŸ
editKey string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: SetCommentText_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-setCommentText
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456");
4utility::string_t broadcastId = U("bcast-789");
5CommentTextUpdateRequest commentTextUpdateRequest;
6commentTextUpdateRequest.setText(U("Updated comment text by moderator."));
7boost::optional<utility::string_t> editKey = boost::optional<utility::string_t>(U("edit-key-abc123"));
8boost::optional<utility::string_t> sso;
9api->setCommentText(tenantId, commentId, broadcastId, commentTextUpdateRequest, editKey, sso)
10.then([](pplx::task<std::shared_ptr<SetCommentText_200_response>> task){
11 try {
12 auto resp = task.get();
13 if (resp) {
14 auto result = std::make_shared<SetCommentText_200_response>(*resp);
15 std::cout << "Comment updated\n";
16 } else {
17 std::cout << "No response\n";
18 }
19 } catch (const std::exception &e) {
20 std::cerr << "setCommentText error: " << e.what() << '\n';
21 }
22});
23

ื‘ื™ื˜ื•ืœ ื—ืกื™ืžืช ืžืฉืชืžืฉ ืžืชื•ืš ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
unBlockFromCommentParams UnBlockFromCommentParams ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UnBlockCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ unBlockUserFromComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456789");
4auto paramsPtr = std::make_shared<UnBlockFromCommentParams>();
5boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("user@example.com"));
6boost::optional<utility::string_t> anonUserId = boost::none;
7api->unBlockUserFromComment(tenantId, commentId, *paramsPtr, userId, anonUserId)
8 .then([](std::shared_ptr<UnBlockCommentPublic_200_response> resp){
9 (void)resp;
10 })
11 .wait();
12

ื”ืกืจืช ื“ื™ื•ื•ื— ืขืœ ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช unFlagComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-987654321");
4boost::optional<utility::string_t> userId(U("user@example.com"));
5boost::optional<utility::string_t> anonUserId;
6auto fallback = std::make_shared<FlagComment_200_response>();
7api->unFlagComment(tenantId, commentId, userId, anonUserId)
8 .then([fallback](pplx::task<std::shared_ptr<FlagComment_200_response>> t) {
9 try {
10 auto resp = t.get();
11 if (!resp) resp = fallback;
12 } catch (...) {
13 }
14 });
15

ื‘ื™ื˜ื•ืœ ื ืขื™ืœืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string Yes
commentId string Yes
broadcastId string Yes
sso string No

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: LockComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-unLockComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-987654");
4utility::string_t broadcastId = U("brd-456");
5boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
6auto dummyResp = std::make_shared<LockComment_200_response>();
7api->unLockComment(tenantId, commentId, broadcastId, sso)
8.then([](pplx::task<std::shared_ptr<LockComment_200_response>> task){
9 try {
10 auto resp = task.get();
11 if (resp) {
12 std::cout << "Comment unlocked successfully\n";
13 } else {
14 std::cout << "Unlock returned empty response\n";
15 }
16 } catch (const std::exception& e) {
17 std::cerr << "Error unlocking comment: " << e.what() << '\n';
18 }
19});
20

ื”ืกืจืช ื ืขื™ืฆืช ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
broadcastId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PinComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-unPinComment
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456789");
4utility::string_t broadcastId = U("brd-98765");
5boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
6auto defaultResp = std::make_shared<PinComment_200_response>();
7api->unPinComment(tenantId, commentId, broadcastId, sso)
8.then([defaultResp](pplx::task<std::shared_ptr<PinComment_200_response>> task) {
9 try {
10 auto resp = task.get();
11 if (!resp) resp = defaultResp;
12 std::cout << "unPinComment completed; response pointer " << (resp ? "valid" : "null") << std::endl;
13 } catch (const std::exception &e) {
14 std::cerr << "unPinComment failed: " << e.what() << std::endl;
15 }
16});
17

ืขื“ื›ื•ืŸ ืชื’ื•ื‘ื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updatableCommentParams UpdatableCommentParams ื›ืŸ
contextUserId string ืœื
doSpamCheck bool ืœื
isLive bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateComment
Copy Copy
1
2auto tenantId = utility::string_t(U("my-tenant-123"));
3auto commentId = utility::string_t(U("comment-456"));
4auto body = std::make_shared<UpdatableCommentParams>();
5body->content = utility::string_t(U("Updated comment text: fixed a typo and clarified meaning."));
6boost::optional<utility::string_t> contextUserId(utility::string_t(U("user@example.com")));
7boost::optional<bool> doSpamCheck(true);
8boost::optional<bool> isLive(false);
9api->updateComment(tenantId, commentId, body, contextUserId, doSpamCheck, isLive)
10.then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t){
11 try {
12 auto result = t.get();
13 (void)result;
14 } catch (...) {}
15});
16

ื”ืฆื‘ืขื” ืขืœ ืชื’ื•ื‘ื” Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
commentId string ื›ืŸ
urlId string ื›ืŸ
broadcastId string ื›ืŸ
voteBodyParams VoteBodyParams ื›ืŸ
sessionId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: VoteComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช voteComment
Copy Copy
1
2VoteBodyParams voteBodyParams;
3utility::string_t tenantId = U("my-tenant-123");
4utility::string_t commentId = U("cmt-7890");
5utility::string_t urlId = U("/articles/2025/how-to-cpprest");
6utility::string_t broadcastId = U("broadcast-321");
7boost::optional<utility::string_t> sessionId = boost::optional<utility::string_t>(U("sess-0a1b2c"));
8boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("sso-jwt-xyz"));
9
10api->voteComment(tenantId, commentId, urlId, broadcastId, voteBodyParams, sessionId, sso)
11 .then([](pplx::task<std::shared_ptr<VoteComment_200_response>> t) {
12 try {
13 auto resp = t.get();
14 if (!resp) resp = std::make_shared<VoteComment_200_response>();
15 } catch (...) {
16 }
17 });
18

ื”ื•ืกืคืช ื”ื’ื“ืจื•ืช ื“ื•ืžื™ื™ืŸ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
addDomainConfigParams AddDomainConfigParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddDomainConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช addDomainConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3AddDomainConfigParams params;
4params.domain = U("comments.example.com");
5params.allowSubdomains = boost::optional<bool>(true);
6params.contactEmail = boost::optional<utility::string_t>(U("admin@example.com"));
7api->addDomainConfig(tenantId, params)
8.then([](pplx::task<std::shared_ptr<AddDomainConfig_200_response>> t) {
9 try {
10 auto resp = t.get();
11 if (resp) {
12 auto copy = std::make_shared<AddDomainConfig_200_response>(*resp);
13 (void)copy;
14 }
15 } catch (const std::exception& e) {
16 (void)e;
17 }
18});
19

ืžื—ื™ืงืช ื”ื’ื“ืจืช ื“ื•ืžื™ื™ืŸ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
domain string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteDomainConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteDomainConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t domain = U("comments.example.com");
4boost::optional<utility::string_t> ifMatch = boost::optional<utility::string_t>(U("W/\"abc123\""));
5api->deleteDomainConfig(tenantId, domain)
6.then([](pplx::task<std::shared_ptr<DeleteDomainConfig_200_response>> t) {
7 try {
8 auto resp = t.get();
9 if (resp) {
10 auto resultCopy = std::make_shared<DeleteDomainConfig_200_response>(*resp);
11 }
12 } catch (const std::exception&) {
13 }
14});
15

ืงื‘ืœืช ื”ื’ื“ืจืช ื“ื•ืžื™ื™ืŸ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
domain string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getDomainConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t domain = U("example.com");
4boost::optional<utility::string_t> env = boost::optional<utility::string_t>(U("production"));
5api->getDomainConfig(tenantId, domain).then([=](pplx::task<std::shared_ptr<GetDomainConfig_200_response>> t) {
6 try {
7 auto resp = t.get();
8 if (!resp) resp = std::make_shared<GetDomainConfig_200_response>();
9 std::cout << "Domain config received for " << utility::conversions::to_utf8string(domain) << '\n';
10 } catch (const std::exception &ex) {
11 std::cerr << "Failed to get domain config: " << ex.what() << '\n';
12 }
13});
14

ืงื‘ืœืช ื”ื’ื“ืจื•ืช ื“ื•ืžื™ื™ืŸ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfigs_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getDomainConfigs
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3boost::optional<utility::string_t> requestId = utility::conversions::to_string_t("req-789");
4api->getDomainConfigs(tenantId)
5 .then([requestId](pplx::task<std::shared_ptr<GetDomainConfigs_200_response>> t){
6 try {
7 auto resp = t.get();
8 auto copy = std::make_shared<GetDomainConfigs_200_response>(*resp);
9 if (requestId) std::cout << "Request id present\n";
10 std::cout << "Domain configs loaded\n";
11 } catch (const std::exception &e) {
12 std::cerr << "Error: " << e.what() << '\n';
13 }
14 }).wait();
15

ืฉื™ื ื•ื™ ื—ืœืงื™ ืฉืœ ื”ื’ื“ืจืช ื“ื•ืžื™ื™ืŸ Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
domainToUpdate string ื›ืŸ
patchDomainConfigParams PatchDomainConfigParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-patchDomainConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t domainToUpdate = U("example.com");
4PatchDomainConfigParams params;
5params.adminEmail = boost::optional<utility::string_t>(U("admin@example.com"));
6params.enableSso = boost::optional<bool>(true);
7params.ssoRedirectUrl = boost::optional<utility::string_t>(U("https://auth.example.com/callback"));
8api->patchDomainConfig(tenantId, domainToUpdate, params)
9 .then([](pplx::task<std::shared_ptr<GetDomainConfig_200_response>> task){
10 try {
11 auto resp = task.get();
12 if (resp) {
13 auto updated = std::make_shared<GetDomainConfig_200_response>(*resp);
14 }
15 } catch (const std::exception& e) {
16 auto err = std::string(e.what());
17 }
18 });
19

ื”ื—ืœืคืช ื”ื’ื“ืจืช ื“ื•ืžื™ื™ืŸ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
domainToUpdate string ื›ืŸ
updateDomainConfigParams UpdateDomainConfigParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetDomainConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-putDomainConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t domainToUpdate = U("comments.myapp.com");
4auto params = std::make_shared<UpdateDomainConfigParams>();
5params->displayName = utility::string_t(U("My App Comments"));
6params->enabled = boost::optional<bool>(true);
7params->contactEmail = boost::optional<utility::string_t>(U("admin@myapp.com"));
8api->putDomainConfig(tenantId, domainToUpdate, *params)
9.then([](pplx::task<std::shared_ptr<GetDomainConfig_200_response>> t){
10 try {
11 auto resp = t.get();
12 if (resp) {
13 auto updated = resp;
14 }
15 } catch (const std::exception& e) {
16 }
17});
18

ื™ืฆื™ืจืช ืชื‘ื ื™ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createEmailTemplateBody CreateEmailTemplateBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateEmailTemplate_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createEmailTemplate
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3auto body = std::make_shared<CreateEmailTemplateBody>();
4body->name = utility::string_t(U("Welcome Email"));
5body->subject = utility::string_t(U("Welcome to Our Service"));
6body->fromEmail = utility::string_t(U("no-reply@mycompany.com"));
7body->fromName = utility::string_t(U("MyCompany Support"));
8body->html = utility::string_t(U("<p>Hello , welcome to MyCompany.</p>"));
9body->description = boost::optional<utility::string_t>(utility::string_t(U("Onboarding welcome template")));
10api->createEmailTemplate(tenantId, *body)
11.then([](pplx::task<std::shared_ptr<CreateEmailTemplate_200_response>> task){
12 try {
13 auto resp = task.get();
14 if (resp) {
15 bool created = true;
16 (void)created;
17 }
18 } catch (const std::exception&) {
19 }
20});
21

ืžื—ื™ืงืช ืชื‘ื ื™ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteEmailTemplate
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t templateId = U("welcome-email-template-456");
4boost::optional<utility::string_t> requestNote = boost::optional<utility::string_t>(U("remove-obsolete"));
5auto fallback = std::make_shared<FlagCommentPublic_200_response>();
6api->deleteEmailTemplate(tenantId, templateId)
7.then([requestNote, fallback](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) -> pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> {
8 try {
9 auto resp = t.get();
10 if (resp) return pplx::task_from_result(resp);
11 if (requestNote) return pplx::task_from_result(fallback);
12 return pplx::task_from_result<std::shared_ptr<FlagCommentPublic_200_response>>(nullptr);
13 } catch (...) {
14 return pplx::task_from_result<std::shared_ptr<FlagCommentPublic_200_response>>(nullptr);
15 }
16});
17

ืžื—ื™ืงืช ืฉื’ื™ืืช ืจื™ื ื“ื•ืจ ืชื‘ื ื™ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
errorId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื•ื—ื–ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœึพdeleteEmailTemplateRenderError
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t templateId = U("welcome-email-template-456");
4utility::string_t errorId = U("render-error-789");
5auto placeholder = std::make_shared<FlagCommentPublic_200_response>();
6boost::optional<utility::string_t> operatorNote = boost::none;
7operatorNote = U("auto-resolved");
8
9api->deleteEmailTemplateRenderError(tenantId, templateId, errorId)
10 .then([operatorNote, templateId](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> previous) {
11 try {
12 auto resp = previous.get();
13 if (resp) {
14 std::cout << "Successfully deleted render error for template: " << utility::conversions::to_utf8string(templateId) << std::endl;
15 }
16 if (operatorNote) {
17 std::cout << "Note: " << utility::conversions::to_utf8string(operatorNote.value()) << std::endl;
18 }
19 } catch (const std::exception &e) {
20 std::cerr << "API error: " << e.what() << std::endl;
21 }
22 });
23

ืงื‘ืœืช ืชื‘ื ื™ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplate_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getEmailTemplate
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t templateId = U("welcome-email-001");
4boost::optional<utility::string_t> preferLocale = boost::optional<utility::string_t>(U("en-US"));
5api->getEmailTemplate(tenantId, templateId)
6 .then([preferLocale](std::shared_ptr<GetEmailTemplate_200_response> resp) {
7 auto templateResp = resp ? resp : std::make_shared<GetEmailTemplate_200_response>();
8 if (preferLocale) {
9 (void)preferLocale;
10 }
11 return templateResp;
12 });
13

ืงื‘ืœืช ื”ื’ื“ืจื•ืช ืชื‘ื ื™ื•ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplateDefinitions_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getEmailTemplateDefinitions
Copy Copy
1
2boost::optional<utility::string_t> tenantIdOpt = utility::string_t(U("my-tenant-123"));
3api->getEmailTemplateDefinitions(tenantIdOpt.value())
4.then([](pplx::task<std::shared_ptr<GetEmailTemplateDefinitions_200_response>> task) {
5 try {
6 auto resp = task.get();
7 auto localCopy = std::make_shared<GetEmailTemplateDefinitions_200_response>(*resp);
8 (void)localCopy;
9 } catch (const std::exception& e) {
10 auto fallback = std::make_shared<GetEmailTemplateDefinitions_200_response>();
11 (void)fallback;
12 }
13});
14

ืงื‘ืœืช ืฉื’ื™ืื•ืช ืจื™ื ื“ื•ืจ ืฉืœ ืชื‘ื ื™ื•ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplateRenderErrors_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getEmailTemplateRenderErrors
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("email-template-789");
4boost::optional<double> skip{10.0};
5auto defaultResp = std::make_shared<GetEmailTemplateRenderErrors_200_response>();
6api->getEmailTemplateRenderErrors(tenantId, id, skip).then([defaultResp](pplx::task<std::shared_ptr<GetEmailTemplateRenderErrors_200_response>> t){
7 try {
8 auto resp = t.get();
9 if(!resp) resp = defaultResp;
10 std::wcout << (resp ? U("Received render errors response\n") : U("No response\n"));
11 } catch(...) {
12 std::wcout << U("Failed to retrieve render errors\n");
13 }
14});
15

ืงื‘ืœืช ืชื‘ื ื™ื•ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string Yes
skip double No

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEmailTemplates_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getEmailTemplates
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> skip = 10.0;
4api->getEmailTemplates(tenantId, skip).then([](pplx::task<std::shared_ptr<GetEmailTemplates_200_response>> t){
5 try {
6 auto resp = t.get();
7 if (resp) {
8 auto copy = std::make_shared<GetEmailTemplates_200_response>(*resp);
9 }
10 } catch (const std::exception& e) {
11 (void)e;
12 }
13});
14

ืจื™ื ื“ื•ืจ ืชื‘ื ื™ืช ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
renderEmailTemplateBody RenderEmailTemplateBody ื›ืŸ
locale string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: RenderEmailTemplate_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-renderEmailTemplate
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3RenderEmailTemplateBody renderEmailTemplateBody;
4renderEmailTemplateBody.setTemplateName(U("welcome_wagon"));
5renderEmailTemplateBody.setRecipient(U("alice@example.com"));
6web::json::value vars;
7vars[U("firstName")] = web::json::value::string(U("Alice"));
8renderEmailTemplateBody.setVariables(vars);
9boost::optional<utility::string_t> locale = boost::optional<utility::string_t>(U("en-US"));
10auto placeholder = std::make_shared<RenderEmailTemplate_200_response>();
11api->renderEmailTemplate(tenantId, renderEmailTemplateBody, locale)
12.then([](pplx::task<std::shared_ptr<RenderEmailTemplate_200_response>> task){
13 try {
14 auto resp = task.get();
15 if (resp) {
16 std::cout << "Email template rendered successfully" << std::endl;
17 } else {
18 std::cerr << "No response returned" << std::endl;
19 }
20 } catch (const std::exception& e) {
21 std::cerr << "Render failed: " << e.what() << std::endl;
22 }
23});
24

ืขื“ื›ื•ืŸ ืชื‘ื ื™ืช ื“ื•ื"ืœ Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateEmailTemplateBody UpdateEmailTemplateBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateEmailTemplate
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t templateId = U("welcome-email-01");
4UpdateEmailTemplateBody updateBody;
5boost::optional<utility::string_t> optionalFrom = boost::optional<utility::string_t>(U("no-reply@myapp.com"));
6updateBody.from = optionalFrom;
7updateBody.subject = U("Welcome to MyApp");
8updateBody.html = U("<p>Hi , welcome to MyApp!</p>");
9auto bodyPtr = std::make_shared<UpdateEmailTemplateBody>(updateBody);
10api->updateEmailTemplate(tenantId, templateId, *bodyPtr)
11.then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t){
12 try {
13 auto resp = t.get();
14 if (resp) {
15 std::cout << "Email template updated successfully\n";
16 } else {
17 std::cout << "Unexpected empty response\n";
18 }
19 } catch (const std::exception &e) {
20 std::cerr << "Update failed: " << e.what() << '\n';
21 }
22});
23

ืงื‘ืœืช ื™ื•ืžืŸ ืื™ืจื•ืขื™ื Internal Link


req tenantId urlId userIdWS

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string Yes
urlId string Yes
userIdWS string Yes
startTime int64_t Yes
endTime int64_t Yes

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEventLog_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getEventLog
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlId = U("article-456");
4utility::string_t userIdWS = U("user@example.com");
5int64_t startTime = 1672531200LL;
6boost::optional<int64_t> endTimeOpt = 1672617600LL;
7api->getEventLog(tenantId, urlId, userIdWS, startTime, *endTimeOpt)
8 .then([](pplx::task<std::shared_ptr<GetEventLog_200_response>> t){
9 try {
10 auto resp = t.get();
11 if (!resp) resp = std::make_shared<GetEventLog_200_response>();
12 } catch (const std::exception&) {}
13 });
14

ืงื‘ืœืช ื™ื•ืžืŸ ืื™ืจื•ืขื™ื ื’ืœื•ื‘ืœื™ Internal Link

req tenantId urlId userIdWS

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
userIdWS string ื›ืŸ
startTime int64_t ื›ืŸ
endTime int64_t ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetEventLog_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getGlobalEventLog
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t defaultUrlId = U("article-456");
4boost::optional<utility::string_t> maybeUrlId = boost::optional<utility::string_t>(U("article-456"));
5utility::string_t urlId = maybeUrlId ? *maybeUrlId : defaultUrlId;
6utility::string_t userIdWS = U("user@example.com");
7int64_t startTime = 1622505600000LL;
8int64_t endTime = 1622592000000LL;
9auto defaultResp = std::make_shared<GetEventLog_200_response>();
10api->getGlobalEventLog(tenantId, urlId, userIdWS, startTime, endTime)
11.then([](pplx::task<std::shared_ptr<GetEventLog_200_response>> task){
12 try {
13 auto resp = task.get();
14 if (resp) std::cout << "Received event log with entries\n";
15 else std::cout << "No event log returned\n";
16 } catch (const std::exception &e) {
17 std::cerr << "getGlobalEventLog failed: " << e.what() << '\n';
18 }
19});
20

ื™ืฆื™ืจืช ืคื•ืกื˜ ืคื™ื“ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createFeedPostParams CreateFeedPostParams ื›ืŸ
broadcastId string ืœื
isLive bool ืœื
doSpamCheck bool ืœื
skipDupCheck bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateFeedPost_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createFeedPost
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3CreateFeedPostParams params;
4params.title = utility::string_t(U("Weekly Product Update"));
5params.content = utility::string_t(U("This week we shipped several improvements to the API."));
6params.authorEmail = utility::string_t(U("jane.doe@example.com"));
7
8boost::optional<utility::string_t> broadcastId = boost::optional<utility::string_t>(U("broadcast-456"));
9boost::optional<bool> isLive = boost::optional<bool>(true);
10boost::optional<bool> doSpamCheck = boost::optional<bool>(false);
11boost::optional<bool> skipDupCheck = boost::optional<bool>(false);
12
13api->createFeedPost(tenantId, params, broadcastId, isLive, doSpamCheck, skipDupCheck)
14.then([](pplx::task<std::shared_ptr<CreateFeedPost_200_response>> t){
15 try {
16 auto resp = t.get();
17 auto copy = std::make_shared<CreateFeedPost_200_response>(*resp);
18 } catch (...) {}
19});
20

ื™ืฆื™ืจืช ืคื•ืกื˜ ืคื™ื“ ืฆื™ื‘ื•ืจื™ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createFeedPostParams CreateFeedPostParams ื›ืŸ
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateFeedPostPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createFeedPostPublic
Copy Copy
1
2auto tenantId = utility::string_t(U("my-tenant-123"));
3auto paramsPtr = std::make_shared<CreateFeedPostParams>();
4paramsPtr->title = utility::string_t(U("Weekly Release Notes"));
5paramsPtr->content = utility::string_t(U("We've deployed version 2.4.1 with bug fixes and UX improvements."));
6paramsPtr->authorEmail = utility::string_t(U("alice@example.com"));
7boost::optional<utility::string_t> broadcastId = utility::string_t(U("broadcast-456"));
8boost::optional<utility::string_t> sso = utility::string_t(U("sso-token-abc123"));
9api->createFeedPostPublic(tenantId, *paramsPtr, broadcastId, sso)
10 .then([](pplx::task<std::shared_ptr<CreateFeedPostPublic_200_response>> t) {
11 try {
12 auto resp = t.get();
13 if (resp) std::cout << "Feed post created successfully\n";
14 } catch (const std::exception& e) {
15 std::cerr << "Failed to create feed post: " << e.what() << '\n';
16 }
17 });
18

ืžื—ื™ืงืช ืคื•ืกื˜ ืคื™ื“ ืฆื™ื‘ื•ืจื™ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
postId string ื›ืŸ
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

Returns: DeleteFeedPostPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteFeedPostPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t postId = U("post-456");
4boost::optional<utility::string_t> broadcastId = boost::optional<utility::string_t>(U("broadcast-789"));
5boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
6api->deleteFeedPostPublic(tenantId, postId, broadcastId, sso)
7.then([](pplx::task<std::shared_ptr<DeleteFeedPostPublic_200_response>> t){
8 try {
9 auto resp = t.get();
10 if (!resp) resp = std::make_shared<DeleteFeedPostPublic_200_response>();
11 (void)resp;
12 } catch (const std::exception&) {
13 }
14});
15

ืงื‘ืœืช ืคื•ืกื˜ื™ื ื‘ืคื™ื“ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
afterId string ืœื
limit int32_t ืœื
tags vector<string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetFeedPosts_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getFeedPosts
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> afterId(utility::string_t(U("post_456")));
4boost::optional<int32_t> limit(50);
5std::vector<utility::string_t> tagVec{U("news"), U("announcement")};
6boost::optional<std::vector<utility::string_t>> tags(tagVec);
7api->getFeedPosts(tenantId, afterId, limit, tags)
8.then([](std::shared_ptr<GetFeedPosts_200_response> resp) {
9 auto copy = std::make_shared<GetFeedPosts_200_response>(*resp);
10 (void)copy;
11});
12

ืงื‘ืœืช ืคื•ืกื˜ื™ื ื‘ืคื™ื“ ืฆื™ื‘ื•ืจื™ื™ื Internal Link

req tenantId afterId

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
afterId string ืœื
limit int32_t ืœื
tags vector<string ืœื
sso string ืœื
isCrawler bool ืœื
includeUserInfo bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetFeedPostsPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getFeedPostsPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> afterId = boost::optional<utility::string_t>(U("post_abc123"));
4boost::optional<int32_t> limit = boost::optional<int32_t>(20);
5boost::optional<std::vector<utility::string_t>> tags = boost::optional<std::vector<utility::string_t>>(std::vector<utility::string_t>{U("news"), U("tech")});
6boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
7boost::optional<bool> isCrawler = boost::optional<bool>(false);
8boost::optional<bool> includeUserInfo = boost::optional<bool>(true);
9api->getFeedPostsPublic(tenantId, afterId, limit, tags, sso, isCrawler, includeUserInfo)
10.then([](pplx::task<std::shared_ptr<GetFeedPostsPublic_200_response>> t){
11 try {
12 std::shared_ptr<GetFeedPostsPublic_200_response> resp = t.get();
13 auto marker = std::make_shared<int>(1);
14 if (resp) { (void)marker; }
15 } catch (const std::exception&) {
16 }
17});
18

ืงื‘ืœืช ืกื˜ื˜ื™ืกื˜ื™ืงื•ืช ืคื•ืกื˜ื™ื ื‘ืคื™ื“ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
postIds vector<string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetFeedPostsStats_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getFeedPostsStats
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3std::vector<utility::string_t> postIds{ U("post-abc-001"), U("post-xyz-123") };
4boost::optional<utility::string_t> sso(U("user@example.com"));
5api->getFeedPostsStats(tenantId, postIds, sso)
6 .then([](pplx::task<std::shared_ptr<GetFeedPostsStats_200_response>> t)
7 {
8 try {
9 auto resp = t.get();
10 auto respCopy = resp ? std::make_shared<GetFeedPostsStats_200_response>(*resp) : nullptr;
11 (void)respCopy;
12 } catch (const std::exception&) {}
13 });
14

ืงื‘ืœืช ืจื™ืืงืฆื™ื•ืช ืžืฉืชืžืฉื™ื ืฆื™ื‘ื•ืจื™ื•ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
postIds vector<string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserReactsPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getUserReactsPublic
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3std::vector<utility::string_t> postIdsVec = {
4 utility::conversions::to_string_t("post-456"),
5 utility::conversions::to_string_t("post-789")
6};
7boost::optional<std::vector<utility::string_t>> postIdsOpt = postIdsVec;
8boost::optional<utility::string_t> ssoOpt = utility::conversions::to_string_t("user@example.com");
9api->getUserReactsPublic(tenantId, postIdsOpt, ssoOpt)
10 .then([](pplx::task<std::shared_ptr<GetUserReactsPublic_200_response>> t) {
11 try {
12 auto resp = t.get();
13 if (!resp) resp = std::make_shared<GetUserReactsPublic_200_response>();
14 } catch (const std::exception&) {
15 }
16 });
17

ื”ื•ืกืคืช ืจื™ืืงืฆื™ื” ืœืคื•ืกื˜ ืคื™ื“ ืฆื™ื‘ื•ืจื™ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
postId string ื›ืŸ
reactBodyParams ReactBodyParams ื›ืŸ
isUndo bool ืœื
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: ReactFeedPostPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-reactFeedPostPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t postId = U("post-987");
4ReactBodyParams reactBodyParams;
5reactBodyParams.userId = U("jane.doe@example.com");
6reactBodyParams.reaction = U("like");
7boost::optional<bool> isUndo = boost::optional<bool>(false);
8boost::optional<utility::string_t> broadcastId = boost::optional<utility::string_t>(U("broadcast-001"));
9boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("sso-token-xyz"));
10api->reactFeedPostPublic(tenantId, postId, reactBodyParams, isUndo, broadcastId, sso)
11 .then([](pplx::task<std::shared_ptr<ReactFeedPostPublic_200_response>> task) {
12 try {
13 auto resp = task.get();
14 auto out = resp ? resp : std::make_shared<ReactFeedPostPublic_200_response>();
15 std::cout << "Reaction processed\n";
16 } catch (const std::exception &e) {
17 std::cerr << "React failed: " << e.what() << '\n';
18 }
19 });
20

ืขื“ื›ื•ืŸ ืคื•ืกื˜ ืคื™ื“ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
feedPost FeedPost ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช updateFeedPost
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t postId = U("post-987654321");
4FeedPost feedPost;
5feedPost.title = U("Weekly status update");
6feedPost.content = U("Completed the migration of the comments service to the new infra.");
7feedPost.authorEmail = U("developer@acme-corp.com");
8boost::optional<utility::string_t> summary = boost::optional<utility::string_t>(U("Migration complete"));
9feedPost.summary = summary;
10auto updateTask = api->updateFeedPost(tenantId, postId, feedPost)
11 .then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
12 try {
13 auto resp = t.get();
14 if (resp) {
15 auto cloned = std::make_shared<FlagCommentPublic_200_response>(*resp);
16 }
17 } catch (...) {
18 }
19 });
20

ืขื“ื›ื•ืŸ ืคื•ืกื˜ ืคื™ื“ ืฆื™ื‘ื•ืจื™ Internal Link


ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
postId string ื›ืŸ
updateFeedPostParams UpdateFeedPostParams ื›ืŸ
broadcastId string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื•ื—ื–ืจ: CreateFeedPostPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateFeedPostPublic
Copy Copy
1
2utility::string_t tenantId = U"my-tenant-123";
3utility::string_t postId = U"post-456";
4UpdateFeedPostParams params;
5boost::optional<utility::string_t> broadcastId = utility::string_t(U"broadcast-789");
6boost::optional<utility::string_t> sso = utility::string_t(U"user@example.com");
7api->updateFeedPostPublic(tenantId, postId, params, broadcastId, sso)
8.then([](pplx::task<std::shared_ptr<CreateFeedPostPublic_200_response>> task){
9 try {
10 auto resp = task.get();
11 if (!resp) resp = std::make_shared<CreateFeedPostPublic_200_response>();
12 (void)resp;
13 } catch (...) {}
14});
15

ื“ื™ื•ื•ื— ืขืœ ืชื’ื•ื‘ื” ืฆื™ื‘ื•ืจื™ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ื›ืŸ
isFlagged bool ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-flagCommentPublic
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-789012");
4bool isFlagged = true;
5boost::optional<utility::string_t> sso{ U("user@example.com") };
6api->flagCommentPublic(tenantId, commentId, isFlagged, sso)
7.then([](std::shared_ptr<FlagCommentPublic_200_response> resp){
8 auto respCopy = std::make_shared<FlagCommentPublic_200_response>(*resp);
9 return respCopy;
10});
11

ื”ื•ืกืคืช ื”ืืฉื˜ืื’ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ืœื
createHashTagBody CreateHashTagBody ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddHashTag_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-addHashTag
Copy Copy
1
2boost::optional<utility::string_t> tenantId(U("my-tenant-123"));
3auto bodyPtr = std::make_shared<CreateHashTagBody>();
4bodyPtr->name = U("release");
5bodyPtr->color = U("#00aaff");
6boost::optional<CreateHashTagBody> createBody(*bodyPtr);
7api->addHashTag(tenantId, createBody).then([](pplx::task<std::shared_ptr<AddHashTag_200_response>> t){
8 try {
9 auto resp = t.get();
10 (void)resp;
11 } catch(...) {}
12});
13

ื”ื•ืกืคืช ื”ืืฉื˜ืื’ื™ื ื‘ื›ืžื•ืช ื’ื“ื•ืœื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ืœื
bulkCreateHashTagsBody BulkCreateHashTagsBody ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddHashTagsBulk_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-addHashTagsBulk
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3auto bodyPtr = std::make_shared<BulkCreateHashTagsBody>();
4boost::optional<utility::string_t> optTenant(tenantId);
5boost::optional<BulkCreateHashTagsBody> optBody(*bodyPtr);
6api->addHashTagsBulk(optTenant, optBody).then([](pplx::task<std::shared_ptr<AddHashTagsBulk_200_response>> t){
7 try {
8 auto resp = t.get();
9 if (resp) std::cout << "Bulk hashtags added for tenant\n";
10 } catch (const std::exception &e) {
11 std::cerr << "addHashTagsBulk error: " << e.what() << '\n';
12 }
13});
14

ืžื—ื™ืงืช ื”ืืฉื˜ืื’ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tag string ื›ืŸ
tenantId string ืœื
deleteHashTagRequest DeleteHashTag_request ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteHashTag
Copy Copy
1
2utility::string_t tag = U("inappropriate");
3boost::optional<utility::string_t> tenantId = boost::optional<utility::string_t>(U("my-tenant-123"));
4DeleteHashTag_request req;
5boost::optional<DeleteHashTag_request> optReq = boost::optional<DeleteHashTag_request>(req);
6
7api->deleteHashTag(tag, tenantId, optReq)
8.then([](std::shared_ptr<FlagCommentPublic_200_response> resp){
9 auto out = std::make_shared<FlagCommentPublic_200_response>(*resp);
10 std::cout << "Hashtag removed successfully for tenant\n";
11 return out;
12}).wait();
13

ืงื‘ืœืช ื”ืืฉื˜ืื’ื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
page double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetHashTags_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getHashTags
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> page = 2.0;
4auto defaultResp = std::make_shared<GetHashTags_200_response>();
5api->getHashTags(tenantId, page).then([defaultResp](pplx::task<std::shared_ptr<GetHashTags_200_response>> t) {
6 try {
7 auto resp = t.get();
8 if(!resp) resp = defaultResp;
9 std::cout << "getHashTags completed; response object " << (resp ? "present" : "absent") << std::endl;
10 } catch(const std::exception& e) {
11 std::cout << "getHashTags error: " << e.what() << std::endl;
12 }
13});
14

ืฉื™ื ื•ื™ ื—ืœืงื™ ืฉืœ ื”ืืฉื˜ืื’ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tag string ื›ืŸ
tenantId string ืœื
updateHashTagBody UpdateHashTagBody ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PatchHashTag_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-patchHashTag
Copy Copy
1
2utility::string_t tag = U("release-1.0");
3boost::optional<utility::string_t> tenantId = boost::optional<utility::string_t>(U("my-tenant-123"));
4UpdateHashTagBody body;
5boost::optional<UpdateHashTagBody> updateBody = boost::optional<UpdateHashTagBody>(body);
6api->patchHashTag(tag, tenantId, updateBody)
7.then([](pplx::task<std::shared_ptr<PatchHashTag_200_response>> t) {
8 try {
9 auto resp = t.get();
10 if (resp) {
11 auto copied = std::make_shared<PatchHashTag_200_response>(*resp);
12 std::cout << "PatchHashTag succeeded" << std::endl;
13 } else {
14 std::cout << "PatchHashTag returned no data" << std::endl;
15 }
16 } catch (const std::exception &e) {
17 std::cerr << "PatchHashTag error: " << e.what() << std::endl;
18 }
19});
20

ื™ืฆื™ืจืช ืžื•ื“ืจื˜ื•ืจ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createModeratorBody CreateModeratorBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateModerator_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createModerator
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3CreateModeratorBody createModeratorBody;
4createModeratorBody.email = U("moderator@example.com");
5createModeratorBody.displayName = U("Support Moderator");
6createModeratorBody.roles = std::vector<utility::string_t>{ U("moderator"), U("support") };
7createModeratorBody.notes = boost::optional<utility::string_t>(U("Temporary moderator for Q1"));
8api->createModerator(tenantId, createModeratorBody)
9.then([](pplx::task<std::shared_ptr<CreateModerator_200_response>> t)
10{
11 try
12 {
13 auto resp = t.get();
14 auto respCopy = std::make_shared<CreateModerator_200_response>(*resp);
15 (void)respCopy;
16 }
17 catch (const std::exception&)
18 {
19 }
20});
21

ืžื—ื™ืงืช ืžื•ื“ืจื˜ื•ืจ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
sendEmail string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteModerator
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t moderatorId = U("moderator-456");
4boost::optional<utility::string_t> sendEmail = boost::optional<utility::string_t>(U("moderator@notifications.example.com"));
5api->deleteModerator(tenantId, moderatorId, sendEmail)
6 .then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t){
7 try {
8 auto resp = t.get();
9 if (!resp) resp = std::make_shared<FlagCommentPublic_200_response>();
10 return resp;
11 } catch (const std::exception&) {
12 return std::make_shared<FlagCommentPublic_200_response>();
13 }
14 });
15

ืงื‘ืœืช ืžื•ื“ืจื˜ื•ืจ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetModerator_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getModerator
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t moderatorId = U("moderator-456");
4boost::optional<utility::string_t> requestLocale = U("en-US");
5auto fallbackModerator = std::make_shared<GetModerator_200_response>();
6
7api->getModerator(tenantId, moderatorId)
8 .then([fallbackModerator, requestLocale](std::shared_ptr<GetModerator_200_response> resp) -> pplx::task<std::shared_ptr<GetModerator_200_response>> {
9 auto moderator = resp ? resp : fallbackModerator;
10 if (requestLocale) { auto loc = *requestLocale; (void)loc; }
11 return pplx::task_from_result(moderator);
12 })
13 .then([](std::shared_ptr<GetModerator_200_response> finalResp) -> void {
14 (void)finalResp;
15 });
16

ืงื‘ืœืช ืžื•ื“ืจื˜ื•ืจื™ื Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetModerators_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getModerators
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> skip = boost::optional<double>(10);
4auto task = api->getModerators(tenantId, skip)
5 .then([](std::shared_ptr<GetModerators_200_response> resp) {
6 if (!resp) {
7 std::cout << "No moderators returned\n";
8 return;
9 }
10 auto copy = std::make_shared<GetModerators_200_response>(*resp);
11 std::cout << "Retrieved moderators\n";
12 });
13task.wait();
14

ืฉืœื™ื—ืช ื”ื–ืžื ื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
fromName string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช sendInvite
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("comment-456");
4utility::string_t fromName = U("moderator@example.com");
5boost::optional<utility::string_t> inviteNote = boost::optional<utility::string_t>(U("Please review this flagged comment"));
6auto task = api->sendInvite(tenantId, id, fromName)
7 .then([inviteNote](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) -> std::shared_ptr<FlagCommentPublic_200_response> {
8 try {
9 auto resp = t.get();
10 auto wrapped = std::make_shared<FlagCommentPublic_200_response>(*resp);
11 (void)inviteNote;
12 return wrapped;
13 } catch (...) {
14 throw;
15 }
16 });
17

ืขื“ื›ื•ืŸ ืžื•ื“ืจื˜ื•ืจ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateModeratorBody UpdateModeratorBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateModerator
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t moderatorId = U("moderator-456");
4auto bodyPtr = std::make_shared<UpdateModeratorBody>();
5bodyPtr->email = utility::string_t(U("mod.jane@example.com"));
6bodyPtr->displayName = boost::optional<utility::string_t>(utility::string_t(U("Jane Moderator")));
7bodyPtr->enabled = boost::optional<bool>(true);
8api->updateModerator(tenantId, moderatorId, *bodyPtr).then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t){
9 try {
10 auto resp = t.get();
11 if (resp) {
12 std::cout << "Moderator updated successfully" << std::endl;
13 }
14 } catch (const std::exception &e) {
15 std::cerr << "Update failed: " << e.what() << std::endl;
16 }
17});
18

ืžื—ื™ืงืช ืกืคื™ืจืช ื”ืชืจืื•ืช Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœึพdeleteNotificationCount
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t notifId = U("notification-456");
4boost::optional<utility::string_t> actingUser = boost::optional<utility::string_t>(U("moderator@example.com"));
5api->deleteNotificationCount(tenantId, notifId)
6.then([actingUser](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
7 try {
8 auto resp = t.get();
9 if (!resp) resp = std::make_shared<FlagCommentPublic_200_response>();
10 if (actingUser) std::cout << "Actor: " << actingUser->c_str() << "\n";
11 std::cout << "Notification count cleared\n";
12 } catch (const std::exception &e) {
13 std::cout << "Failed: " << e.what() << "\n";
14 }
15});
16

ืงื‘ืœืช ืกืคื™ืจืช ื”ืชืจืื•ืช ืžืžื˜ืžื•ืŸ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetCachedNotificationCount_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getCachedNotificationCount
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t userId = U("user@example.com");
4boost::optional<utility::string_t> opt_status = boost::optional<utility::string_t>(U("unread"));
5api->getCachedNotificationCount(tenantId, userId)
6 .then([=](pplx::task<std::shared_ptr<GetCachedNotificationCount_200_response>> t){
7 try {
8 std::shared_ptr<GetCachedNotificationCount_200_response> resp = t.get();
9 if(!resp) return;
10 auto copy = std::make_shared<GetCachedNotificationCount_200_response>(*resp);
11 } catch(const std::exception &){
12 }
13 });
14

ืงื‘ืœืช ืžืกืคืจ ื”ืชืจืื•ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื
urlId string ืœื
fromCommentId string ืœื
viewed bool ืœื
type string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetNotificationCount_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getNotificationCount
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> userId = U("user@example.com");
4boost::optional<utility::string_t> urlId = U("https://www.example.com/article/456");
5boost::optional<utility::string_t> fromCommentId = U("cmt-789");
6boost::optional<bool> viewed = true;
7boost::optional<utility::string_t> type = U("reply");
8
9api->getNotificationCount(tenantId, userId, urlId, fromCommentId, viewed, type)
10 .then([](pplx::task<std::shared_ptr<GetNotificationCount_200_response>> task){
11 try {
12 auto resp = task.get();
13 auto result = resp ? resp : std::make_shared<GetNotificationCount_200_response>();
14 } catch (const std::exception&) {
15 }
16 });
17

ืงื‘ืœืช ื”ืชืจืื•ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื
urlId string ืœื
fromCommentId string ืœื
viewed bool ืœื
type string ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetNotifications_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getNotifications
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("user@example.com"));
4boost::optional<utility::string_t> urlId = boost::optional<utility::string_t>(U("https://example.com/posts/42"));
5boost::optional<utility::string_t> fromCommentId = boost::optional<utility::string_t>(U("cmt-98765"));
6boost::optional<bool> viewed = boost::optional<bool>(true);
7boost::optional<utility::string_t> type = boost::optional<utility::string_t>(U("reply"));
8boost::optional<double> skip = boost::optional<double>(0.0);
9
10api->getNotifications(tenantId, userId, urlId, fromCommentId, viewed, type, skip)
11.then([](pplx::task<std::shared_ptr<GetNotifications_200_response>> t){
12 try {
13 auto resp = t.get();
14 if (resp) {
15 auto processed = std::make_shared<GetNotifications_200_response>(*resp);
16 }
17 } catch (const std::exception&) {
18 }
19});
20

ืขื“ื›ื•ืŸ ื”ืชืจืื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateNotificationBody UpdateNotificationBody ื›ืŸ
userId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateNotification
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t notificationId = U("notif-456");
4UpdateNotificationBody updateNotificationBody;
5boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("moderator@example.com"));
6api->updateNotification(tenantId, notificationId, updateNotificationBody, userId)
7.then([=](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
8 try {
9 auto resp = t.get();
10 if (resp) {
11 auto respCopy = std::make_shared<FlagCommentPublic_200_response>(*resp);
12 std::cout << "Notification updated successfully\n";
13 } else {
14 std::cout << "No response received\n";
15 }
16 } catch (const std::exception &e) {
17 std::cerr << "Update failed: " << e.what() << "\n";
18 }
19});
20

ื”ื•ืกืคืช ื“ืฃ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createAPIPageData CreateAPIPageData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddPageAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-addPage
Copy Copy
1
2auto pageData = std::make_shared<CreateAPIPageData>();
3pageData->url = utility::string_t(U("https://example.com/articles/2025-modern-cpp"));
4pageData->title = utility::string_t(U("Modern C++ Patterns"));
5pageData->description = boost::optional<utility::string_t>(utility::string_t(U("Practical patterns for modern C++ development")));
6pageData->authorEmail = boost::optional<utility::string_t>(utility::string_t(U("dev@company.com")));
7pageData->published = boost::optional<bool>(true);
8
9api->addPage(utility::string_t(U("my-tenant-123")), *pageData)
10.then([](pplx::task<std::shared_ptr<AddPageAPIResponse>> t){
11 try {
12 auto resp = t.get();
13 return resp;
14 } catch (...) {
15 throw;
16 }
17});
18

ืžื—ื™ืงืช ื“ืฃ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื“ืจื•ืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeletePageAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deletePage
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t pageId = U("page-456");
4boost::optional<utility::string_t> correlationId = boost::optional<utility::string_t>(U("corr-20251122"));
5auto task = api->deletePage(tenantId, pageId)
6 .then([correlationId](pplx::task<std::shared_ptr<DeletePageAPIResponse>> prev) -> std::shared_ptr<DeletePageAPIResponse> {
7 try {
8 auto resp = prev.get();
9 if (resp) return resp;
10 return std::make_shared<DeletePageAPIResponse>();
11 } catch (const std::exception&) {
12 return std::make_shared<DeletePageAPIResponse>();
13 }
14 });
15

ืงื‘ืœืช ื“ืฃ ืœืคื™ ืžื–ื”ื” URL Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPageByURLIdAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getPageByURLId
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlId = U("home-page-789");
4boost::optional<utility::string_t> locale = boost::optional<utility::string_t>(U("en-US"));
5api->getPageByURLId(tenantId, urlId).then([=](pplx::task<std::shared_ptr<GetPageByURLIdAPIResponse>> task){
6 try {
7 auto resp = task.get();
8 auto result = resp ? resp : std::make_shared<GetPageByURLIdAPIResponse>();
9 (void)result;
10 } catch (const std::exception &ex) {
11 auto err = std::make_shared<GetPageByURLIdAPIResponse>();
12 (void)err;
13 }
14});
15

ืงื‘ืœืช ื“ืคื™ื Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPagesAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getPages
Copy Copy
1
2int main()
3{
4 utility::string_t tenantId = U("my-tenant-123");
5 boost::optional<utility::string_t> statusFilter = U("published");
6 boost::optional<int> pageNumber = 1;
7 auto placeholder = std::make_shared<GetPagesAPIResponse>();
8 api->getPages(tenantId)
9 .then([placeholder](std::shared_ptr<GetPagesAPIResponse> resp) {
10 if (resp) {
11 *placeholder = *resp;
12 auto refs = resp.use_count();
13 (void)refs;
14 }
15 })
16 .wait();
17 return 0;
18}
19

ืฉื™ื ื•ื™ ื—ืœืงื™ ืฉืœ ื“ืฃ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateAPIPageData UpdateAPIPageData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PatchPageAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-patchPage
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t pageId = U("page-9876");
4auto updatePtr = std::make_shared<UpdateAPIPageData>();
5updatePtr->title = utility::string_t(U("About Our Team"));
6updatePtr->slug = utility::string_t(U("about-our-team"));
7updatePtr->enabled = boost::optional<bool>(true);
8updatePtr->description = boost::optional<utility::string_t>(U("Updated team overview and contact information"));
9api->patchPage(tenantId, pageId, *updatePtr)
10.then([](pplx::task<std::shared_ptr<PatchPageAPIResponse>> t){
11 try {
12 auto resp = t.get();
13 if (resp) {
14 std::cout << "Patch successful, page id: " << resp->id << std::endl;
15 }
16 } catch (const std::exception &e) {
17 std::cerr << "Patch failed: " << e.what() << std::endl;
18 }
19});
20

ืžื—ื™ืงืช ืื™ืจื•ืข ื•ื•ื‘-ื”ื•ืง ืžืžืชื™ืŸ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deletePendingWebhookEvent
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t eventId = U("wh_evt_456");
4boost::optional<utility::string_t> requestId = boost::optional<utility::string_t>(U("req-789"));
5api->deletePendingWebhookEvent(tenantId, eventId)
6 .then([requestId](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
7 try {
8 auto resp = t.get();
9 if (resp) {
10 auto resultCopy = std::make_shared<FlagCommentPublic_200_response>(*resp);
11 if (requestId) {
12 (void)requestId.get();
13 }
14 (void)resultCopy;
15 } else {
16 auto fallback = std::make_shared<FlagCommentPublic_200_response>();
17 (void)fallback;
18 }
19 } catch (const std::exception&) {
20 auto errorObj = std::make_shared<FlagCommentPublic_200_response>();
21 (void)errorObj;
22 }
23 }).wait();
24

ืงื‘ืœืช ืกืคื™ืจืช ืื™ืจื•ืขื™ ื•ื•ื‘-ื”ื•ืง ืžืžืชื™ื ื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ืœื
externalId string ืœื
eventType string ืœื
type string ืœื
domain string ืœื
attemptCountGT double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPendingWebhookEventCount_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getPendingWebhookEventCount
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> commentId = boost::optional<utility::string_t>(U("cmt-789"));
4boost::optional<utility::string_t> externalId = boost::optional<utility::string_t>(U("ext-456"));
5boost::optional<utility::string_t> eventType = boost::optional<utility::string_t>(U("comment_created"));
6boost::optional<utility::string_t> type = boost::optional<utility::string_t>(U("webhook"));
7boost::optional<utility::string_t> domain = boost::optional<utility::string_t>(U("example.com"));
8boost::optional<double> attemptCountGT = boost::optional<double>(1.0);
9api->getPendingWebhookEventCount(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT)
10.then([](pplx::task<std::shared_ptr<GetPendingWebhookEventCount_200_response>> t){
11 try {
12 auto resp = t.get();
13 auto respCopy = std::make_shared<GetPendingWebhookEventCount_200_response>(*resp);
14 std::cout << "Pending webhook event count retrieved\n";
15 } catch (const std::exception &e) {
16 std::cerr << "Failed to get pending count: " << e.what() << '\n';
17 }
18}).wait();
19

ืงื‘ืœืช ืื™ืจื•ืขื™ ื•ื•ื‘-ื”ื•ืง ืžืžืชื™ื ื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
commentId string ืœื
externalId string ืœื
eventType string ืœื
type string ืœื
domain string ืœื
attemptCountGT double ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetPendingWebhookEvents_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getPendingWebhookEvents
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> commentId = boost::optional<utility::string_t>(U("cmt-98765"));
4boost::optional<utility::string_t> externalId = boost::optional<utility::string_t>(U("ext-abc-01"));
5boost::optional<utility::string_t> eventType = boost::optional<utility::string_t>(U("comment_created"));
6boost::optional<utility::string_t> type = boost::optional<utility::string_t>(U("webhook"));
7boost::optional<utility::string_t> domain = boost::optional<utility::string_t>(U("example.com"));
8boost::optional<double> attemptCountGT = boost::optional<double>(2.0);
9boost::optional<double> skip = boost::optional<double>(0.0);
10
11api->getPendingWebhookEvents(tenantId, commentId, externalId, eventType, type, domain, attemptCountGT, skip)
12.then([](pplx::task<std::shared_ptr<GetPendingWebhookEvents_200_response>> t) {
13 try {
14 auto resp = t.get();
15 auto copy = std::make_shared<GetPendingWebhookEvents_200_response>(*resp);
16 (void)copy;
17 } catch (const std::exception& e) {
18 (void)e;
19 auto empty = std::make_shared<GetPendingWebhookEvents_200_response>();
20 (void)empty;
21 }
22});
23

ื™ืฆื™ืจืช ื”ื’ื“ืจืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createQuestionConfigBody CreateQuestionConfigBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateQuestionConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createQuestionConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3CreateQuestionConfigBody body;
4body.name = utility::string_t(U("Feature X Feedback"));
5body.description = boost::optional<utility::string_t>(utility::string_t(U("Ask users if Feature X met their needs")));
6body.createdBy = utility::string_t(U("admin@mycompany.com"));
7body.enabled = boost::optional<bool>(true);
8api->createQuestionConfig(tenantId, body).then([](std::shared_ptr<CreateQuestionConfig_200_response> resp){
9 if(resp){
10 auto result = std::make_shared<CreateQuestionConfig_200_response>(*resp);
11 std::wcout << U("Question config created successfully") << std::endl;
12 } else {
13 std::wcout << U("Failed to create question config") << std::endl;
14 }
15});
16

ืžื—ื™ืงืช ื”ื’ื“ืจืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteQuestionConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("qcfg-98765");
4boost::optional<utility::string_t> tenantOpt = tenantId;
5auto t = api->deleteQuestionConfig(tenantOpt.value_or(utility::string_t()), id)
6.then([](std::shared_ptr<FlagCommentPublic_200_response> resp) -> std::shared_ptr<FlagCommentPublic_200_response> {
7 auto out = std::make_shared<FlagCommentPublic_200_response>();
8 if (resp) *out = *resp;
9 return out;
10});
11t.wait();
12

ืงื‘ืœืช ื”ื’ื“ืจืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionConfig_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionConfig
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("question-456");
4boost::optional<utility::string_t> locale = U("en-US");
5auto defaultResp = std::make_shared<GetQuestionConfig_200_response>();
6api->getQuestionConfig(tenantId, id).then([defaultResp](pplx::task<std::shared_ptr<GetQuestionConfig_200_response>> t) {
7 try {
8 auto resp = t.get();
9 if(!resp) resp = defaultResp;
10 std::cout << "Question config retrieved" << std::endl;
11 } catch(const std::exception &e) {
12 std::cerr << "Failed to get question config: " << e.what() << std::endl;
13 }
14});
15

ืงื‘ืœืช ื”ื’ื“ืจื•ืช ืฉืืœื•ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionConfigs_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getQuestionConfigs
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> skip = 10;
4api->getQuestionConfigs(tenantId, skip).then([](pplx::task<std::shared_ptr<GetQuestionConfigs_200_response>> task) {
5 try {
6 auto resp = task.get();
7 if (resp) {
8 auto localCopy = std::make_shared<GetQuestionConfigs_200_response>(*resp);
9 }
10 } catch (const std::exception&) {
11 }
12});
13

ืขื“ื›ื•ืŸ ื”ื’ื“ืจืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateQuestionConfigBody UpdateQuestionConfigBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateQuestionConfig
Copy Copy
1
2auto tenantId = utility::string_t(U("my-tenant-123"));
3auto configId = utility::string_t(U("question-config-456"));
4auto body = std::make_shared<UpdateQuestionConfigBody>();
5body->enabled = true;
6body->threshold = 5;
7body->moderatorEmail = utility::string_t(U("moderator@example.com"));
8body->notifyUsers = boost::optional<bool>(true);
9body->description = boost::optional<utility::string_t>(utility::string_t(U("Tighten question moderation for new users")));
10
11api->updateQuestionConfig(tenantId, configId, *body)
12 .then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
13 try {
14 auto resp = t.get();
15 std::cout << (resp ? "updateQuestionConfig succeeded\n" : "updateQuestionConfig returned null\n");
16 } catch (const std::exception& e) {
17 std::cerr << "updateQuestionConfig failed: " << e.what() << '\n';
18 }
19 });
20

ื™ืฆื™ืจืช ืชื•ืฆืืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
createQuestionResultBody CreateQuestionResultBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateQuestionResult_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createQuestionResult
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3CreateQuestionResultBody createQuestionResultBody;
4createQuestionResultBody.questionId = U("question-789");
5createQuestionResultBody.userEmail = U("student@example.com");
6createQuestionResultBody.selectedOption = U("B");
7createQuestionResultBody.isCorrect = true;
8createQuestionResultBody.score = 9.5;
9createQuestionResultBody.metadata = boost::optional<utility::string_t>(U("{\"session\":\"quiz-2026-01\"}"));
10auto task = api->createQuestionResult(tenantId, createQuestionResultBody)
11.then([](pplx::task<std::shared_ptr<CreateQuestionResult_200_response>> t){
12 try {
13 auto result = t.get();
14 auto copy = std::make_shared<CreateQuestionResult_200_response>(*result);
15 (void)copy;
16 } catch (...) {}
17});
18task.wait();
19

ืžื—ื™ืงืช ืชื•ืฆืืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteQuestionResult
Copy Copy
1
2boost::optional<utility::string_t> maybeTenant = boost::none;
3utility::string_t defaultTenant = U("my-tenant-123");
4utility::string_t questionId = U("question-456");
5utility::string_t tenant = maybeTenant ? *maybeTenant : defaultTenant;
6api->deleteQuestionResult(tenant, questionId)
7.then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> task){
8 try {
9 auto resp = task.get();
10 auto processed = std::make_shared<FlagCommentPublic_200_response>(*resp);
11 } catch (const std::exception&) {
12 }
13});
14

ืงื‘ืœืช ืชื•ืฆืืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionResult_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionResult
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t questionId = U("question-456");
4boost::optional<utility::string_t> requestor = U("user@example.com");
5
6auto task = api->getQuestionResult(tenantId, questionId)
7 .then([requestor](pplx::task<std::shared_ptr<GetQuestionResult_200_response>> prev) -> std::shared_ptr<GetQuestionResult_200_response> {
8 try {
9 auto resp = prev.get();
10 if (!resp) return std::make_shared<GetQuestionResult_200_response>();
11 (void)requestor;
12 return resp;
13 } catch (const std::exception &) {
14 return std::make_shared<GetQuestionResult_200_response>();
15 }
16 });
17

ืงื‘ืœืช ืชื•ืฆืื•ืช ืฉืืœื•ืŸ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ืœื
userId string ืœื
startDate string ืœื
questionId string ืœื
questionIds string ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetQuestionResults_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getQuestionResults
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> urlId = boost::optional<utility::string_t>(U("/articles/2025/new-feature"));
4boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("alice@example.com"));
5boost::optional<utility::string_t> startDate = boost::optional<utility::string_t>(U("2025-01-01T00:00:00Z"));
6boost::optional<utility::string_t> questionId = boost::optional<utility::string_t>(U("q-789"));
7boost::optional<utility::string_t> questionIds = boost::optional<utility::string_t>(U("q-789,q-790"));
8boost::optional<double> skip = boost::optional<double>(10.0);
9
10api->getQuestionResults(tenantId, urlId, userId, startDate, questionId, questionIds, skip)
11.then([](pplx::task<std::shared_ptr<GetQuestionResults_200_response>> t){
12 try {
13 std::shared_ptr<GetQuestionResults_200_response> resp = t.get();
14 if (resp) {
15 auto copy = std::make_shared<GetQuestionResults_200_response>(*resp);
16 }
17 } catch (const std::exception&) {}
18});
19

ืขื“ื›ื•ืŸ ืชื•ืฆืืช ืฉืืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateQuestionResultBody UpdateQuestionResultBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateQuestionResult
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("question-456");
4UpdateQuestionResultBody updateQuestionResultBody;
5auto moderatorEmail = std::make_shared<utility::string_t>(U("moderator@example.com"));
6boost::optional<utility::string_t> resolutionNote = boost::optional<utility::string_t>(U("Marked duplicate of q-123"));
7api->updateQuestionResult(tenantId, id, updateQuestionResultBody)
8 .then([moderatorEmail, resolutionNote](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t)
9 {
10 try {
11 auto resp = t.get();
12 if (resp) {
13 auto resultPtr = resp;
14 }
15 } catch (...) {}
16 });
17

ืื’ืจื’ืฆื™ื™ืช ืชื•ืฆืื•ืช ืฉืืœื•ืŸ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
questionId string ืœื
questionIds vector<string ืœื
urlId string ืœื
timeBucket AggregateTimeBucket ืœื
startDate datetime ืœื
forceRecalculate bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AggregateQuestionResults_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-aggregateQuestionResults
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> questionId(U("q-42"));
4boost::optional<std::vector<utility::string_t>> questionIds(std::vector<utility::string_t>{U("q-42"), U("q-43")});
5boost::optional<utility::string_t> urlId(U("page-789"));
6boost::optional<AggregateTimeBucket> timeBucket;
7boost::optional<utility::datetime> startDate(utility::datetime::from_string(U("2025-01-01T00:00:00Z")));
8boost::optional<bool> forceRecalculate(true);
9
10api->aggregateQuestionResults(tenantId, questionId, questionIds, urlId, timeBucket, startDate, forceRecalculate)
11.then([](std::shared_ptr<AggregateQuestionResults_200_response> resp){
12 if (resp) {
13 auto resultCopy = std::make_shared<AggregateQuestionResults_200_response>(*resp);
14 }
15});
16

ืื’ืจื’ืฆื™ื™ืช ืชื•ืฆืื•ืช ืฉืืœื•ืŸ ื‘ื›ืžื•ืช ื’ื“ื•ืœื” Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
bulkAggregateQuestionResultsRequest BulkAggregateQuestionResultsRequest ื›ืŸ
forceRecalculate bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: BulkAggregateQuestionResults_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช bulkAggregateQuestionResults
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3BulkAggregateQuestionResultsRequest request;
4boost::optional<bool> forceRecalculate(true);
5api->bulkAggregateQuestionResults(tenantId, request, forceRecalculate)
6.then([](pplx::task<std::shared_ptr<BulkAggregateQuestionResults_200_response>> t){
7 try {
8 auto resp = t.get();
9 if (!resp) {
10 auto empty = std::make_shared<BulkAggregateQuestionResults_200_response>();
11 std::cout << "No aggregated results returned\n";
12 } else {
13 std::cout << "Aggregated results received\n";
14 }
15 } catch (const std::exception& ex) {
16 std::cerr << "Error fetching aggregated results: " << ex.what() << '\n';
17 }
18});
19

ืฉื™ืœื•ื‘ ืชื’ื•ื‘ื•ืช ืขื ืชื•ืฆืื•ืช ืฉืืœื•ืŸ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
questionId string ืœื
questionIds vector<string ืœื
urlId string ืœื
startDate datetime ืœื
forceRecalculate bool ืœื
minValue double ืœื
maxValue double ืœื
limit double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CombineCommentsWithQuestionResults_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-combineCommentsWithQuestionResults
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> questionId = boost::optional<utility::string_t>(U("q-98765"));
4boost::optional<std::vector<utility::string_t>> questionIds = boost::optional<std::vector<utility::string_t>>(std::vector<utility::string_t>{U("q-98765"), U("q-12345")});
5boost::optional<utility::string_t> urlId = boost::optional<utility::string_t>(U("/posts/2024/interesting-article"));
6boost::optional<utility::datetime> startDate = boost::optional<utility::datetime>(utility::datetime::from_string(U("2024-01-01T00:00:00Z")));
7boost::optional<bool> forceRecalculate = boost::optional<bool>(true);
8boost::optional<double> minValue = boost::optional<double>(0.0);
9boost::optional<double> maxValue = boost::optional<double>(1.0);
10boost::optional<double> limit = boost::optional<double>(100.0);
11
12api->combineCommentsWithQuestionResults(tenantId, questionId, questionIds, urlId, startDate, forceRecalculate, minValue, maxValue, limit)
13.then([](pplx::task<std::shared_ptr<CombineCommentsWithQuestionResults_200_response>> task){
14 try {
15 auto response = task.get();
16 auto output = response ? response : std::make_shared<CombineCommentsWithQuestionResults_200_response>();
17 } catch (const std::exception&) {
18 }
19});
20

ื”ื•ืกืคืช ืžืฉืชืžืฉ SSO Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createAPISSOUserData CreateAPISSOUserData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: AddSSOUserAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช addSSOUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3auto createData = std::make_shared<CreateAPISSOUserData>();
4createData->email = utility::string_t(U("alice@example.com"));
5createData->externalUserId = utility::string_t(U("okta|987654321"));
6createData->displayName = boost::optional<utility::string_t>(U("Alice Johnson"));
7createData->roles = std::vector<utility::string_t>{ U("moderator"), U("editor") };
8api->addSSOUser(tenantId, createData)
9.then([](pplx::task<std::shared_ptr<AddSSOUserAPIResponse>> task){
10 try {
11 auto resp = task.get();
12 if (resp) {
13 (void)resp;
14 }
15 } catch (...) {
16 }
17});
18

ืžื—ื™ืงืช ืžืฉืชืžืฉ SSO Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
deleteComments bool ืœื
commentDeleteMode string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteSSOUserAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteSSOUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t ssoId = U("user@example.com");
4boost::optional<bool> deleteComments = true;
5boost::optional<utility::string_t> commentDeleteMode = U("anonymize");
6
7api->deleteSSOUser(tenantId, ssoId, deleteComments, commentDeleteMode)
8.then([](pplx::task<std::shared_ptr<DeleteSSOUserAPIResponse>> t){
9 try {
10 auto resp = t.get();
11 auto respCopy = std::make_shared<DeleteSSOUserAPIResponse>(*resp);
12 (void)respCopy;
13 } catch (const std::exception&) {
14 }
15});
16

ืงื‘ืœืช ืžืฉืชืžืฉ SSO ืœืคื™ ื“ื•ื"ืœ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
email string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSSOUserByEmailAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getSSOUserByEmail
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t email = U("user@example.com");
4boost::optional<utility::string_t> includeInactive = boost::optional<utility::string_t>(U("false"));
5api->getSSOUserByEmail(tenantId, email).then([includeInactive](pplx::task<std::shared_ptr<GetSSOUserByEmailAPIResponse>> t) {
6 try {
7 auto resp = t.get();
8 return resp ? resp : std::make_shared<GetSSOUserByEmailAPIResponse>();
9 } catch (...) {
10 return std::make_shared<GetSSOUserByEmailAPIResponse>();
11 }
12}).then([](std::shared_ptr<GetSSOUserByEmailAPIResponse> finalResp) {
13 (void)finalResp;
14});
15

ืงื‘ืœืช ืžืฉืชืžืฉ SSO ืœืคื™ ืžื–ื”ื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSSOUserByIdAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getSSOUserById
Copy Copy
1
2boost::optional<utility::string_t> optId = U("user-42@example.com");
3utility::string_t tenantId = U("my-tenant-123");
4utility::string_t id = optId.value_or(U("user-42@example.com"));
5api->getSSOUserById(tenantId, id).then([](pplx::task<std::shared_ptr<GetSSOUserByIdAPIResponse>> task){
6 try {
7 auto resp = task.get();
8 if (resp) {
9 auto out = resp;
10 (void)out;
11 } else {
12 auto fallback = std::make_shared<GetSSOUserByIdAPIResponse>();
13 (void)fallback;
14 }
15 } catch (const std::exception& ex) {
16 auto fallback = std::make_shared<GetSSOUserByIdAPIResponse>();
17 (void)ex;
18 (void)fallback;
19 }
20});
21

ืงื‘ืœืช ืžืฉืชืžืฉื™ SSO Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip int32_t ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSSOUsers_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getSSOUsers
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<int32_t> skip = 10;
4api->getSSOUsers(tenantId, skip).then([](pplx::task<std::shared_ptr<GetSSOUsers_200_response>> t){
5 try {
6 auto resp = t.get();
7 if (resp) {
8 auto copy = std::make_shared<GetSSOUsers_200_response>(*resp);
9 }
10 } catch(...) {}
11});
12

ืขื“ื›ื•ืŸ ื—ืœืงื™ ืฉืœ ืžืฉืชืžืฉ SSO Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateAPISSOUserData UpdateAPISSOUserData ื›ืŸ
updateComments bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PatchSSOUserAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-patchSSOUser
Copy Copy
1
2UpdateAPISSOUserData updateData;
3updateData.email = utility::string_t(U"user@example.com");
4updateData.displayName = utility::string_t(U"Jane Doe");
5boost::optional<bool> updateComments = true;
6auto responseHolder = std::make_shared<PatchSSOUserAPIResponse>();
7api->patchSSOUser(utility::string_t(U"my-tenant-123"), utility::string_t(U"user@example.com"), updateData, updateComments)
8.then([responseHolder](std::shared_ptr<PatchSSOUserAPIResponse> resp){
9 if (resp) *responseHolder = *resp;
10 return responseHolder;
11});
12

ื”ื—ืœืคืช ืžืฉืชืžืฉ SSO Internal Link


ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateAPISSOUserData UpdateAPISSOUserData ื›ืŸ
updateComments bool ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: PutSSOUserAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-putSSOUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("user@example.com");
4UpdateAPISSOUserData updateData;
5updateData.displayName = U("Jane Doe");
6updateData.email = U("user@example.com");
7boost::optional<bool> updateComments = true;
8api->putSSOUser(tenantId, id, updateData, updateComments)
9.then([](std::shared_ptr<PutSSOUserAPIResponse> resp){
10 if(!resp){ std::cout << "putSSOUser returned null\n"; return; }
11 auto copy = std::make_shared<PutSSOUserAPIResponse>(*resp);
12 std::cout << "SSO user updated successfully\n";
13});
14

ื™ืฆื™ืจืช ืžื ื•ื™ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createAPIUserSubscriptionData CreateAPIUserSubscriptionData ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateSubscriptionAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createSubscription
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3auto payload = std::make_shared<CreateAPIUserSubscriptionData>();
4payload->userEmail = U("user@example.com");
5payload->planId = U("pro-monthly");
6payload->couponCode = boost::optional<utility::string_t>(U("WELCOME10"));
7payload->trialDays = boost::optional<int>(14);
8payload->autoRenew = boost::optional<bool>(true);
9api->createSubscription(tenantId, *payload).then([](std::shared_ptr<CreateSubscriptionAPIResponse> resp) {
10 if (resp) std::cout << "Subscription created successfully" << std::endl;
11 else std::cout << "Failed to create subscription" << std::endl;
12});
13

ืžื—ื™ืงืช ืžื ื•ื™ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
userId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteSubscriptionAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteSubscription
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("subscription-987");
4boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("user@example.com"));
5auto defaultResp = std::make_shared<DeleteSubscriptionAPIResponse>();
6api->deleteSubscription(tenantId, id, userId)
7.then([defaultResp](pplx::task<std::shared_ptr<DeleteSubscriptionAPIResponse>> t){
8 try {
9 auto resp = t.get();
10 if (!resp) resp = defaultResp;
11 std::cout << "Delete completed\n";
12 } catch (const std::exception &e) {
13 std::cerr << "Delete failed: " << e.what() << '\n';
14 }
15});
16

ืงื‘ืœืช ืžื ื•ื™ื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetSubscriptionsAPIResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getSubscriptions
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3boost::optional<utility::string_t> userId = utility::conversions::to_string_t("user@example.com");
4api->getSubscriptions(tenantId, userId)
5.then([](std::shared_ptr<GetSubscriptionsAPIResponse> resp){
6 if(!resp) return;
7 auto copy = std::make_shared<GetSubscriptionsAPIResponse>(*resp);
8})
9.wait();
10

ืงื‘ืœืช ืฉื™ืžื•ืฉ ื™ื•ืžื™ ืฉืœ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
yearNumber double ืœื
monthNumber double ืœื
dayNumber double ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantDailyUsages_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenantDailyUsages
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> year = 2025;
4boost::optional<double> month = 1;
5auto placeholder = std::make_shared<GetTenantDailyUsages_200_response>();
6api->getTenantDailyUsages(tenantId, year, month, boost::optional<double>(), boost::optional<double>())
7.then([](pplx::task<std::shared_ptr<GetTenantDailyUsages_200_response>> t){
8 try {
9 auto resp = t.get();
10 if (resp) std::cout << "Received tenant daily usages\n";
11 else std::cout << "No usage data\n";
12 } catch (const std::exception &e) {
13 std::cout << "Request error: " << e.what() << '\n';
14 }
15});
16

ื™ืฆื™ืจืช ื—ื‘ื™ืœืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createTenantPackageBody CreateTenantPackageBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateTenantPackage_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช createTenantPackage
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3auto body = std::make_shared<CreateTenantPackageBody>();
4body->name = U("Standard Package - 1k comments");
5body->createdByEmail = U("admin@mycompany.com");
6body->monthlyLimit = boost::optional<int>(1000);
7body->notes = boost::optional<utility::string_t>(U("Onboarding promo"));
8api->createTenantPackage(tenantId, *body)
9.then([](pplx::task<std::shared_ptr<CreateTenantPackage_200_response>> t) {
10 try {
11 auto resp = t.get();
12 if (resp) {
13 std::cout << "Package created: " << utility::conversions::to_utf8string(resp->packageId) << std::endl;
14 }
15 } catch (const std::exception& e) {
16 std::cerr << "Create failed: " << e.what() << std::endl;
17 }
18});
19

ืžื—ื™ืงืช ื—ื‘ื™ืœืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteTenantPackage
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t pkgId = U("package-456");
4boost::optional<utility::string_t> ifMatch = boost::optional<utility::string_t>(U("\"etag-789\""));
5auto fallback = std::make_shared<FlagCommentPublic_200_response>();
6auto task = api->deleteTenantPackage(tenantId, pkgId).then([fallback](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
7 try {
8 auto resp = t.get();
9 if (resp) return resp;
10 return fallback;
11 } catch (const std::exception&) {
12 return fallback;
13 }
14});
15task.wait();
16

ืงื‘ืœืช ื—ื‘ื™ืœืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantPackage_200_response

ื“ื•ื’ืžื”

getTenantPackage ื“ื•ื’ืžื”
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t packageId = U("pkg-456");
4boost::optional<utility::string_t> requestTrace = U("trace-20260112-01");
5api->getTenantPackage(tenantId, packageId)
6.then([requestTrace](std::shared_ptr<GetTenantPackage_200_response> resp){
7 auto result = resp ? resp : std::make_shared<GetTenantPackage_200_response>();
8 if (requestTrace) { auto trace = *requestTrace; (void)trace; }
9 return result;
10})
11.then([](std::shared_ptr<GetTenantPackage_200_response> finalResp){
12 (void)finalResp;
13});
14

ืงื‘ืœืช ื—ื‘ื™ืœื•ืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantPackages_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenantPackages
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> skip = 10.0;
4auto task = api->getTenantPackages(tenantId, skip).then([](pplx::task<std::shared_ptr<GetTenantPackages_200_response>> t){
5 try {
6 auto resp = t.get();
7 if (resp) {
8 (void)resp;
9 }
10 } catch (const std::exception&) {
11 auto fallback = std::make_shared<GetTenantPackages_200_response>();
12 (void)fallback;
13 }
14});
15

ื”ื—ืœืคืช ื—ื‘ื™ืœืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
replaceTenantPackageBody ReplaceTenantPackageBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœreplaceTenantPackage
Copy Copy
1
2utility::string_t tenantId = utility::string_t("my-tenant-123");
3utility::string_t packageId = utility::string_t("pkg-456");
4ReplaceTenantPackageBody body;
5body.name = utility::string_t("Premium Plan");
6body.planId = utility::string_t("premium_monthly");
7body.seats = 25;
8body.billingEmail = utility::string_t("billing@acme.com");
9boost::optional<utility::string_t> notes = boost::optional<utility::string_t>(utility::string_t("Migrated subscription"));
10body.notes = notes;
11api->replaceTenantPackage(tenantId, packageId, body).then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> task){
12 try{
13 auto resp = task.get();
14 if(resp){
15 auto resultCopy = std::make_shared<FlagCommentPublic_200_response>(*resp);
16 }
17 } catch(const std::exception&){
18 }
19});
20

ืขื“ื›ื•ืŸ ื—ื‘ื™ืœืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateTenantPackageBody UpdateTenantPackageBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateTenantPackage
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t packageId = U("pkg-456");
4auto bodyPtr = std::make_shared<UpdateTenantPackageBody>();
5bodyPtr->name = utility::string_t(U("Pro Monthly"));
6bodyPtr->description = boost::optional<utility::string_t>(U("Monthly subscription for pro users"));
7bodyPtr->enabled = boost::optional<bool>(true);
8api->updateTenantPackage(tenantId, packageId, *bodyPtr)
9.then([](std::shared_ptr<FlagCommentPublic_200_response> resp){
10 std::cout << (resp ? "updateTenantPackage succeeded\n" : "updateTenantPackage returned null\n");
11});
12

ื™ืฆื™ืจืช ืžืฉืชืžืฉ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createTenantUserBody CreateTenantUserBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateTenantUser_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createTenantUser
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3CreateTenantUserBody createTenantUserBody;
4createTenantUserBody.email = utility::conversions::to_string_t("new.user@company.com");
5createTenantUserBody.password = utility::conversions::to_string_t("Secur3P@ssw0rd!");
6createTenantUserBody.displayName = boost::optional<utility::string_t>(utility::conversions::to_string_t("New User"));
7createTenantUserBody.roles = std::vector<utility::string_t>{utility::conversions::to_string_t("member")};
8
9api->createTenantUser(tenantId, createTenantUserBody)
10 .then([](pplx::task<std::shared_ptr<CreateTenantUser_200_response>> task){
11 try {
12 auto resp = task.get();
13 auto created = std::make_shared<CreateTenantUser_200_response>(*resp);
14 } catch (const std::exception&) {
15 }
16 });
17

ืžื—ื™ืงืช ืžืฉืชืžืฉ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
deleteComments string ืœื
commentDeleteMode string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteTenantUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t userId = U("user@example.com");
4boost::optional<utility::string_t> deleteComments = boost::optional<utility::string_t>(U("true"));
5boost::optional<utility::string_t> commentDeleteMode = boost::optional<utility::string_t>(U("soft"));
6auto fallback = std::make_shared<FlagCommentPublic_200_response>();
7api->deleteTenantUser(tenantId, userId, deleteComments, commentDeleteMode)
8.then([fallback](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
9 try {
10 auto resp = t.get();
11 if (!resp) resp = fallback;
12 std::cout << "deleteTenantUser completed\n";
13 } catch (const std::exception &e) {
14 std::cout << "deleteTenantUser failed: " << e.what() << "\n";
15 }
16}).wait();
17

ืงื‘ืœืช ืžืฉืชืžืฉ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantUser_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getTenantUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t userId = U("alice@example.com");
4boost::optional<utility::string_t> includeMetadata = boost::optional<utility::string_t>(U("true"));
5api->getTenantUser(tenantId, userId).then([includeMetadata](pplx::task<std::shared_ptr<GetTenantUser_200_response>> t)
6{
7 try {
8 auto resp = t.get();
9 auto result = resp ? resp : std::make_shared<GetTenantUser_200_response>();
10 if (includeMetadata && result) { (void)includeMetadata; }
11 (void)result;
12 } catch (const std::exception& e) {
13 auto fallback = std::make_shared<GetTenantUser_200_response>();
14 (void)fallback;
15 }
16});
17

ืงื‘ืœืช ืžืฉืชืžืฉื™ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
skip double ืœื

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenantUsers_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getTenantUsers
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<double> skip = boost::optional<double>(20);
4api->getTenantUsers(tenantId, skip)
5 .then([=](pplx::task<std::shared_ptr<GetTenantUsers_200_response>> t) {
6 try {
7 std::shared_ptr<GetTenantUsers_200_response> resp = t.get();
8 if (!resp) resp = std::make_shared<GetTenantUsers_200_response>();
9 (void)resp;
10 } catch (const std::exception& ex) {
11 (void)ex;
12 std::shared_ptr<GetTenantUsers_200_response> err = std::make_shared<GetTenantUsers_200_response>();
13 }
14 });
15

ื”ื—ืœืคืช ืžืฉืชืžืฉ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
replaceTenantUserBody ReplaceTenantUserBody ื›ืŸ
updateComments string ืœื

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-replaceTenantUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("user@example.com");
4ReplaceTenantUserBody replaceBody;
5boost::optional<utility::string_t> updateComments = boost::optional<utility::string_t>(U("true"));
6api->replaceTenantUser(tenantId, id, replaceBody, updateComments)
7.then([](std::shared_ptr<FlagCommentPublic_200_response> resp){
8 if (resp) {
9 auto copy = std::make_shared<FlagCommentPublic_200_response>(*resp);
10 }
11});
12

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
redirectURL string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-sendLoginLink
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t userId = U("user@example.com");
4boost::optional<utility::string_t> redirectURL = utility::string_t(U("https://app.example.com/welcome"));
5api->sendLoginLink(tenantId, userId, redirectURL)
6 .then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t)
7 {
8 try
9 {
10 auto resp = t.get();
11 if (resp) return resp;
12 return std::make_shared<FlagCommentPublic_200_response>();
13 }
14 catch (...)
15 {
16 return std::make_shared<FlagCommentPublic_200_response>();
17 }
18 });
19

ืขื“ื›ื•ืŸ ืžืฉืชืžืฉ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
updateTenantUserBody UpdateTenantUserBody ื›ืŸ
updateComments string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateTenantUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t userId = U("jane.doe@example.com");
4auto bodyPtr = std::make_shared<UpdateTenantUserBody>();
5bodyPtr->setEmail(U("jane.doe@example.com"));
6bodyPtr->setDisplayName(U("Jane Doe"));
7boost::optional<utility::string_t> updateComments = U("Normalized display name");
8
9api->updateTenantUser(tenantId, userId, *bodyPtr, updateComments)
10.then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t){
11 try {
12 auto resp = t.get();
13 if (resp) std::cout << "Tenant user updated successfully\n";
14 else std::cout << "Update returned no data\n";
15 } catch (const std::exception& ex) {
16 std::cerr << "Update failed: " << ex.what() << '\n';
17 }
18});
19

ื™ืฆื™ืจืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
createTenantBody CreateTenantBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateTenant_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createTenant
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3CreateTenantBody createTenantBody;
4createTenantBody.displayName = U("My Tenant Inc");
5createTenantBody.adminEmail = U("admin@mytenant.com");
6createTenantBody.plan = boost::optional<utility::string_t>(U("pro"));
7auto task = api->createTenant(tenantId, createTenantBody)
8 .then([](std::shared_ptr<CreateTenant_200_response> resp){
9 if (resp){
10 auto createdId = std::make_shared<utility::string_t>(resp->tenantId);
11 }
12 });
13task.wait();
14

ืžื—ื™ืงืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
sure string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteTenant
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("flag-456");
4boost::optional<utility::string_t> sure = utility::string_t(U("true"));
5api->deleteTenant(tenantId, id, sure)
6 .then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> t) {
7 try {
8 auto resp = t.get();
9 auto safeResp = resp ? resp : std::make_shared<FlagCommentPublic_200_response>();
10 (void)safeResp;
11 } catch (...) {}
12 });
13

ืงื‘ืœืช ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenant_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenant
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("admin@fastcomments.com");
4boost::optional<utility::string_t> asOf = boost::optional<utility::string_t>(U("2026-01-01T00:00:00Z"));
5api->getTenant(tenantId, id).then([asOf](pplx::task<std::shared_ptr<GetTenant_200_response>> t) {
6 try {
7 auto resp = t.get();
8 if (!resp) return;
9 auto processed = std::make_shared<GetTenant_200_response>(*resp);
10 } catch (const std::exception&) {
11 }
12});
13

ืงื‘ืœืช ื˜ื ื ื˜ื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
meta string ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetTenants_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getTenants
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> meta = boost::optional<utility::string_t>(U("admin@example.com"));
4boost::optional<double> skip = boost::optional<double>(10.0);
5auto task = api->getTenants(tenantId, meta, skip)
6 .then([](std::shared_ptr<GetTenants_200_response> resp){
7 if (resp) {
8 auto copy = std::make_shared<GetTenants_200_response>(*resp);
9 }
10 });
11

ืขื“ื›ื•ืŸ ื˜ื ื ื˜ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateTenantBody UpdateTenantBody ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: FlagCommentPublic_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateTenant
Copy Copy
1
2auto tenantId = utility::string_t(U("my-tenant-123"));
3auto id = utility::string_t(U("tenant-0001"));
4auto bodyPtr = std::make_shared<UpdateTenantBody>();
5bodyPtr->setDisplayName(utility::string_t(U("Acme Corporation")));
6bodyPtr->setAdminEmail(utility::string_t(U("admin@acme.com")));
7bodyPtr->setIsActive(true);
8bodyPtr->setMaxUsers(boost::optional<int>(250));
9api->updateTenant(tenantId, id, *bodyPtr)
10.then([](pplx::task<std::shared_ptr<FlagCommentPublic_200_response>> task){
11 try {
12 auto resp = task.get();
13 if (resp) {
14 auto msg = resp->getMessage();
15 std::wcout << msg << std::endl;
16 }
17 } catch (const std::exception& e) {
18 std::cerr << e.what() << std::endl;
19 }
20});
21

ื”ืขืœืืช ืชืžื•ื ื” Internal Link

ื”ืขืœืื” ื•ืฉื™ื ื•ื™ ื’ื•ื“ืœ ืฉืœ ืชืžื•ื ื”

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
file HttpContent ื›ืŸ
sizePreset SizePreset ืœื
urlId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UploadImageResponse

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-uploadImage
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3auto fileBytes = std::vector<unsigned char>{0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A};
4auto file = std::make_shared<HttpContent>(fileBytes, U("image/png"), U("avatar.png"));
5boost::optional<SizePreset> sizePreset = boost::optional<SizePreset>(SizePreset::MEDIUM);
6boost::optional<utility::string_t> urlId = boost::optional<utility::string_t>(U("user-avatar-987"));
7api->uploadImage(tenantId, file, sizePreset, urlId)
8 .then([](pplx::task<std::shared_ptr<UploadImageResponse>> task) {
9 try {
10 return task.get();
11 } catch (...) {
12 return std::shared_ptr<UploadImageResponse>();
13 }
14 });
15

ืงื‘ืœืช ื”ืชืงื“ืžื•ืช ืชื’ ืžืฉืชืžืฉ ืœืคื™ ืžื–ื”ื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชืฉื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadgeProgressById_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getUserBadgeProgressById
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("badge-abc-456");
4boost::optional<utility::string_t> preferredLocale = boost::optional<utility::string_t>(U("en-US"));
5
6api->getUserBadgeProgressById(tenantId, id)
7.then([=](std::shared_ptr<GetUserBadgeProgressById_200_response> resp){
8 if(!resp) return;
9 auto copy = std::make_shared<GetUserBadgeProgressById_200_response>(*resp);
10 (void)copy;
11});
12

ืงื‘ืœืช ื”ืชืงื“ืžื•ืช ืชื’ ืžืฉืชืžืฉ ืœืคื™ ืžื–ื”ื” ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื“ืจื•ืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadgeProgressById_200_response

ื“ื•ื’ืžื”

getUserBadgeProgressByUserId ื“ื•ื’ืžื”
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> optUserId = utility::string_t(U("user@example.com"));
4api->getUserBadgeProgressByUserId(tenantId, optUserId.value()).then(
5 [](pplx::task<std::shared_ptr<GetUserBadgeProgressById_200_response>> t){
6 try {
7 auto resp = t.get();
8 auto copy = std::make_shared<GetUserBadgeProgressById_200_response>(*resp);
9 } catch (const std::exception&) {
10 }
11 }
12);
13

ืงื‘ืœืช ืจืฉื™ืžืช ื”ืชืงื“ืžื•ืช ืชื’ื™ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื
limit double ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadgeProgressList_200_response

ื“ื•ื’ืžื”

getUserBadgeProgressList ื“ื•ื’ืžื”
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("user@example.com"));
4boost::optional<double> limit = boost::optional<double>(50);
5boost::optional<double> skip = boost::optional<double>(0);
6
7api->getUserBadgeProgressList(tenantId, userId, limit, skip)
8.then([](pplx::task<std::shared_ptr<GetUserBadgeProgressList_200_response>> t){
9 try {
10 auto resp = t.get();
11 auto copied = std::make_shared<GetUserBadgeProgressList_200_response>(*resp);
12 std::cout << "Badge progress entries received\n";
13 } catch (const std::exception &e) {
14 std::cerr << "Failed to get badge progress: " << e.what() << '\n';
15 }
16});
17

ื™ืฆื™ืจืช ืชื’ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
createUserBadgeParams CreateUserBadgeParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: CreateUserBadge_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createUserBadge
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3CreateUserBadgeParams params;
4params.userId = U("user@example.com");
5params.badgeId = U("trusted-contributor");
6params.note = boost::optional<utility::string_t>(U("Awarded for outstanding moderation"));
7api->createUserBadge(tenantId, params)
8.then([](std::shared_ptr<CreateUserBadge_200_response> resp){
9 if (resp) {
10 auto copied = std::make_shared<CreateUserBadge_200_response>(*resp);
11 }
12})
13.wait();
14

ืžื—ื™ืงืช ืชื’ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserBadge_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช deleteUserBadge
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3utility::string_t badgeId = utility::conversions::to_string_t("badge-456");
4boost::optional<utility::string_t> traceId = boost::none;
5api->deleteUserBadge(tenantId, badgeId)
6.then([traceId](pplx::task<std::shared_ptr<UpdateUserBadge_200_response>> t) {
7 try {
8 auto resp = t.get();
9 if (!resp) resp = std::make_shared<UpdateUserBadge_200_response>();
10 return resp;
11 } catch (const std::exception&) {
12 return std::shared_ptr<UpdateUserBadge_200_response>();
13 }
14});
15

ืงื‘ืœืช ืชื’ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadge_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getUserBadge
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("user@example.com");
4boost::optional<utility::string_t> traceId = U("trace-456");
5api->getUserBadge(tenantId, id).then([traceId](std::shared_ptr<GetUserBadge_200_response> resp) {
6 if (!resp) resp = std::make_shared<GetUserBadge_200_response>();
7 utility::string_t activeTrace = traceId.value_or(U(""));
8 (void)activeTrace;
9 return resp;
10});
11

ืงื‘ืœืช ืชื’ื™ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
userId string ืœื
badgeId string ืœื
type double ืœื
displayedOnComments bool ืœื
limit double ืœื
skip double ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserBadges_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืฉืœ getUserBadges
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3boost::optional<utility::string_t> userId(utility::conversions::to_string_t("user@example.com"));
4boost::optional<utility::string_t> badgeId(utility::conversions::to_string_t("badge-elite"));
5boost::optional<double> type(1.0);
6boost::optional<bool> displayedOnComments(true);
7boost::optional<double> limit(50.0);
8boost::optional<double> skip(0.0);
9auto resultHolder = std::make_shared<GetUserBadges_200_response>();
10api->getUserBadges(tenantId, userId, badgeId, type, displayedOnComments, limit, skip)
11.then([&resultHolder](std::shared_ptr<GetUserBadges_200_response> resp){
12 if (resp) resultHolder = resp;
13 return resultHolder;
14});
15

ืขื“ื›ื•ืŸ ืชื’ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
id string ื›ืŸ
updateUserBadgeParams UpdateUserBadgeParams ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserBadge_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateUserBadge
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t id = U("user@example.com");
4UpdateUserBadgeParams updateParams;
5updateParams.badgeId = U("badge-top-100");
6updateParams.label = U("Top Contributor");
7updateParams.active = boost::optional<bool>(true);
8updateParams.expiresAt = boost::optional<utility::string_t>(U("2026-12-31T23:59:59Z"));
9api->updateUserBadge(tenantId, id, updateParams)
10.then([](pplx::task<std::shared_ptr<UpdateUserBadge_200_response>> task){
11 try {
12 auto resp = task.get();
13 if (resp) {
14 auto result = std::make_shared<UpdateUserBadge_200_response>(*resp);
15 }
16 } catch (const std::exception&) {
17 }
18});
19

ืงื‘ืœืช ืžืกืคืจ ื”ืชืจืื•ืช ืœืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserNotificationCount_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getUserNotificationCount
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
4std::shared_ptr<GetUserNotificationCount_200_response> result;
5api->getUserNotificationCount(tenantId, sso)
6.then([&result](pplx::task<std::shared_ptr<GetUserNotificationCount_200_response>> t) {
7 try {
8 result = t.get();
9 if (!result) result = std::make_shared<GetUserNotificationCount_200_response>();
10 } catch (...) {
11 result = std::make_shared<GetUserNotificationCount_200_response>();
12 }
13}).wait();
14

ืงื‘ืœืช ื”ืชืจืื•ืช ืฉืœ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
pageSize int32_t ืœื
afterId string ืœื
includeContext bool ืœื
afterCreatedAt int64_t ืœื
unreadOnly bool ืœื
dmOnly bool ืœื
noDm bool ืœื
includeTranslations bool ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserNotifications_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getUserNotifications
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3boost::optional<int32_t> pageSize = 50;
4boost::optional<utility::string_t> afterId = utility::conversions::to_string_t("notif_98765");
5boost::optional<bool> includeContext = true;
6boost::optional<int64_t> afterCreatedAt = static_cast<int64_t>(1672531200);
7boost::optional<bool> unreadOnly = true;
8boost::optional<bool> dmOnly = false;
9boost::optional<bool> noDm = false;
10boost::optional<bool> includeTranslations = true;
11boost::optional<utility::string_t> sso = utility::conversions::to_string_t("user@example.com");
12
13api->getUserNotifications(tenantId, pageSize, afterId, includeContext, afterCreatedAt, unreadOnly, dmOnly, noDm, includeTranslations, sso)
14.then([](pplx::task<std::shared_ptr<GetUserNotifications_200_response>> task){
15 try {
16 auto resp = task.get();
17 auto copy = std::make_shared<GetUserNotifications_200_response>(*resp);
18 return copy;
19 } catch (...) {
20 return std::shared_ptr<GetUserNotifications_200_response>();
21 }
22});
23

ืื™ืคื•ืก ืกืคื™ืจืช ื”ืชืจืื•ืช ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: ResetUserNotifications_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-resetUserNotificationCount
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
4api->resetUserNotificationCount(tenantId, sso)
5 .then([](pplx::task<std::shared_ptr<ResetUserNotifications_200_response>> task) {
6 try {
7 auto resp = task.get();
8 if (!resp) resp = std::make_shared<ResetUserNotifications_200_response>();
9 } catch (const std::exception &e) {
10 (void)e;
11 }
12 });
13

ืื™ืคื•ืก ื”ืชืจืื•ืช ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
afterId string ืœื
afterCreatedAt int64_t ืœื
unreadOnly bool ืœื
dmOnly bool ืœื
noDm bool ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: ResetUserNotifications_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-resetUserNotifications
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3boost::optional<utility::string_t> afterId = boost::optional<utility::string_t>(U("notif-987654321"));
4boost::optional<int64_t> afterCreatedAt = boost::optional<int64_t>(1625097600000LL);
5boost::optional<bool> unreadOnly = boost::optional<bool>(true);
6boost::optional<bool> dmOnly = boost::optional<bool>(false);
7boost::optional<bool> noDm;
8boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
9
10api->resetUserNotifications(tenantId, afterId, afterCreatedAt, unreadOnly, dmOnly, noDm, sso)
11 .then([](pplx::task<std::shared_ptr<ResetUserNotifications_200_response>> t)
12 {
13 try
14 {
15 auto resp = t.get();
16 auto respCopy = std::make_shared<ResetUserNotifications_200_response>(*resp);
17 return respCopy;
18 }
19 catch (...)
20 {
21 return std::shared_ptr<ResetUserNotifications_200_response>();
22 }
23 });
24

ืขื“ื›ื•ืŸ ืกื˜ื˜ื•ืก ืžื ื•ื™ ืœื”ื•ื“ืขื•ืช ืชื’ื•ื‘ื•ืช ืฉืœ ืžืฉืชืžืฉ Internal Link

ื”ืคืขืœ ืื• ื”ืฉื‘ืช ื”ืชืจืื•ืช ืขื‘ื•ืจ ืชื’ื•ื‘ื” ืกืคืฆื™ืคื™ืช.

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
notificationId string ื›ืŸ
optedInOrOut string ื›ืŸ
commentId string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserNotificationStatus_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateUserNotificationCommentSubscriptionStatus
Copy Copy
1
2utility::string_t tenantId = utility::string_t(U("my-tenant-123"));
3utility::string_t notificationId = utility::string_t(U("notif-789"));
4utility::string_t optedInOrOut = utility::string_t(U("opted_in"));
5utility::string_t commentId = utility::string_t(U("cmt-456"));
6boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(utility::string_t(U("user@example.com")));
7api->updateUserNotificationCommentSubscriptionStatus(tenantId, notificationId, optedInOrOut, commentId, sso)
8.then([](pplx::task<std::shared_ptr<UpdateUserNotificationStatus_200_response>> t){
9 try {
10 auto resp = t.get();
11 auto result = resp ? resp : std::make_shared<UpdateUserNotificationStatus_200_response>();
12 } catch (const std::exception&) {}
13});
14

ืขื“ื›ื•ืŸ ืกื˜ื˜ื•ืก ืžื ื•ื™ ืœื”ื•ื“ืขื•ืช ื“ืคื™ื ืฉืœ ืžืฉืชืžืฉ Internal Link

ื”ืคืขืœ ืื• ื‘ื˜ืœ ื”ืชืจืื•ืช ืขื‘ื•ืจ ื“ืฃ. ื›ืืฉืจ ืžืฉืชืžืฉื™ื ืจืฉื•ืžื™ื ืœื“ืฃ, ื ื•ืฆืจื•ืช ื”ืชืจืื•ืช ืขื‘ื•ืจ ืชื’ื•ื‘ื•ืช ืฉื•ืจืฉ ื—ื“ืฉื•ืช, ื•ื›ืŸ

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
urlId string ื›ืŸ
url string ื›ืŸ
pageTitle string ื›ืŸ
subscribedOrUnsubscribed string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserNotificationStatus_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateUserNotificationPageSubscriptionStatus
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlId = U("page-456");
4utility::string_t url = U("https://www.example.com/articles/2026/new-feature");
5utility::string_t pageTitle = U("New Feature Announcement");
6utility::string_t subscribedOrUnsubscribed = U("subscribed");
7boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("user@example.com"));
8auto placeholder = std::make_shared<UpdateUserNotificationStatus_200_response>();
9api->updateUserNotificationPageSubscriptionStatus(tenantId, urlId, url, pageTitle, subscribedOrUnsubscribed, sso)
10.then([](pplx::task<std::shared_ptr<UpdateUserNotificationStatus_200_response>> task){
11 try {
12 auto resp = task.get();
13 (void)resp;
14 } catch (const std::exception &e) {
15 (void)e;
16 }
17});
18

ืขื“ื›ื•ืŸ ืกื˜ื˜ื•ืก ื”ืชืจืื•ืช ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
notificationId string ื›ืŸ
newStatus string ื›ืŸ
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: UpdateUserNotificationStatus_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-updateUserNotificationStatus
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t notificationId = U("notification-789");
4utility::string_t newStatus = U("read");
5boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(U("sso-token-abc123"));
6api->updateUserNotificationStatus(tenantId, notificationId, newStatus, sso)
7.then([](pplx::task<std::shared_ptr<UpdateUserNotificationStatus_200_response>> task){
8 try {
9 auto resp = task.get();
10 if (resp) {
11 auto result = std::make_shared<UpdateUserNotificationStatus_200_response>(*resp);
12 }
13 } catch (...) {
14 }
15});
16

ืงื‘ืœืช ืกื˜ื˜ื•ืกื™ ื ื•ื›ื—ื•ืช ืžืฉืชืžืฉื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlIdWS string ื›ืŸ
userIds string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUserPresenceStatuses_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getUserPresenceStatuses
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlIdWS = U("wss://realtime.fastcomments.com/socket/tenant-abc");
4boost::optional<utility::string_t> optUserIds = U("alice@example.com,bob@example.com");
5utility::string_t userIds = optUserIds.value_or(U("alice@example.com"));
6auto task = api->getUserPresenceStatuses(tenantId, urlIdWS, userIds)
7 .then([](std::shared_ptr<GetUserPresenceStatuses_200_response> resp) {
8 if (!resp) return;
9 auto copy = std::make_shared<GetUserPresenceStatuses_200_response>(*resp);
10 });
11task.wait();
12

ื—ื™ืคื•ืฉ ืžืฉืชืžืฉื™ื Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
usernameStartsWith string ืœื
mentionGroupIds vector<string ืœื
sso string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: SearchUsers_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-searchUsers
Copy Copy
1
2utility::string_t tenantId = utility::string_t("my-tenant-123");
3utility::string_t urlId = utility::string_t("/posts/2026/new-feature");
4boost::optional<utility::string_t> usernameStartsWith = boost::optional<utility::string_t>(utility::string_t("alex"));
5boost::optional<std::vector<utility::string_t>> mentionGroupIds{std::vector<utility::string_t>{utility::string_t("ops-team"), utility::string_t("support")}};
6boost::optional<utility::string_t> sso = boost::optional<utility::string_t>(utility::string_t("saml-idp"));
7api->searchUsers(tenantId, urlId, usernameStartsWith, mentionGroupIds, sso)
8 .then([](pplx::task<std::shared_ptr<SearchUsers_200_response>> t){
9 try {
10 auto resp = t.get();
11 if (!resp) resp = std::make_shared<SearchUsers_200_response>();
12 } catch (...) {}
13 });
14

ืงื‘ืœืช ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetUser_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžืช getUser
Copy Copy
1
2boost::optional<utility::string_t> tenant(U("my-tenant-123"));
3boost::optional<utility::string_t> userId(U("user@example.com"));
4api->getUser(tenant.value(), userId.value())
5 .then([](pplx::task<std::shared_ptr<GetUser_200_response>> task) {
6 try {
7 auto resp = task.get();
8 if (resp) {
9 auto result_copy = std::make_shared<GetUser_200_response>(*resp);
10 } else {
11 auto fallback = std::make_shared<GetUser_200_response>();
12 }
13 } catch (const std::exception &e) {
14 }
15 });
16

ื™ืฆื™ืจืช ื”ืฆื‘ืขื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
commentId string ื›ืŸ
direction string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: VoteComment_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-createVote
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t commentId = U("cmt-456789");
4utility::string_t direction = U("up");
5boost::optional<utility::string_t> userId = boost::optional<utility::string_t>(U("user@example.com"));
6api->createVote(tenantId, commentId, direction, userId, boost::none)
7.then([](pplx::task<std::shared_ptr<VoteComment_200_response>> task) {
8 try {
9 auto resp = task.get();
10 if (!resp) resp = std::make_shared<VoteComment_200_response>();
11 } catch (...) {}
12});
13

ืžื—ื™ืงืช ื”ืฆื‘ืขื” Internal Link

ืคืจืžื˜ืจื™ื

Name Type Required Description
tenantId string ื›ืŸ
id string ื›ืŸ
editKey string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: DeleteCommentVote_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-deleteVote
Copy Copy
1
2utility::string_t tenantId = utility::conversions::to_string_t("my-tenant-123");
3utility::string_t voteId = utility::conversions::to_string_t("vote-98765");
4boost::optional<utility::string_t> editKey = boost::optional<utility::string_t>(utility::conversions::to_string_t("user-edit-key-abc123"));
5
6api->deleteVote(tenantId, voteId, editKey)
7.then([](pplx::task<std::shared_ptr<DeleteCommentVote_200_response>> t){
8 try {
9 auto resp = t.get();
10 auto result = resp ? std::make_shared<DeleteCommentVote_200_response>(*resp)
11 : std::make_shared<DeleteCommentVote_200_response>();
12 (void)result;
13 } catch (const std::exception& e) {
14 (void)e;
15 }
16});
17

ืงื‘ืœืช ื”ืฆื‘ืขื•ืช Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetVotes_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getVotes
Copy Copy
1
2boost::optional<utility::string_t> tenantId = utility::string_t(U("my-tenant-123"));
3boost::optional<utility::string_t> urlId = utility::string_t(U("/posts/2025/new-features"));
4auto task = api->getVotes(tenantId.value(), urlId.value()).then([](std::shared_ptr<GetVotes_200_response> resp){
5 if (resp) {
6 auto copy = std::make_shared<GetVotes_200_response>(*resp);
7 std::cout << "Fetched votes successfully\n";
8 } else {
9 std::cout << "No votes response\n";
10 }
11});
12task.wait();
13

ืงื‘ืœืช ื”ืฆื‘ืขื•ืช ืขื‘ื•ืจ ืžืฉืชืžืฉ Internal Link

ืคืจืžื˜ืจื™ื

ืฉื ืกื•ื’ ื ื“ืจืฉ ืชื™ืื•ืจ
tenantId string ื›ืŸ
urlId string ื›ืŸ
userId string ืœื
anonUserId string ืœื

ืชื’ื•ื‘ื”

ืžื—ื–ื™ืจ: GetVotesForUser_200_response

ื“ื•ื’ืžื”

ื“ื•ื’ืžื” ืœ-getVotesForUser
Copy Copy
1
2utility::string_t tenantId = U("my-tenant-123");
3utility::string_t urlId = U("article-987");
4boost::optional<utility::string_t> userId = utility::string_t(U("user@example.com"));
5boost::optional<utility::string_t> anonUserId;
6api->getVotesForUser(tenantId, urlId, userId, anonUserId)
7.then([](pplx::task<std::shared_ptr<GetVotesForUser_200_response>> task){
8 try {
9 auto resp = task.get();
10 if (resp) {
11 auto copy = std::make_shared<GetVotesForUser_200_response>(*resp);
12 }
13 } catch (const std::exception&) {
14 }
15});
16

ืฆืจื™ื›ื™ื ืขื–ืจื”?

ืื ืชื™ืชืงืœื• ื‘ื‘ืขื™ื•ืช ืื• ื™ืฉ ืœื›ื ืฉืืœื•ืช ืœื’ื‘ื™ ื”-SDK ืฉืœ C++, ื ื:

ืชืจื•ืžื”

ืชืจื•ืžื•ืช ืžืชืงื‘ืœื•ืช ื‘ื‘ืจื›ื”! ืื ื ื‘ืงืจื• ื‘-ืžืื’ืจ GitHub ืœืงื‘ืœืช ื”ื ื—ื™ื•ืช ืœืชืจื•ืžื”.