Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cuser/publisher

rubeniskov82ISC0.0.36TypeScript support: included

backend publisher logic

readme

cuser logo

@cuser/publisher

Status

codecov npm npm-downloads

Class: CuserPublisher

Hierarchy

  • CuserPublisher

Index

Constructors

Methods

Constructors

constructor

+ new CuserPublisher(core: CuserCore, auth: CuserAuth, opts: CuserPublisherOptions & CuserStoreSerializeReducerOptions & CuserSerializeOptions & CuserDeserializeOptions): CuserPublisher

Defined in publisher/publisher.js:33

Parameters:

Name Type
core CuserCore
auth CuserAuth
opts CuserPublisherOptions & CuserStoreSerializeReducerOptions & CuserSerializeOptions & CuserDeserializeOptions

Returns: CuserPublisher

Methods

deleteMessage

deleteMessage(topicId: string, accessToken: string, messageId: string): Promise<PublishResult>

Defined in publisher/publisher.js:100

Delete message and gets the computed cid

Parameters:

Name Type Description
topicId string |
accessToken string |
messageId string |

Returns: Promise<PublishResult>


publishMessage

publishMessage(topicId: string, accessToken: string, data: string): Promise<PublishResult>

Defined in publisher/publisher.js:71

Publish message and gets the computed cid

Parameters:

Name Type Description
topicId string |
accessToken string |
data string |

Returns: Promise<PublishResult>


updateMessage

updateMessage(topicId: string, accessToken: string, messageId: string, data: string): Promise<PublishResult>

Defined in publisher/publisher.js:86

Update message and gets computed cid

Parameters:

Name Type Description
topicId string |
accessToken string |
messageId string |
data string |

Returns: Promise<PublishResult>