Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created October 15, 2018 18:10
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/518e06655b93077e064f01cdc5c3c874 to your computer and use it in GitHub Desktop.
Save productioncoder/518e06655b93077e064f01cdc5c3c874 to your computer and use it in GitHub Desktop.
Youtube fetch most popular videos actions
import {createAction, createRequestTypes, REQUEST, SUCCESS, FAILURE} from './index';
export const MOST_POPULAR = createRequestTypes('MOST_POPULAR');
export const mostPopular = {
request: (amount, loadDescription, nextPageToken) => createAction(MOST_POPULAR[REQUEST], {amount, loadDescription, nextPageToken}),
success: (response) => createAction(MOST_POPULAR[SUCCESS], {response}),
failure: (response) => createAction(MOST_POPULAR[FAILURE], {response}),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment