import moment from 'moment' ; import { v4 as uuid } from 'uuid' ; import { IStock , StockMarket } from './types' ; export class HotStockService { private static _hotStocks : IStock [ ] = [ ] ; description static returns { IStock [ ] } memberof public static async getHotStocks ( ) { console . info ( 'HotStockService.getHotStocks' ) ; if ( this . _hotStocks && this . _hotStocks . length ) { return this . _hotStocks ; } const updatedAt = moment ( ) . toDate ( ) ; const amcStock = { bloombergTerminalUrl : 'CAN_YOU_GET_THIS_?' , companyName : 'AMC Entertainment Holdings Inc' , companyUrl : 'https://www.amctheatres.com/corporate' , hasElonMuskTweetedAboutIt : false , id : uuid ( ) , isHot : true , marketSymbol : 'AMC' , redditMentions : 1000 , stockMarket : StockMarket . NYSE , value : 6.83 , updatedAt , } ; const gamestopStock = { bloombergTerminalUrl : 'CAN_YOU_GET_THIS_?' , companyName : 'GameStop Corp.' , companyUrl : 'https://www.gamestop.com' , hasElonMuskTweetedAboutIt : true , id : uuid ( ) , isHot : true , marketSymbol : 'GME' , redditMentions : 1000 , stockMarket : StockMarket . NYSE , value : 61.30 , updatedAt , } ; this . _hotStocks . push ( amcStock ) ; this . _hotStocks . push ( gamestopStock ) ; return this . _hotStocks ; } }