totalItems: null
}
sort: VideoSortField = '-publishedAt'
- category?: number
+ categoryOneOf?: number
defaultSort: VideoSortField = '-publishedAt'
syndicationItems = []
protected loadRouteParams (routeParams: { [ key: string ]: any }) {
this.sort = routeParams['sort'] as VideoSortField || this.defaultSort
- this.category = routeParams['category']
+ this.categoryOneOf = routeParams['categoryOneOf']
if (routeParams['page'] !== undefined) {
this.pagination.currentPage = parseInt(routeParams['page'], 10)
} else {
videoPagination: ComponentPagination,
sort: VideoSortField,
filter?: VideoFilter,
- category?: number
+ categoryOneOf?: number
): Observable<{ videos: Video[], totalVideos: number }> {
const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
params = params.set('filter', filter)
}
- if (category) {
- params = params.set('category', category + '')
+ if (categoryOneOf) {
+ params = params.set('categoryOneOf', categoryOneOf + '')
}
return this.authHttp
return feeds
}
- getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, category?: number) {
+ getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, categoryOneOf?: number) {
let params = this.restService.addRestGetParams(new HttpParams(), undefined, sort)
if (filter) params = params.set('filter', filter)
- if (category) params = params.set('category', category + '')
+ if (categoryOneOf) params = params.set('categoryOneOf', categoryOneOf + '')
return this.buildBaseFeedUrls(params)
}
getVideosObservable (page: number) {
const newPagination = immutableAssign(this.pagination, { currentPage: page })
- return this.videoService.getVideos(newPagination, this.sort, this.filter, this.category)
+ return this.videoService.getVideos(newPagination, this.sort, this.filter, this.categoryOneOf)
}
generateSyndicationList () {
- this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, this.filter, this.category)
+ this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, this.filter, this.categoryOneOf)
}
}
getVideosObservable (page: number) {
const newPagination = immutableAssign(this.pagination, { currentPage: page })
- return this.videoService.getVideos(newPagination, this.sort, undefined, this.category)
+ return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf)
}
generateSyndicationList () {
- this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.category)
+ this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf)
}
}
getVideosObservable (page: number) {
const newPagination = immutableAssign(this.pagination, { currentPage: page })
- return this.videoService.getVideos(newPagination, this.sort, undefined, this.category)
+ return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf)
}
generateSyndicationList () {
- this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.category)
+ this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf)
}
}