Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishinzoo/virat-kohli-knocks-api
Welcome to the Virat Kohli's Greatest Knocks API! This backend project serves the purpose of delivering one of Virat Kohli's greatest cricket innings in a random order whenever a request is made.
https://github.com/ishinzoo/virat-kohli-knocks-api
api get kotlin ktor ktor-server monitoring routing serialization
Last synced: 4 days ago
JSON representation
Welcome to the Virat Kohli's Greatest Knocks API! This backend project serves the purpose of delivering one of Virat Kohli's greatest cricket innings in a random order whenever a request is made.
- Host: GitHub
- URL: https://github.com/ishinzoo/virat-kohli-knocks-api
- Owner: iShinzoo
- Created: 2024-06-02T09:19:48.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-06-03T06:29:28.000Z (7 months ago)
- Last Synced: 2024-11-08T13:37:29.206Z (about 2 months ago)
- Topics: api, get, kotlin, ktor, ktor-server, monitoring, routing, serialization
- Language: Kotlin
- Homepage:
- Size: 394 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Virat Kohli's Greatest Knocks API
Welcome to the Virat Kohli's Greatest Knocks API! This backend project serves the purpose of delivering one of Virat Kohli's greatest cricket innings in a random order whenever a request is made.## Features
* Random Knock Selection: Each API request returns a random selection from a list of Virat Kohli's greatest cricket innings.
* Statistical Details: Along with the match description, the API provides detailed statistics such as score, opposition.
* Simple RESTful API: The backend is designed to be lightweight and easy to integrate with any frontend or other services.
## Endpoints
### GET/randomImage
Returns a JSON object containing details of one of Virat Kohli's greatest cricket innings.#### Response Format
```
json"tournament" : "2012 Champions Trophy",
"description":"Virat Kohli scored a match-winning 103 not out to lead India to victory in the final against Pakistan.",
"imageUrl" : "$BASE_URL/images/v1.jpg"```
## Getting Started
### Prerequisites
* Node.js
* npm (Node Package Manager)
#### Installation
1. Clone the repository:```
git clone https://github.com/your-username/ktor-sample.git
cd ktor-sample
```
2. Install the dependencies:```
npm install
```
3. Start the server:```
npm start
```The server will start running on http://localhost:3000.
#### Usage
Send a GET request to the following endpoint to receive a random knock of Virat Kohli:```
http://localhost:8100/randomImage
```