pikachub2005 / replapi-it

A node package that can do anything replit
https://replit.com/@PikachuB2005/replapi-it
9 stars 4 forks source link
api graphql replit

Replit's API is constantly changing, which means this will as well. I will try to keep it easy to use but be aware that your project may stop working at any point.


Install

npm install replapi-it

Usage

Main API

const Client = require('replapi-it');
//A Replit connect.sid cookie
const client = new Client('SID');

client.on('ready', () => {

})

If you don't know how to find your connect.sid cookie, look here

Example

Logs the number of followers a user has

const Client = require('replapi-it');
const client = new Client('SID');

client.on('ready', async () => {
    let user = await client.users.fetch('PikachuB2005');
    console.log(user.followerCount);
})

Client

User

CurrentUser

Also contains most User properties and methods, excluding follow / block values

Repl

UserManager

ReplManager

Collection

A Map object with extra methods. Meant to be like discord.js's Collection

PostManager

CommentManager

Post

Comment

FollowerManager

FollowingManager

MultiplayerManager

FileManager

Console

UserEventManager

UserEvent

NotificationManager