OrderBy 过滤器不适用于 kaltura 媒体列表 api 使用
OrderBy filter not working for kaltura media listing api using
我正在从 Kaltura 获取媒体列表,使用 Kaltura 客户端可以正常工作。但是当尝试使用 order by 过滤它时,它没有按预期工作(返回相同的列表)。
const Promise = require('bluebird');
const kaltura = require('kaltura-client/KalturaClient');
exports.getMediaList = Promise.method((client, pager) => {
return new Promise(function (resolve, reject) {
return kaltura.services.media.listAction({ orderBy: 'CREATE_DATE_DESC'}, pager).execute(client).then((response) => {
resolve(response.objects);
}, (error) => {
reject(error);
})
});
});
在这里,如果我们为orderBy传递'-createdAt',我们可以得到最近列表中的媒体
const Promise = require('bluebird');
const kaltura = require('kaltura-client/KalturaClient');
exports.getMediaList = Promise.method((client, pager) => {
return new Promise(function (resolve, reject) {
return kaltura.services.media.listAction({ orderBy: '-createdAt'}, pager).execute(client).then((response) => {
resolve(response.objects);
}, (error) => {
reject(error);
})
});
});
我正在从 Kaltura 获取媒体列表,使用 Kaltura 客户端可以正常工作。但是当尝试使用 order by 过滤它时,它没有按预期工作(返回相同的列表)。
const Promise = require('bluebird');
const kaltura = require('kaltura-client/KalturaClient');
exports.getMediaList = Promise.method((client, pager) => {
return new Promise(function (resolve, reject) {
return kaltura.services.media.listAction({ orderBy: 'CREATE_DATE_DESC'}, pager).execute(client).then((response) => {
resolve(response.objects);
}, (error) => {
reject(error);
})
});
});
在这里,如果我们为orderBy传递'-createdAt',我们可以得到最近列表中的媒体
const Promise = require('bluebird');
const kaltura = require('kaltura-client/KalturaClient');
exports.getMediaList = Promise.method((client, pager) => {
return new Promise(function (resolve, reject) {
return kaltura.services.media.listAction({ orderBy: '-createdAt'}, pager).execute(client).then((response) => {
resolve(response.objects);
}, (error) => {
reject(error);
})
});
});