Skip to content

Commit

Permalink
Merge pull request #61 from suryavaddiraju/dev
Browse files Browse the repository at this point in the history
v3.0.3
  • Loading branch information
suryavaddiraju authored Nov 6, 2024
2 parents 93243bf + 1125f7d commit 5f70e6b
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 8 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
A package built on top of IRCTC Website APIs to book train tickets, managing user profile faster and simpler. Currently this package only works on NodeJs environment and we were not recommending this to use on browser or any other Javascript environment.

[![NPM Downloads](https://img.shields.io/npm/dw/irctc-api)](https://www.npmjs.com/package/irctc-api)
[![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=engines.node&label=node)](https://www.npmjs.com/package/irctc-api)
## Useful Links

<a href="https://github.com/suryavaddiraju/irctc-api"><img src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png" alt="GitHub Logo" width="50" height="50"/></a> <a href="https://www.npmjs.com/package/irctc-api"><img src="https://upload.wikimedia.org/wikipedia/commons/d/db/Npm-logo.svg" alt="npm Logo" width="50" height="50"/></a> <a href="https://dev.vaddiraju.in/irctc-api/api_reference"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Read-the-docs.png/330px-Read-the-docs.png" alt="Documentation Logo" width="50" height="50"/></a>

[![Download stats](https://img.shields.io/npm/dw/irctc-api)](https://www.npmjs.com/package/irctc-api)
[![Supported Versions](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=engines.node&label=node)](https://www.npmjs.com/package/irctc-api)
[![Contributors](https://img.shields.io/github/contributors/suryavaddiraju/irctc-api.svg)](https://github.com/suryavaddiraju/irctc-api/graphs/contributors)
[![GitHub License](https://img.shields.io/github/license/suryavaddiraju/irctc-api)](http://www.apache.org/licenses/LICENSE-2.0)
[![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=version&label=version)](https://www.npmjs.com/package/irctc-api)
[![License](https://img.shields.io/github/license/suryavaddiraju/irctc-api)](http://www.apache.org/licenses/LICENSE-2.0)
[![Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=version&label=version)](https://www.npmjs.com/package/irctc-api)
[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api/issues)
[![socket.dev](https://socket.dev/api/badge/npm/package/irctc-api/3.0.3)](https://socket.dev/npm/package/irctc-api)
[![GitHub last commit](https://img.shields.io/github/last-commit/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/suryavaddiraju/irctc-api/node.js.yml)](https://github.com/suryavaddiraju/irctc-api/actions/workflows/node.js.yml)
[![GitHub Stars](https://img.shields.io/github/stars/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api/stargazers)
[![NPM Link](https://img.shields.io/badge/npm-irctc--api-black?logo=npm&labelColor=rgb(203%2C%2056%2C%2055))](https://www.npmjs.com/package/irctc-api)
[![Github Link](https://img.shields.io/badge/github-suryavaddiraju%2Firctc--api-blue?logo=github&labelColor=000000)](https://github.com/suryavaddiraju/irctc-api)
[![Documentation Link](https://img.shields.io/badge/documentation-irctc--api-blue)](https://dev.vaddiraju.in/irctc-api/api_reference)
[![Home Page Link](https://img.shields.io/badge/home-irctc--api-blue)](https://dev.vaddiraju.in/irctc-api)


> [!NOTE]
Expand Down
17 changes: 16 additions & 1 deletion docs/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ npm install irctc-api

<a href="https://github.com/suryavaddiraju/irctc-api"><img src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png" alt="GitHub Logo" width="50" height="50"/></a> <a href="https://www.npmjs.com/package/irctc-api"><img src="https://upload.wikimedia.org/wikipedia/commons/d/db/Npm-logo.svg" alt="npm Logo" width="50" height="50"/></a> <a href="https://dev.vaddiraju.in/irctc-api/api_reference"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Read-the-docs.png/330px-Read-the-docs.png" alt="Documentation Logo" width="50" height="50"/></a>

[![Download stats](https://img.shields.io/npm/dw/irctc-api)](https://www.npmjs.com/package/irctc-api)
[![Supported Versions](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=engines.node&label=node)](https://www.npmjs.com/package/irctc-api)
[![Contributors](https://img.shields.io/github/contributors/suryavaddiraju/irctc-api.svg)](https://github.com/suryavaddiraju/irctc-api/graphs/contributors)
[![License](https://img.shields.io/github/license/suryavaddiraju/irctc-api)](http://www.apache.org/licenses/LICENSE-2.0)
[![Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=version&label=version)](https://www.npmjs.com/package/irctc-api)
[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api/issues)
[![socket.dev](https://socket.dev/api/badge/npm/package/irctc-api/3.0.3)](https://socket.dev/npm/package/irctc-api)
[![GitHub last commit](https://img.shields.io/github/last-commit/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/suryavaddiraju/irctc-api/node.js.yml)](https://github.com/suryavaddiraju/irctc-api/actions/workflows/node.js.yml)
[![GitHub Stars](https://img.shields.io/github/stars/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api/stargazers)
[![NPM Link](https://img.shields.io/badge/npm-irctc--api-black?logo=npm&labelColor=rgb(203%2C%2056%2C%2055))](https://www.npmjs.com/package/irctc-api)
[![Github Link](https://img.shields.io/badge/github-suryavaddiraju%2Firctc--api-blue?logo=github&labelColor=000000)](https://github.com/suryavaddiraju/irctc-api)
[![Documentation Link](https://img.shields.io/badge/documentation-irctc--api-blue)](https://dev.vaddiraju.in/irctc-api/api_reference)
[![Home Page Link](https://img.shields.io/badge/home-irctc--api-blue)](https://dev.vaddiraju.in/irctc-api)

## book

This is the heart of the package, where the whole intention for creation of this package is to book tickets in node js without use of any kind of drivers or browsers with simple input params and inbuilt payment completion capability.
Expand Down Expand Up @@ -175,7 +190,7 @@ The example input is as follows
"train": "17201",
"from": "GNT",
"to": "PDKN",
"date": "20243112",
"date": "20241231",
"mobile": "9876543210",
"passengers": [
{
Expand Down
21 changes: 21 additions & 0 deletions docs/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,29 @@ You need to fork the repository and then rasie a pull request and when the pull

## Useful Links

## Useful Links

<a href="https://github.com/suryavaddiraju/irctc-api"><img src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png" alt="GitHub Logo" width="50" height="50"/></a> <a href="https://www.npmjs.com/package/irctc-api"><img src="https://upload.wikimedia.org/wikipedia/commons/d/db/Npm-logo.svg" alt="npm Logo" width="50" height="50"/></a> <a href="https://dev.vaddiraju.in/irctc-api/api_reference"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Read-the-docs.png/330px-Read-the-docs.png" alt="Documentation Logo" width="50" height="50"/></a>

[![Download stats](https://img.shields.io/npm/dw/irctc-api)](https://www.npmjs.com/package/irctc-api)
[![Supported Versions](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=engines.node&label=node)](https://www.npmjs.com/package/irctc-api)
[![Contributors](https://img.shields.io/github/contributors/suryavaddiraju/irctc-api.svg)](https://github.com/suryavaddiraju/irctc-api/graphs/contributors)
[![License](https://img.shields.io/github/license/suryavaddiraju/irctc-api)](http://www.apache.org/licenses/LICENSE-2.0)
[![Version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsuryavaddiraju%2Firctc-api%2Fmain%2Fpackage.json&query=version&label=version)](https://www.npmjs.com/package/irctc-api)
[![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api/issues)
[![socket.dev](https://socket.dev/api/badge/npm/package/irctc-api/3.0.3)](https://socket.dev/npm/package/irctc-api)
[![GitHub last commit](https://img.shields.io/github/last-commit/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/suryavaddiraju/irctc-api/node.js.yml)](https://github.com/suryavaddiraju/irctc-api/actions/workflows/node.js.yml)
[![GitHub Stars](https://img.shields.io/github/stars/suryavaddiraju/irctc-api)](https://github.com/suryavaddiraju/irctc-api/stargazers)
[![NPM Link](https://img.shields.io/badge/npm-irctc--api-black?logo=npm&labelColor=rgb(203%2C%2056%2C%2055))](https://www.npmjs.com/package/irctc-api)
[![Github Link](https://img.shields.io/badge/github-suryavaddiraju%2Firctc--api-blue?logo=github&labelColor=000000)](https://github.com/suryavaddiraju/irctc-api)
[![Documentation Link](https://img.shields.io/badge/documentation-irctc--api-blue)](https://dev.vaddiraju.in/irctc-api/api_reference)
[![Home Page Link](https://img.shields.io/badge/home-irctc--api-blue)](https://dev.vaddiraju.in/irctc-api)

## How to Fork

Will write here in next update

## Copyright

All Rights Reserved. &copy; Vaddiraju Surya Teja, 2024
2 changes: 1 addition & 1 deletion examples/book.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function custom_function_name() {
"train": "17201", // 5 Digit Train Number - string
"from": "GNT", // Station code
"to": "PDKN", // Station code
"date": "20240530", // YYYYMMDD
"date": "20241231", // YYYYMMDD
"mobile": "9876543210", // 10 Digit Mobile Number
"passengers": [ // Passengers List - Max 4 members for Tatkal and 6 for General Quota
{
Expand Down
2 changes: 1 addition & 1 deletion examples/master_passengers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const book_params = {
"train": "17201",
"from": "GNT",
"to": "PDKN",
"date": "20243112",
"date": "20241231",
"mobile": "9876543210",
"passengers": [
{
Expand Down
2 changes: 1 addition & 1 deletion test/book.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function custom_function_name() {
"train": "17201",
"from": "GNT",
"to": "PDKN",
"date": "20240530",
"date": "20241231",
"mobile": "9876543210",
"passengers": [
{
Expand Down

0 comments on commit 5f70e6b

Please sign in to comment.