mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -18,20 +18,26 @@ type StreamService struct {
|
||||
|
||||
// List all the active channels
|
||||
func (t *StreamService) ListChannels(request *ListChannelsRequest) (*ListChannelsResponse, error) {
|
||||
|
||||
rsp := &ListChannelsResponse{}
|
||||
return rsp, t.client.Call("stream", "ListChannels", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
// List messages for a given channel
|
||||
func (t *StreamService) ListMessages(request *ListMessagesRequest) (*ListMessagesResponse, error) {
|
||||
|
||||
rsp := &ListMessagesResponse{}
|
||||
return rsp, t.client.Call("stream", "ListMessages", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
// SendMessage a message to the stream.
|
||||
// Send a message to the stream.
|
||||
func (t *StreamService) SendMessage(request *SendMessageRequest) (*SendMessageResponse, error) {
|
||||
|
||||
rsp := &SendMessageResponse{}
|
||||
return rsp, t.client.Call("stream", "SendMessage", request, rsp)
|
||||
|
||||
}
|
||||
|
||||
type Channel struct {
|
||||
|
||||
Reference in New Issue
Block a user