简体   繁体   English

Kaltura listAction也要返回contextData

[英]Kaltura listAction to return contextData as well

Is there a way when using listAction to get all media entries to also retrieve flavorAssets of those media items? 使用listAction获取所有媒体条目以同时检索那些媒体项目的flavorAssets时,是否有办法? Currently what I am doing is retrieving all media items first, then iterating over each one and using getContextData action on to get flavorAssets for each media entry, which is not very effective and can take a long time. 当前,我正在做的是先检索所有媒体项目,然后遍历每个媒体项目,然后对每个媒体条目使用getContextData操作获取flavorAssets ,这不是很有效,可能会花费很长时间。 My question is, is there a way to do a Kaltura.services.media.listAction(mediaFilter, pager) while also returning flavorAssets or contextData in this case for each item without the need to call for getContextData action on each media entry? 我的问题是,有没有一种方法可以执行Kaltura.services.media.listAction(mediaFilter, pager)同时在这种情况下还为每个项目返回flavorAssetscontextData ,而无需在每个媒体条目上调用getContextData操作?

You can use response profiles to return both the entries and the flavor assets in a single request. 您可以使用响应配置文件在单个请求中返回条目和风味资产。

Here's a raw request that will provide you with want you need, just append a KS: 这是一个原始请求,只需添加KS,即可满足您的需求:

http://www.kaltura.com/api_v3/index.php?service=baseEntry&action=list&filter:objectType=KalturaBaseEntryFilter&filter:orderBy=-createdAt&format=1&responseProfile:objectType=KalturaDetachedResponseProfile&responseProfile:fields=id,name&responseProfile:type=1&responseProfile:relatedProfiles:0:objectType=KalturaDetachedResponseProfileArray&responseProfile:relatedProfiles:0:mappings:0:objectType=ResponseProfileMapping&responseProfile:relatedProfiles:0:mappings:0:parentProperty=id&responseProfile:relatedProfiles:0:mappings:0:filterProperty=entryIdEqual&responseProfile:relatedProfiles:0:name=flavorAsset&&responseProfile:relatedProfiles:0:filter:objectType=KalturaFlavorAssetFilter&ks= http://www.kaltura.com/api_v3/index.php?service=baseEntry&action=list&filter:objectType=KalturaBaseEntryFilter&filter:orderBy=-createdAt&format=1&responseProfile:objectType=KalturaDetachedResponseProfile&responseProfile:fields=id,name&responseProfile:type=1&responseProfile:relatedProfiles:0 :的objectType = KalturaDetachedResponseProfileArray&responseProfile:relatedProfiles:0:映射:0:的objectType = ResponseProfileMapping&responseProfile:relatedProfiles:0:映射:0:parentProperty = ID&responseProfile:relatedProfiles:0:映射:0:filterProperty = entryIdEqual&responseProfile:relatedProfiles:0:名称= flavorAsset && responseProfile:relatedProfiles 0:过滤器:的objectType = KalturaFlavorAssetFilter&KS =

In a more human friendly format: 以更人性化的格式:

service=baseEntry
action=list
format=1
filter:objectType=KalturaBaseEntryFilter
filter:orderBy=-createdAt
responseProfile:objectType=KalturaDetachedResponseProfile
responseProfile:fields=id,name
responseProfile:type=1
responseProfile:relatedProfiles:0:objectType=KalturaDetachedResponseProfileArray
responseProfile:relatedProfiles:0:name=flavorAsset
responseProfile:relatedProfiles:0:mappings:0:objectType=ResponseProfileMapping
responseProfile:relatedProfiles:0:mappings:0:parentProperty=id
responseProfile:relatedProfiles:0:mappings:0:filterProperty=entryIdEqual
responseProfile:relatedProfiles:0:filter:objectType=KalturaFlavorAssetFilter

I'm not sure if the JavaScript client library support response profiles, the TypeScript client library does support it. 我不确定JavaScript客户端库是否支持响应配置文件,TypeScript客户端库是否支持它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM