GithubHelp home page GithubHelp logo

scratch3-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scratch3-api's Issues

Add Support For Getting Messages

I feel like the title is self explanatory, please add support for getting messages starting at an index, and you can pass in a length, and return an array of messages. Not just unread messages, all messages.

Does this project no longer work?

Hello! I noticed this same problem with the og project. I was wondering if the apis no longer works as when I debug the json returns from the requests, I get a "too many requests" or an html file with labels that say too many requests. Big fan of this project tho! If there are any fixes at all, please let me know!

Babel deps

AFAIK, all of the babel deps should be in devDependencies

CloudSession doesn't work

I am trying to create a CloudSession, but there is an error talking about this being undefined.
Error:

        this.send("handshake", {});
             ^

TypeError: Cannot read properties of undefined (reading 'send')
    at sendHandshake (D:\Skretchero-tekst\node_modules\scratch3-api\dist\cloudsession.js:127:14)
    at WebSocket.<anonymous> (D:\Skretchero-tekst\node_modules\scratch3-api\dist\cloudsession.js:47:13)
    at WebSocket.emit (node:events:402:35)
    at WebSocket.setSocket (D:\Skretchero-tekst\node_modules\ws\lib\websocket.js:225:10)
    at ClientRequest.<anonymous> (D:\Skretchero-tekst\node_modules\ws\lib\websocket.js:810:15)
    at ClientRequest.emit (node:events:390:28)
    at TLSSocket.socketOnData (node:_http_client:527:11)
    at TLSSocket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)

Code:

const Scratch = require('scratch3-api');
const { username, password } = require('./config.json');

async function main() {
	let session = await Scratch.UserSession.create(username, password);
	let cloud = await session.cloudSession(60*****78);
	/*cloud.on('set', (name, value) => {
		console.log(name, value);
	})*/
}

main();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.