This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added scraper functionality to admin screen
- Loading branch information
Showing
14 changed files
with
364 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { qs, fetcher } from 'utils'; | ||
import { API_ENDPOINT } from 'config'; | ||
|
||
const scrape = {}; | ||
|
||
scrape.get = ({ name }) => { | ||
const params = qs.stringify({ name }); | ||
url = `${API_ENDPOINT}/scrape${params}`; | ||
return fetcher(url); | ||
}; | ||
|
||
scrape.getDetails = ({ url }) => { | ||
const params = qs.stringify({ url }); | ||
url = `${API_ENDPOINT}/scrape/details${params}`; | ||
return fetcher(url); | ||
}; | ||
|
||
export { scrape }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export * from './styling'; | ||
|
||
export const API_ENDPOINT = { | ||
development: 'http://localhost:3001/api/v1', | ||
// development: 'http://localhost:3001/api/v1', | ||
// development: 'https://plenty-development.herokuapp.com/api/v1', | ||
// development: 'https://plenty-staging.herokuapp.com/api/v1', | ||
development: 'https://plenty-staging.herokuapp.com/api/v1', | ||
// development: 'https://plenty-production.herokuapp.com/api/v1', | ||
production: 'https://plenty-production.herokuapp.com/api/v1', | ||
}[process.env.NODE_ENV]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.