How to use the topcoder-react-lib.services.reviewOpportunities function in topcoder-react-lib

To help you get started, we’ve selected a few topcoder-react-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github topcoder-platform / community-app / src / shared / actions / challenge-listing / index.js View on Github external
/**
 * Challenge listing actions.
 */

import _ from 'lodash';
import { createActions } from 'redux-actions';
import { decodeToken } from 'tc-accounts';
import 'isomorphic-fetch';
import { processSRM } from 'utils/tc';
import { errors, services } from 'topcoder-react-lib';

const { fireErrorMessage } = errors;
const { getService } = services.challenge;
const { getReviewOpportunitiesService } = services.reviewOpportunities;

/**
 * The maximum number of challenges to fetch in a single API call. Currently,
 * the backend never returns more than 50 challenges, even when a higher limit
 * was specified in the request. Thus, this constant should not be larger than
 * 50 (otherwise the frontend code will miss to load some challenges).
 */
const PAGE_SIZE = 50;

/**
 * The maximum number of review opportunities to fetch in a single API call.
 */
const REVIEW_OPPORTUNITY_PAGE_SIZE = 10;

/**
 * Private. Loads from the backend all challenges matching some conditions.
github topcoder-platform / community-app / src / shared / actions / challenge-listing / index.js View on Github external
/**
 * Challenge listing actions.
 */

import _ from 'lodash';
import { createActions } from 'redux-actions';
import { decodeToken } from 'tc-accounts';
import 'isomorphic-fetch';
import { processSRM } from 'utils/tc';
import { errors, services } from 'topcoder-react-lib';

const { fireErrorMessage } = errors;
const { getService } = services.challenge;
const { getReviewOpportunitiesService } = services.reviewOpportunities;

/**
 * The maximum number of challenges to fetch in a single API call. Currently,
 * the backend never returns more than 50 challenges, even when a higher limit
 * was specified in the request. Thus, this constant should not be larger than
 * 50 (otherwise the frontend code will miss to load some challenges).
 */
const PAGE_SIZE = 50;

/**
 * The maximum number of review opportunities to fetch in a single API call.
 */
const REVIEW_OPPORTUNITY_PAGE_SIZE = 1000;

/**
 * Private. Loads from the backend all challenges matching some conditions.