Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 7, 2018 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/c56b22150dc5b789bb3cbe2eced71508 to your computer and use it in GitHub Desktop.
Save productioncoder/c56b22150dc5b789bb3cbe2eced71508 to your computer and use it in GitHub Desktop.
Youtube in React: build related videos request
export function buildRelatedVideosRequest(videoId, amountRelatedVideos = 12) {
return buildApiRequest('GET',
'/youtube/v3/search',
{
part: 'snippet',
type: 'video',
maxResults: amountRelatedVideos,
relatedToVideoId: videoId,
}, null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment