![ChoruProject](https://i.imgur.com/UBUgWQ4.jpeg)
Replitstalk
(a reference to stalking Replit users on the platform)
Example For Language
Nodejs
const replitstalk = require("replitstalk");
const details = await replitstalk("edu-choru");
const title = details.title;
const author = details.author;
const description = details.description;
const image = details.image;
console.log({
title: `${title}`,
author: `${author}`,
description: `${description}`,
image: `${image}`
});
Python
import replitstalk
async def main():
details = await replitstalk("edu-choru")
title = details["title"]
author = details["author"]
description = details["description"]
image = details["image"]
print({
"title": f"{title}",
"author": f"{author}",
"description": f"{description}",
"image": f"{image}"
})
await main()
Php
<?php
require_once "replitstalk.php"; // assuming replitstalk.php contains the replitstalk function
$details = replitstalk("edu-choru");
$title = $details['title'];
$author = $details['author'];
$description = $details['description'];
$image = $details['image'];
echo json_encode(array(
"title" => $title,
"author" => $author,
"description" => $description,
"image" => $image
));
?>
Bot
Messanger bot in Facebook
const replitstalk = require("replitstalk");
const details = await replitstalk("edu-choru");
const title = details.title;
const author = details.author;
const description = details.description;
const image = details.image;
api.sendMessage(`title: ${title},\nauthor: ${author},\ndescription:${description},\nimage: ${image}`, event.threadID, event.messageID);
Discord bot
const Discord = require("discord.js");
const client = new Discord.Client();
const replitstalk = require("replitstalk");
client.on("ready", async () => {
console.log(`Logged in as ${client.user.tag}`);
const details = await replitstalk("edu-choru");
const title = details.title;
const author = details.author;
const description = details.description;
const image = details.image;
const channel = client.channels.cache.get("INSERT_CHANNEL_ID_HERE");
channel.send(`title: ${title},\nauthor: ${author},\ndescription:${description},\nimage: ${image}`);
});
client.login("INSERT_DISCORD_BOT_TOKEN_HERE");
express
const express = require('express');
const app = express();
const replitstalk = require("replitstalk");
app.get('/replitcheck', async (req, res, next) => {
try {
const username = req.query.search;
if (!username) throw new Error("No username provided in query");
const details = await replitstalk(username);
const title = details.title;
const author = details.author;
const description = details.description;
const image = details.image;
console.log({
title: `${title}`,
author: `${author}`,
description: `${description}`,
image: `${image}`
});
return res.status(200).json({
owner: 'Choru Tiktokers',
title: `${title}`,
author: `${author}`,
description: `${description}`,
image: `${image}`
});
} catch (err) {
return res.status(400).json({ error: err.message });
}
});
app.listen(3000, () => {
console.log('Server listening on port 3000');
});