Last active
February 25, 2020 22:52
-
-
Save ptesser/db02d14e46da6da13d762a99aa3f1ed0 to your computer and use it in GitHub Desktop.
This file contains 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
// Youtube Keys | |
YOUTUBE_API_KEY: 'AIzaSyBSnGWkvGIBpXONyAKv5Gt3OofBv0IaHkw', | |
// (angular-courses project in p.tesser921 account) AIzaSyDF0QpmbBwnZsNCCZeBln2hFjqD2KiSGkk | |
YOUTUBE_API_URL: 'https://www.googleapis.com/youtube/v3', | |
// Trending params | |
const params: string = [ | |
'chart=mostPopular', | |
'regionCode=IT', | |
'part=snippet,contentDetails,statistics', | |
'maxResults=10', | |
'type=video', | |
`key=${this.apiKey}`, | |
].join('&'); | |
// Search params | |
const params: string = [ | |
`part=snippet,id`, | |
`maxResults=20`, | |
`type=video`, | |
`q=${keyword}`, | |
`safeSearch=moderate`, | |
`key=${this.apiKey}` | |
].join('&'); | |
// Related params | |
const params: string = [ | |
`part=snippet`, | |
`maxResults=20`, | |
`type=video`, | |
`relatedToVideoId=${videoId}`, | |
`key=${this.ytApiKey}` | |
].join('&'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment