import { HttpStatusCode } from '@shared/models' ; import { unwrapBody , unwrapTextOrDecode , unwrapBodyOrDecodeToJSON } from '../requests' ; import { AbstractCommand , OverrideCommandOptions } from '../shared' ; export class StreamingPlaylistsCommand extends AbstractCommand { get ( options ) { return unwrapTextOrDecode ( this . getRawRequest ( { ... options , url : options . url , implicitToken : false , defaultExpectedStatus : HttpStatusCode . OK_200 } ) ) ; } getSegment ( options ) { return unwrapBody < Buffer > ( this . getRawRequest ( { ... options , url : options . url , range : options . range , implicitToken : false , defaultExpectedStatus : HttpStatusCode . OK_200 } ) ) ; } getSegmentSha256 ( options ) { return unwrapBodyOrDecodeToJSON < { [ id ] : string ; } > ( this . getRawRequest ( { ... options , url : options . url , implicitToken : false , defaultExpectedStatus : HttpStatusCode . OK_200 } ) ) ; } }