README
¶
Usage example • CI Status • Contributing • License
telemost
is client for Yandex.Telemost API.
Usage example
package main
import (
"fmt"
"github.com/essentialkaos/telemost"
)
func main() {
api, err := crowd.NewClient("myToken1234")
if err != nil {
fmt.Println(err)
return
}
// Create new conference
cnf, err := api.Create(&telemost.Conference{})
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("Conference %s created, join — %s\n", cnf.ID, cnf.JoinURL)
}
CI Status
Branch | Status |
---|---|
master |
|
develop |
Contributing
Before contributing to this project please read our Contributing Guidelines.
License
Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) AddCohosts(id string, cohosts []string) error
- func (c *Client) Create(conf *Conference) (*ConferenceInfo, error)
- func (c *Client) Delete(id string) error
- func (c *Client) DeleteCohosts(id string, cohosts []string) error
- func (c *Client) Get(id string) (*ConferenceInfo, error)
- func (c *Client) GetCohosts(id string) (Hosts, error)
- func (c *Client) SetUserAgent(app, version string)
- func (c *Client) Update(id string, conf *Conference) (*ConferenceInfo, error)
- func (c *Client) UpdateCohosts(id string, cohosts []string) error
- type Conference
- type ConferenceInfo
- type Host
- type Hosts
- type LiveStream
Constants ¶
const ( ROOM_LEVEL_PUBLIC = "PUBLIC" ROOM_LEVEL_ORG = "ORGANIZATION" ROOM_LEVEL_ADMINS = "ADMINS" ROOM_LEVEL_UNKNOWN = "UNKNOWN" )
const ( ACCESS_LEVEL_PUBLIC = "PUBLIC" ACCESS_LEVEL_ORG = "ORGANIZATION" ACCESS_LEVEL_UNKNOWN = "UNKNOWN" )
Variables ¶
var ( ErrEmptyToken = fmt.Errorf("Token is empty") ErrEmptyID = fmt.Errorf("Conference ID is empty") ErrEmptyCohosts = fmt.Errorf("Cohosts slice is empty") ErrNilClient = fmt.Errorf("Client is nil") ErrNilConference = fmt.Errorf("Conference is nil") )
var API = "https://cloud-api.yandex.net/v1/telemost-api/conferences"
API is URL of Yandex.Telemost API
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is Yandex.Telemost API client
func (*Client) AddCohosts ¶
AddCohosts appends given hosts to conference cohosts
func (*Client) Create ¶
func (c *Client) Create(conf *Conference) (*ConferenceInfo, error)
Create creates new conference or broadcast
func (*Client) DeleteCohosts ¶
DeleteCohosts removes given hosts from chosts of conference
func (*Client) Get ¶
func (c *Client) Get(id string) (*ConferenceInfo, error)
Get fetches info about conference or broadcast
func (*Client) GetCohosts ¶
GetCohosts fetches slice with all cohosts
func (*Client) SetUserAgent ¶
SetUserAgent sets client user agent
func (*Client) Update ¶
func (c *Client) Update(id string, conf *Conference) (*ConferenceInfo, error)
Update updates conference or broadcast
func (*Client) UpdateCohosts ¶
UpdateCohosts updates conference cohosts
type Conference ¶
type Conference struct { WaitingRoomLevel string `json:"waiting_room_level,omitempty"` LiveStream *LiveStream `json:"live_stream,omitempty"` CoHosts Hosts `json:"cohosts,omitempty"` }
Conference contains basic info about conference
type ConferenceInfo ¶
type ConferenceInfo struct { Conference ID string `json:"id"` JoinURL string `json:"join_url"` SIPURIMeeting string `json:"sip_uri_meeting"` SIPURITelemost string `json:"sip_uri_telemost"` SIPID string `json:"sip_id"` }
ConferenceInfo contains information about an existing conference