Skip to content

Latest commit

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

node-scratch-client

This package is a nodejs promise-based client to connect with the Scratch web and cloud servers. This package is based off https://github.com/trumank/scratch-api which the developer has discontinued.

Full project manipulation:

// Import the module with:constscratch=require("node-scratch-client");// Initiate clientconstClient=newscratch.Client({username: "griffpatch",password: "SecurePassword1"});// LoginClient.login().then(()=>{// Fetch project informationClient.getProject(10128407).then(project=>{project.postComment("Turning off comments..");project.turnOffCommenting();});});

Cloud server connection:

constscratch=require("node-scratch-client");constClient=newscratch.Client({username: "ceebeee",password: "SecurePassword2"});Client.login().then(()=>{letcloud=Client.session.createCloudSession(281983597);cloud.connect().then(()=>{cloud.on("set",variable=>{console.log("Variable changed to "+variable.value);});});});

About

A client for the scratch 3.0 website.

Resources

Stars

15 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages