summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/client')
-rw-r--r--webapp/client/client.jsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index a7d7a5c8a..38cc2f111 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -1362,6 +1362,7 @@ export default class Client {
this.track('api', 'api_channel_get');
}
+ // SCHEDULED FOR DEPRECATION IN 3.7 - use getMoreChannelsPage instead
getMoreChannels(success, error) {
request.
get(`${this.getChannelsRoute()}/more`).
@@ -1371,6 +1372,34 @@ export default class Client {
end(this.handleResponse.bind(this, 'getMoreChannels', success, error));
}
+ getMoreChannelsPage(offset, limit, success, error) {
+ request.
+ get(`${this.getChannelsRoute()}/more/${offset}/${limit}`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ end(this.handleResponse.bind(this, 'getMoreChannelsPage', success, error));
+ }
+
+ searchMoreChannels(term, success, error) {
+ request.
+ post(`${this.getChannelsRoute()}/more/search`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ send({term}).
+ end(this.handleResponse.bind(this, 'searchMoreChannels', success, error));
+ }
+
+ autocompleteChannels(term, success, error) {
+ request.
+ get(`${this.getChannelsRoute()}/autocomplete?term=${encodeURIComponent(term)}`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ end(this.handleResponse.bind(this, 'autocompleteChannels', success, error));
+ }
+
getChannelCounts(success, error) {
request.
get(`${this.getChannelsRoute()}/counts`).