Appwrite C++ SDK
Auto-generated API documentation for the Appwrite C++ SDK
|
Provides APIs to manage messaging: messages, topics, subscribers. More...
#include <Messaging.hpp>
Public Member Functions | |
std::string | createMessage (const std::string &messageId, const std::string &subject, const std::string &content, const std::vector< std::string > &topics={}, const std::vector< std::string > &targets={}) |
Create a new email message. | |
std::string | createPush (const std::string &messageId, const std::string &title, const std::string &body, const std::vector< std::string > &topicId={}, const std::vector< std::string > &userId={}, bool draft=false) |
Creates a new push notification message. | |
std::string | createSubscribers (const std::string &topicId, const std::string &name, const std::string &targetId, const std::string &subscriberId) |
Add a subscriber to a topic. | |
std::string | createTopic (const std::string &topicId, const std::string &name, const std::vector< std::string > &subscribe) |
Create a new topic. | |
std::string | deleteMessages (const std::string &messageId) |
Delete a message by its ID. | |
std::string | deleteSubscribers (const std::string &topicId, const std::string &subscriberId) |
Delete a subscriber from a topic. | |
std::string | deleteTopic (const std::string &topicId) |
Delete a topic by its ID. | |
std::string | getMessages (const std::string &messageId) |
Get a specific message by ID. | |
std::string | getSubscriber (const std::string &topicId, const std::string &subscriberId) |
Get details of a subscriber to a topic. | |
std::string | getTopic (const std::string &topicId) |
Get details of a topic by ID. | |
std::string | listMessageLogs (const std::string &messageId, Queries &queries) |
List all message logs with optional filters. | |
std::string | listMessages (Queries &queries) |
List all messages with optional filters. | |
std::string | listSubscribers (const std::string &topicId, Queries &queries) |
List all subscribers of a topic. | |
std::string | listTargets (const std::string &messageId, const std::vector< std::string > &queries={}) |
List all targets for a given message. | |
std::string | listTopics (Queries &queries) |
List all topics with optional filters. | |
Messaging (const std::string &projectId, const std::string &apiKey) | |
Constructor for Messaging service. | |
std::string | updatePush (const std::string &messageId, const std::string &title, const std::string &body, const std::vector< std::string > &topicId={}, const std::vector< std::string > &userId={}) |
Updates an existing push notification message. | |
std::string | updateTopic (const std::string &topicId, const std::string &name, const std::vector< std::string > &subscribe={}) |
Update an existing topic. | |
Provides APIs to manage messaging: messages, topics, subscribers.
Definition at line 17 of file Messaging.hpp.
Messaging::Messaging | ( | const std::string & | projectId, |
const std::string & | apiKey | ||
) |
std::string Messaging::createMessage | ( | const std::string & | messageId, |
const std::string & | subject, | ||
const std::string & | content, | ||
const std::vector< std::string > & | topics = {} , |
||
const std::vector< std::string > & | targets = {} |
||
) |
Create a new email message.
Sends a new email message to specific topics and/or target recipients. At least one of topics
or targets
must be provided.
messageId | Unique ID for the message. |
subject | Subject line of the email. |
content | Body content of the email. |
topics | List of topic IDs to send the message to (optional). |
targets | List of target recipients (e.g., email:userId) (optional). |
std::string Messaging::createPush | ( | const std::string & | messageId, |
const std::string & | title, | ||
const std::string & | body, | ||
const std::vector< std::string > & | topicId = {} , |
||
const std::vector< std::string > & | userId = {} , |
||
bool | draft = false |
||
) |
Creates a new push notification message.
Sends a push notification to specified users, topics, or both.
messageId | A unique Id for the message. |
title | Title of the push notification. |
body | Body content of the push notification. |
topicId | A list of topic IDs to which the notification should be sent. |
userId | A list of user IDs to which the notification should be sent. |
draft | If true, saves the message as a draft. |
std::string Messaging::createSubscribers | ( | const std::string & | topicId, |
const std::string & | name, | ||
const std::string & | targetId, | ||
const std::string & | subscriberId | ||
) |
Add a subscriber to a topic.
topicId | ID of the topic |
name | Name of the subscriber |
targetId | Target platform/device |
subscriberId | Unique ID for the subscriber |
std::string Messaging::createTopic | ( | const std::string & | topicId, |
const std::string & | name, | ||
const std::vector< std::string > & | subscribe | ||
) |
Create a new topic.
topicId | Unique topic ID |
name | Name of the topic |
subscribe | List of subscriber IDs |
std::string Messaging::deleteMessages | ( | const std::string & | messageId | ) |
Delete a message by its ID.
messageId | ID of the message. |
std::string Messaging::deleteSubscribers | ( | const std::string & | topicId, |
const std::string & | subscriberId | ||
) |
Delete a subscriber from a topic.
topicId | ID of the topic |
subscriberId | ID of the subscriber to remove |
std::string Messaging::deleteTopic | ( | const std::string & | topicId | ) |
Delete a topic by its ID.
topicId | ID of the topic |
std::string Messaging::getMessages | ( | const std::string & | messageId | ) |
Get a specific message by ID.
messageId | ID of the message |
std::string Messaging::getSubscriber | ( | const std::string & | topicId, |
const std::string & | subscriberId | ||
) |
Get details of a subscriber to a topic.
topicId | ID of the topic |
subscriberId | ID of the subscriber |
std::string Messaging::getTopic | ( | const std::string & | topicId | ) |
Get details of a topic by ID.
topicId | ID of the topic |
std::string Messaging::listMessageLogs | ( | const std::string & | messageId, |
Queries & | queries | ||
) |
List all message logs with optional filters.
messageId | ID of the message |
queries | Query parameters for filtering |
std::string Messaging::listMessages | ( | Queries & | queries | ) |
List all messages with optional filters.
queries | Query parameters for filtering results |
std::string Messaging::listSubscribers | ( | const std::string & | topicId, |
Queries & | queries | ||
) |
List all subscribers of a topic.
topicId | ID of the topic |
queries | Optional query filters |
std::string Messaging::listTargets | ( | const std::string & | messageId, |
const std::vector< std::string > & | queries = {} |
||
) |
List all targets for a given message.
messageId | ID of the message. |
queries | Optional query filters. |
std::string Messaging::listTopics | ( | Queries & | queries | ) |
List all topics with optional filters.
queries | Query parameters for filtering |
std::string Messaging::updatePush | ( | const std::string & | messageId, |
const std::string & | title, | ||
const std::string & | body, | ||
const std::vector< std::string > & | topicId = {} , |
||
const std::vector< std::string > & | userId = {} |
||
) |
Updates an existing push notification message.
Modifies the title and body of an existing push message.
messageId | The ID of the message to update. |
title | New title of the push notification. |
body | New body content of the push notification. |
topicId | List of topic IDs to update the message. |
userId | List of user IDs to update the message. |
std::string Messaging::updateTopic | ( | const std::string & | topicId, |
const std::string & | name, | ||
const std::vector< std::string > & | subscribe = {} |
||
) |
Update an existing topic.
topicId | ID of the topic to update |
name | New name for the topic |
subscribe | Updated list of subscribers (optional) |