Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RadioService

Index

Constructors

constructor

  • new RadioService(http: HttpClient, events: Events): RadioService

Properties

Private currentSong

currentSong: ISong

Private events

events: Events

http

http: HttpClient

Private lastSongs

lastSongs: ISong[]

Private loopInterval

loopInterval: number = 3000

Private timer

timer: any

Methods

Private filterDefaultCovers

  • filterDefaultCovers(data: any): any

getApiSongs

  • getApiSongs(): Promise<any>

Private getMatchedCover

  • Return a special cover if title of the song contains any specific tags in RadioService.TAGS.DEFAULT, RadioService.TAGS.NOUVEAUTE or in RadioService.TAGS.FRIDAY_WEAR. Depending in which array the tag is matching, returns a default Cover from GlobalService

    Parameters

    • song: any

    Returns ICoverSong

initLoop

  • initLoop(interval?: number): void

Private lookForMatch

  • lookForMatch(title: string): string[]
  • Checks if title contains any tag of the arrays (default friday wear tags, default nouveaute tags, or simply default tags If an array of tags matches, returns this array

    Parameters

    • title: string

    Returns string[]

Private onGetApiSongsError

  • onGetApiSongsError(error: any): void

Private onGetApiSongsSuccess

  • onGetApiSongsSuccess(data: any): void

Object literals

Static Private TAGS

TAGS: object

DEFAULT

DEFAULT: string[] = ['sample','jingle','faubourg simone','fabourg simone', // lol'flash calepin',]

FRIDAY_WEAR

FRIDAY_WEAR: string[] = ['Friday Wear',]

NOUVEAUTE

NOUVEAUTE: string[] = ['nouveauté','nothing','nouveaute']