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