Skip to content

Instantly share code, notes, and snippets.

@ZiiSolutions
Created July 31, 2017 14:25
Show Gist options
  • Save ZiiSolutions/2620423729adad9b4018ea44f355c690 to your computer and use it in GitHub Desktop.
Save ZiiSolutions/2620423729adad9b4018ea44f355c690 to your computer and use it in GitHub Desktop.
'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