@cuser/publisher
Status
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>