Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active November 18, 2018 16:17
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/fcfa30ca70ccbd4fb978bb0614beab94 to your computer and use it in GitHub Desktop.
Save productioncoder/fcfa30ca70ccbd4fb978bb0614beab94 to your computer and use it in GitHub Desktop.
Youtube in React: building a search request
export function buildSearchRequest(query, nextPageToken, amount = 12, ) {
return buildApiRequest('GET',
'/youtube/v3/search',
{
part: 'id,snippet',
q: query,
type: 'video',
pageToken: nextPageToken,
maxResults: amount,
}, null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment