logos-messaging-nim/library/messaging_api/subscriptions_api.nim

14 lines
441 B
Nim
Raw Normal View History

proc subscribe*(
self: LogosDelivery, contentTopic: string
): Future[Result[string, string]] {.ffi.} =
(await self.messagingClient.subscribe(ContentTopic(contentTopic))).isOkOr:
return err(error)
return ok("")
proc unsubscribe*(
self: LogosDelivery, contentTopic: string
): Future[Result[string, string]] {.ffi.} =
self.messagingClient.unsubscribe(ContentTopic(contentTopic)).isOkOr:
return err(error)
return ok("")