@financial-times/n-concept-ids
Version:
A place to store concept ids as constants
50 lines (42 loc) • 4.11 kB
JavaScript
import ids from './index.js';
const cloudFrontUrl = 'https://d1e00ek4ebabms.cloudfront.net' || process.env.PODCAST_IMAGES_CLOUDFRONT_URL;
const conceptIds = ids.brand;
function imgUrl (imageName) {
return `${cloudFrontUrl}/production/uploaded-files/${imageName}`;
}
// rebranded podcasts:
// political fix = politicsPodcast
// money clinic = moneyShowPodcast
// See also https://docs.google.com/spreadsheets/d/1okS0H8Mur-82zNU7noXV0fdtVLccy_sVAcTW6ciZzvQ/edit?gid=1600295713#gid=1600295713
const podcasts = [
{ conceptId: conceptIds.alphaChatPodcast, image16x9: imgUrl('alphachat-0564fbb5-45fd-4986-890c-5f620d7e8b16.png'), },
{ conceptId: conceptIds.bankingWeeklyPodcast, image16x9: imgUrl('banking-weekly-a3e7461b-9317-4a25-9bc7-09d6f473869a.png'), },
{ conceptId: conceptIds.theEconomicsShow, image16x9: imgUrl('1920x1080_Master_ECONOMICS-6e1ba553-62fb-46ec-94a7-ce12581a0202.jpeg'), },
{ conceptId: conceptIds.untold, image16x9: imgUrl('1920x1080_OPUS%20DEI-no%20logo-cbaefa77-c1c6-434a-a656-feda7a5ab186.jpeg'), },
{ conceptId: conceptIds.unhedgedPodcast, image16x9: imgUrl('1920x1080_Display_UNHEDGED-84bb0fd0-59bb-4f7c-9b45-ccdc24b50706.jpeg'), },
{ conceptId: conceptIds.topStoriesToday, image16x9: imgUrl('Top_Stories_Today_Master_noLogo-44ff299c-4a03-4552-ac9d-8ace4426d926.jpeg'), },
{ conceptId: conceptIds.workingIt, image16x9: imgUrl('WI_FT%20App-Master%20size_NEW%20SYSTEM-40a8ac9d-b1ed-4608-882a-ce115c2ed163.jpeg'), },
{ conceptId: conceptIds.everythingElsePodcast, image16x9: imgUrl('FT_Life%26Art_1920x1080-a8223d84-7487-41dc-aaf1-d14e094d38bb.jpeg'), },
{ conceptId: conceptIds.worldWeeklyPodcast, image16x9: imgUrl('world-weekly-a46aec26-760e-492f-b181-6bb575e77b97.png'), },
{ conceptId: conceptIds.worldTechFoundersPodcast, image16x9: imgUrl('world-tech-founders-5893b6a2-8426-41e1-acac-6c531e96e3b3.png'), },
{ conceptId: conceptIds.workCareersPodcast, image16x9: imgUrl('work-and-careers-c5125206-9c43-4478-a413-6ff31e2743dd.png'), },
{ conceptId: conceptIds.techTonicPodcast, image16x9: imgUrl('1920x1080_Display_TECHTONIC-960afe43-d4e1-4acf-b729-487a60a26250.jpeg'), },
{ conceptId: conceptIds.startupStoriesPodcast, image16x9: imgUrl('start-up-stories-f81dbfec-2d95-4e34-a0ca-e6dfdba1403a.png'), },
{ conceptId: conceptIds.rachmanReviewPodcast, image16x9: imgUrl('1920x1080_Display_RACHMAN-3853cfd4-9aac-4d3f-98c1-84b63782ea2f.jpeg'), },
{ conceptId: conceptIds.politicsPodcast, image16x9: imgUrl('1920x1080_Master_POLITICAL%20FIX-edaa3328-ab99-4ea4-905c-5eb273bc799e.jpeg'), },
{ conceptId: conceptIds.newsBriefingPodcast, image16x9: imgUrl('1920x1080_MASTER%20NO%20LOGO%20FTNB-b2f01ebf-d2da-4a72-86f2-3215d7142524.jpeg'), },
{ conceptId: conceptIds.newsFocusPodcast, image16x9: imgUrl('news-in-focus-09c5651d-315d-4953-a408-92ac2a490e58.png'), },
{ conceptId: conceptIds.moneyShowPodcast, image16x9: imgUrl('1920x1080_Display_MONEY%20CLINIC-79b71749-c26f-4e2f-8ca5-42c83d4883f2.jpeg'), },
{ conceptId: conceptIds.healthyCityPodcast, image16x9: imgUrl('how-to-build-a-healthy-city-dda25500-c9d1-4ca4-be66-453288fafd61.png'), },
{ conceptId: conceptIds.hardCurrencyPodcast, image16x9: imgUrl('hard-currency-61998dc4-0be7-41c1-826f-ae38ac1efe3e.png'), },
{ conceptId: conceptIds.bigReadPodcast, image16x9: imgUrl('the-big-read-835b9d85-b031-413f-a70b-af6c20ac9fe2.png'), },
{ conceptId: conceptIds.bigPicturePodcast, image16x9: imgUrl('big-picture-generic-e048c543-5865-4725-95cd-65fa1351f499.png'), },
{ conceptId: conceptIds.behindTheMoneyPodcast, image16x9: imgUrl('1920x1080_Display%20TSOM-%20nologo-59005e2d-398e-4f23-9d17-1d541aeb70fe.jpeg'), },
{ conceptId: conceptIds.brexitUnspunPodcast, image16x9: 'http://prod-upp-image-read.ft.com/47800950-f49b-11e8-ae55-df4bf40f9d0d', },
{ conceptId: conceptIds.swampNotes, image16x9: imgUrl('1920x1080_Display_SWAMP-80966192-52a8-4eef-83c1-2a6981a9fd1f.jpeg'), },
];
const podcastsByConcept = new Map(podcasts.map((podcast) => [podcast.conceptId, podcast]));
function getPodcastByConceptid (conceptId) {
return podcastsByConcept.get(conceptId);
}
export { podcasts as data, getPodcastByConceptid };