https://github.com/Swag666baby/torrent-api
an API designed to search, add and delete torrents from the database.
https://github.com/Swag666baby/torrent-api
api crud database nodejs torrent typescript
Last synced: 11 months ago
JSON representation
an API designed to search, add and delete torrents from the database.
- Host: GitHub
- URL: https://github.com/Swag666baby/torrent-api
- Owner: Swag666baby
- License: mit
- Created: 2024-04-19T17:26:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-28T20:07:43.000Z (about 1 year ago)
- Last Synced: 2025-05-08T16:54:27.279Z (about 1 year ago)
- Topics: api, crud, database, nodejs, torrent, typescript
- Language: TypeScript
- Homepage:
- Size: 1.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# necessary
## typescript
```
npm install -g typescript
```
## running
```bash
git clone https://github.com/Swag666baby/torrent-api
cd torrent-api
npm install
npm run build
npm start
```
## examples
**• to add one game 🖊️**
```typescript
import axios from "axios";
const addGame = async() => {
const post = await axios.post("http://localhost:4000/add",
{
"title": "Grand Theft Auto VI",
"magnet": "magnet:?xt=urn:btih:00712d7327b47hf7hh8h0hf04fh0f",
"page": "12",
"repacker": "Xatab",
"fileSize": "340 GB",
"uploadDate": "2027-08-1 23:00:00.000",
"createdAt": "2024-03-21 02:03:49.000",
"updatedAt": "2024-03-21 02:03:49.000"
})
console.log(post.data)
}
```
**• to delete game 🗑**
```typescript
import axios from "axios";
const deleteGame = async() => {
const post = await axios.post("http://localhost:4000/delete", {"id": 1})
console.log(post.data)
}
```
**• to search games 🔎**
The search can be done by both name and id
```typescript
import axios from "axios";
const searchGame = async() => {
const request = await axios.get("http://localhost:4000/search?q=stardew")
console.log(request.data)
}
```