Skip to content

Commit 70ca4e6

Browse files
authored
add listChannels interface
1 parent 3cde53e commit 70ca4e6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/qiniu/qvs/DeviceManager.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ public Response listDevice(String namespaceId, int offset, int line, String pref
7979
requestUrl = UrlUtils.composeUrlWithQueries(requestUrl, map);
8080
return QvsResponse.get(requestUrl, client, auth);
8181
}
82+
83+
/*
84+
* 获取通道列表
85+
*/
86+
public Response listChannels(String namespaceId, String gbId, String prefix) throws QiniuException {
87+
String requestUrl = String.format("%s/v1/namespaces/%s/devices/%s/channels", apiServer, namespaceId, gbId);
88+
StringMap map = new StringMap().put("prefix", prefix);
89+
requestUrl = UrlUtils.composeUrlWithQueries(requestUrl, map);
90+
return QvsResponse.get(requestUrl, client, auth);
91+
}
8292

8393
/*
8494
* 启动设备拉流

0 commit comments

Comments
 (0)