Send a Freeform Notification
Last updated on
Use the following function to send a freeform notification:
- Go
- Python
- C#
- Java
err := notificationService.FreeFormNotification(input)
if err != nil {
return err
}
return nil
from accelbyte_py_sdk.api.lobby import free_form_notification
from accelbyte_py_sdk.api.lobby.models import ModelFreeFormNotificationRequest
result, error = free_form_notification(
body=ModelFreeFormNotificationRequest.create(
message="<message>",
topic="<topic>",
)
)
if error:
print(error)
Notification wLobbyNotification = new Notification(sdk);
ModelFreeFormNotificationRequest notifBody = new ModelFreeFormNotificationRequest()
{
Topic = "csharpsdk_test",
Message = "This is integration test for CSharp Server SDK."
};
wLobbyNotification.FreeFormNotification(FreeFormNotification.Builder
.Build(notifBody, sdk.Namespace));
ModelFreeFormNotificationRequest notifBody = ModelFreeFormNotificationRequest.builder()
.topic(topic)
.message(message)
.build();
wLobbyNotification.freeFormNotification(FreeFormNotification.builder()
.namespace(namespace)
.body(notifBody)
.build());