Skip to content

Commit aa6a483

Browse files
committed
refactor: improved code structure
1 parent 742028f commit aa6a483

File tree

4 files changed

+7
-63
lines changed

4 files changed

+7
-63
lines changed

scrapegraph-js/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { scrape } from './scrape.js';
2-
export { credits } from './credits.js';
3-
export { feedback } from './feedback.js';
1+
export { smartScraper, smartScraperInfo } from './src/smartScraper.js';
2+
export { credits } from './src/credits.js';
3+
export { feedback } from './src/feedback.js';

scrapegraph-js/scrape.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

scrapegraph-js/credits.js renamed to scrapegraph-js/src/credits.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import axios from 'axios';
77
* @returns {Promise<string>} Response from the API in JSON format
88
*/
99
export async function credits(apiKey) {
10-
const endpoint = "https://sgai-api.onrender.com/api/v1/credits";
10+
const endpoint = "https://api.scrapegraphai.com/v1/credits";
1111
const headers = {
1212
"accept": "application/json",
13-
"SGAI-API-KEY": apiKey
13+
"SGAI-APIKEY": apiKey
1414
};
1515

1616
try {

scrapegraph-js/feedback.js renamed to scrapegraph-js/src/feedback.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import axios from 'axios';
1010
* @returns {Promise<string>} Response from the API in JSON format
1111
*/
1212
export async function feedback(apiKey, requestId, rating, feedbackText) {
13-
const endpoint = "https://sgai-api.onrender.com/api/v1/feedback";
13+
const endpoint = "https://api.scrapegraphai.com/v1/feedback";
1414
const headers = {
1515
"accept": "application/json",
16-
"SGAI-API-KEY": apiKey,
16+
"SGAI-APIKEY": apiKey,
1717
"Content-Type": "application/json"
1818
};
1919

0 commit comments

Comments
 (0)