| | |
| | | func (api ChanManageApi) SavePollPeriod(period int) (bool,interface{}){ |
| | | url := DATA_URL_PREFIX + "/pollConfig/savePollPeriod" |
| | | netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) |
| | | if netNode == nil { |
| | | return false,nil |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | paramBody := make(map[string]interface{},0) |
| | | paramBody["period"] = period |
| | |
| | | func (api ChanManageApi) SavePollDelay(delay int) (bool,interface{}){ |
| | | url := DATA_URL_PREFIX + "/pollConfig/savePollDelay" |
| | | netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) |
| | | if netNode == nil { |
| | | return false,nil |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | paramBody := make(map[string]interface{},0) |
| | | paramBody["delay"] = delay |
| | |
| | | func (api ChanManageApi) GetPollConfig() (flag bool,config protomsg.PollConfig) { |
| | | url := DATA_URL_PREFIX + "/pollConfig/getPollConfig" |
| | | netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) |
| | | if netNode == nil { |
| | | return false,config |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | |
| | | body, err := client.DoGetRequest(url, nil, nil) |
| | |
| | | func (api ChanManageApi) UpdatePollEnable(enable bool) bool{ |
| | | url := DATA_URL_PREFIX + "/pollConfig/updateEnable" |
| | | netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) |
| | | if netNode == nil { |
| | | return false |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | paramBody :=make(map[string]interface{},0) |
| | | paramBody["enable"] = enable |
| | |
| | | func (api ChanManageApi) UpdateChannelCount(pollChannelCount int, videoChannelCount int) bool{ |
| | | url := DATA_URL_PREFIX + "/pollConfig/updateChannelCount" |
| | | netNode := getNetNode(url2Topic(Topic_Chanmanage_Service, url)) |
| | | if netNode == nil { |
| | | return false |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | paramBody :=make(map[string]interface{},0) |
| | | paramBody["pollChannelCount"] = pollChannelCount |