Created
July 31, 2017 14:26
-
-
Save ZiiSolutions/e61855affb0e5795369ef9c9f0ab6fe3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* class for holding and retrieving PA services names | |
*/ | |
class PaServices { | |
/** | |
* Get service name provided service code. | |
* | |
* @param serviceCode PA service code | |
* @return string with PA service name | |
*/ | |
getSubjectName(serviceCode) { | |
switch (serviceCode) { | |
case 'paservice:news': | |
return 'News'; | |
case 'paservice:viral': | |
return 'Viral'; | |
case 'paservice:sci-tech': | |
return 'Sci-Tech'; | |
case 'paservice:entertainment': | |
return 'Entertainment'; | |
case 'paservice:sport': | |
return 'Sport'; | |
case 'paservice:entertainment:movies': | |
return 'Movies'; | |
case 'paservice:entertainment:music': | |
return 'Music'; | |
case 'paservice:entertainment:tv': | |
return 'TV'; | |
case 'paservice:sport:other': | |
return 'Other'; | |
case 'paservice:sport:cricket': | |
return 'Cricket'; | |
case 'paservice:sport:football': | |
return 'Football'; | |
case 'paservice:sport:f1': | |
return 'F1'; | |
case 'paservice:sport:rugby-league': | |
return 'Rugby-League'; | |
case 'paservice:sport:rugby-union': | |
return 'Rugby-Union'; | |
case 'paservice:sport:tennis': | |
return 'Tennis'; | |
default: | |
return ''; | |
} | |
} | |
} | |
module.exports = new PaServices(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment