Skip to content

Commit

Permalink
Merge pull request #65 from suryavaddiraju/dev
Browse files Browse the repository at this point in the history
v3.0.4
  • Loading branch information
suryavaddiraju authored Dec 7, 2024
2 parents bff4510 + 8963864 commit 65a8942
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 68 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,5 @@ viu
bin/
viu.exe
playground/
proxy/
proxy/
package-lock.json
10 changes: 5 additions & 5 deletions lib/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ async function custom_sleep(params={}){

async function load(params={}){
params.viu = await viupath(params);
await custom_sleep({
"slot":params.slot,
"callfrom":"starter",
"difftm":params.diffTm
});
await params.browse.request("https://www.irctc.co.in/nget/",{
"method": "GET",
"headers": main_headers.headers_1
Expand All @@ -142,6 +137,11 @@ async function load(params={}){
const endTm = (new Date()).getTime();
const e = parseInt(body);
params.diffTm = Math.round((endTm - startTm) / 2)+e; // To get server time from now on use (new Date()).getTime() + params.diffTm
await custom_sleep({
"slot":params.slot,
"callfrom":"starter",
"difftm":params.diffTm
});
return params;
}

Expand Down
60 changes: 0 additions & 60 deletions package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "irctc-api",
"description": "An exclusive NodeJs only package built on top of IRCTC Website APIs to book train tickets, managing user profile faster and simpler from anywhere in the world",
"version": "3.0.3",
"version": "3.0.4",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down Expand Up @@ -54,7 +54,7 @@
],
"dependencies": {
"tough-cookie": "^5.0.0",
"undici": "^6.20.1"
"undici": "^7.1.0"
},
"engines": {
"node": ">20.0.0",
Expand Down

0 comments on commit 65a8942

Please sign in to comment.