@financial-times/n-concept-ids
Version:
A place to store concept ids as constants
47 lines (40 loc) • 3.97 kB
JavaScript
const cloudFrontUrl = 'https://d1e00ek4ebabms.cloudfront.net' || process.env.PODCAST_IMAGES_CLOUDFRONT_URL;
const { brand: conceptIds } = require('./index.js');
function imgUrl (imageName) {
return `${cloudFrontUrl}/production/uploaded-files/${imageName}`;
}
// 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('Economics%20Show_SIZES-correct%20for%20HP-2a0e11c9-82d7-41c4-b139-66e2e0eae522.png'), },
{ conceptId: conceptIds.untold, image16x9: imgUrl('Power%20For%20Sale_MASTER_2048x1152-158052f9-4975-4a0b-902d-0e7fe07efa17.jpeg'), },
{ conceptId: conceptIds.unhedgedPodcast, image16x9: imgUrl('Unhedged_1920x1080%20%281%29-6b0bd98c-ffe8-4cdd-8df1-34c13baff291.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('TT_FT%20App-Master%20size_NEW%20SYSTEM4-6cd03d8f-4482-49be-ac7f-6ae7796f513f.jpeg'), },
{ conceptId: conceptIds.startupStoriesPodcast, image16x9: imgUrl('start-up-stories-f81dbfec-2d95-4e34-a0ca-e6dfdba1403a.png'), },
{ conceptId: conceptIds.rachmanReviewPodcast, image16x9: imgUrl('RACHMAN_FT%20App-Master%20size_NEW%20SYSTEM-452e63ce-4cd4-4da6-94ab-c918aeffce76.jpeg'), },
{ conceptId: conceptIds.politicsPodcast, image16x9: imgUrl('PF_FT%20App-Master%20size_NEW%20SYSTEM-555b74c3-0d73-4edd-aca6-5d2982975659.jpeg'), },
{ conceptId: conceptIds.newsBriefingPodcast, image16x9: imgUrl('NB_FT%20App-Master%20size_NEW%20SYSTEM-9c7d96c6-0a45-4f7f-b529-a95cfed1b3a5.jpeg'), },
{ conceptId: conceptIds.newsFocusPodcast, image16x9: imgUrl('news-in-focus-09c5651d-315d-4953-a408-92ac2a490e58.png'), },
{ conceptId: conceptIds.moneyShowPodcast, image16x9: imgUrl('MONEY%20CLINIC_FT%20App-Master%20size_NEW%20SYSTEM-2c62d6b4-0e1c-45f7-a7d2-6623b07f8440.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('BTM_FT%20App-Master%20size_NEW%20SYSTEM-51999373-6f41-4655-8276-7ef470a96854.jpeg'), },
{ conceptId: conceptIds.brexitUnspunPodcast, image16x9: 'http://prod-upp-image-read.ft.com/47800950-f49b-11e8-ae55-df4bf40f9d0d', },
];
const podcastsByConcept = new Map(podcasts.map((podcast) => [podcast.conceptId, podcast]));
function getPodcastByConceptid (conceptId) {
return podcastsByConcept.get(conceptId);
}
module.exports = {
data: podcasts,
getPodcastByConceptid,
};