12 lines
282 B
Go
12 lines
282 B
Go
package sub2api
|
|
|
|
import "context"
|
|
|
|
func (c *Client) CreateChannel(ctx context.Context, req CreateChannelRequest) (ChannelRef, error) {
|
|
var ref ChannelRef
|
|
if err := c.postJSON(ctx, "/api/v1/admin/channels", req, &ref); err != nil {
|
|
return ChannelRef{}, err
|
|
}
|
|
return ref, nil
|
|
}
|