import { Injectable } from '@angular/core'; import { Http, Response, URLSearchParams } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { Pagination } from './pagination.model'; import { Search } from '../../shared'; import { SortField } from './sort-field.type'; import { AuthHttp, AuthService } from '../../shared'; import { Video } from './video.model'; @Injectable() export class VideoService { private static BASE_VIDEO_URL = '/api/v1/videos/'; constructor( private authService: AuthService, private authHttp: AuthHttp, private http: Http ) {} getVideo(id: string) { return this.http.get(VideoService.BASE_VIDEO_URL + id) .map(res =>