diff --git a/readme.md b/readme.md index 8e85653..4e05337 100644 --- a/readme.md +++ b/readme.md @@ -38,10 +38,10 @@ const scrappey = new Scrappey('YOUR_API_KEY'); Here's an example of how to use Scrappey. 🚀 ```javascript -const Scrappey = require('scrappey'); +const Scrappey = require('.'); // Replace 'YOUR_API_KEY' with your Scrappey API key -const apiKey = 'YOUR_API_KEY'; +const apiKey = ''; // Create an instance of Scrappey const scrappey = new Scrappey(apiKey); @@ -51,15 +51,15 @@ async function runTest() { // Create a session const session = await scrappey.createSession(); - console.log('Session created:', session); + console.log(session) // Make a GET request - const getRequestResult = await scrappey.getRequest('https://example.com', session.sessionId); + const getRequestResult = await scrappey.getRequest('https://reqres.in/api/users', session.sessionId); console.log('GET Request Result:', getRequestResult); // Make a POST request const postData = { username: 'user123', password: 'pass456' }; - const postRequestResult = await scrappey.postRequest('https://example.com/login', postData, session.sessionId); + const postRequestResult = await scrappey.postRequest('https://reqres.in/api/users', postData, session.sessionId); console.log('POST Request Result:', postRequestResult); // Destroy the session @@ -71,6 +71,7 @@ async function runTest() { } runTest(); + ``` ## License