npm install -g typescript
git clone https://github.com/Swag666baby/nuvem-azul-api
cd nuvem-azul-api
npm install
npm run build
npm start
โข to add one game ๐๏ธ
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 ๐
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
import axios from "axios";
const searchGame = async() => {
const request = await axios.get("http://localhost:4000/search?q=stardew")
console.log(request.data)
}