Skip to content

Instantly share code, notes, and snippets.

@muradddd
Last active October 1, 2020 20:31
Show Gist options
  • Save muradddd/fd07cfa4f2cdb8c6ff4e83aeeca92412 to your computer and use it in GitHub Desktop.
Save muradddd/fd07cfa4f2cdb8c6ff4e83aeeca92412 to your computer and use it in GitHub Desktop.
API urls
const SITE_URL = 'http://35.205.142.86';
// COMPANIES/BRANDS
const COMPANY_CATEGORIES_API_URL = `${SITE_URL}/api/v1/companies/categories`;
const SEARCH_COMPANIES_BY_CATEGORIES_URL = `${COMPANY_CATEGORIES_API_URL}?title=`;
// REVIEWS/COMPLAINTS
const REVIEW_CATEGORIES_API_URL = `${SITE_URL}/api/v1/reviews/categories`;
const REVIEW_COMPANIES_API_URL = `${SITE_URL}/api/v1/reviews/companies`;
const REVIEW_KEYWORDS_API_URL = `${SITE_URL}/api/v1/reviews/keywords`;
const SEARCH_REVIEWS_BY_CATEGORIES_URL = `${REVIEW_CATEGORIES_API_URL}?title=`;
const SEARCH_REVIEWS_BY_COMPANIES_URL = `${REVIEW_COMPANIES_API_URL}?name=`;
const SEARCH_REVIEWS_BY_KEYWORDS_URL = `${REVIEW_KEYWORDS_API_URL}?title=`;
// RECOMMENDED COMPANIES (CREATE/UPDATE REVIEW PAGES)
const RECOMMENDED_COMPANIES_URL = '${SITE_URL}/api/v1/companies'
const SEARCH_RECOMMENDED_COMPANIES_URL = `${RECOMMENDED_COMPANIES_URL}?name=`;
export {COMPANY_CATEGORIES_API_URL, SEARCH_COMPANIES_BY_CATEGORIES_URL, REVIEW_CATEGORIES_API_URL, REVIEW_COMPANIES_API_URL, REVIEW_KEYWORDS_API_URL, SEARCH_REVIEWS_BY_COMPANIES_URL, SEARCH_REVIEWS_BY_CATEGORIES_URL, SEARCH_REVIEWS_BY_KEYWORDS_URL, RECOMMENDED_COMPANIES_URL, SEARCH_RECOMMENDED_COMPANIES_URL}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment