-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,32 @@ | ||
# Meowclient | ||
|
||
**A library to connect to [Scratch](https://scratch.mit.edu/).** | ||
A library to connect to [Scratch](https://scratch.mit.edu/). | ||
|
||
### Installation | ||
|
||
If you run this install command you will get the latest version of meowclient in your `package.json`. | ||
Run this command in a terminal. | ||
|
||
```bash | ||
npm install meowclient | ||
npm install meowclient | ||
``` | ||
|
||
## Example (async) | ||
## Example | ||
|
||
```javascript | ||
import { ScratchSession, Profile } from "meowclient"; | ||
const session = new ScratchSession(); | ||
await session.init("user", "pass"); | ||
const me = new Profile(session, session.username); | ||
console.log("My status is " + (await me.getStatus())); | ||
await session.logout(); | ||
``` | ||
This uses exclusively ESM (ECMAScript Modules) instead of CJS due to some dependencies meowclient uses. | ||
|
||
Some features are available without logging in if you don't run the `session.init` function. | ||
|
||
### The CJS way (if you still use it) | ||
|
||
```js | ||
const { ScratchSession } = require("meowclient"); | ||
const session = new ScratchSession(); | ||
await session.init("user", "pass"); | ||
const me = new Profile(session, session.username); | ||
// User.getStatus gets the status of the user, either "New Scratcher", "Scratcher" or "Scratch Team" | ||
console.log("My status is " + (await me.getStatus())); | ||
``` | ||
|
||
## Note | ||
|
||
Automating social actions such as loving, favouriting, commenting, or following users is not allowed if you run it automatically! Only use these features if you are doing it manually! I am not responsible if your Scratch account gets restricted because of you being reckless with this! | ||
## Getting Help | ||
You can get help using Meowclient from the [official Meowclient forum topic](https://scratch.mit.edu/discuss/topic/574321/) | ||
|
||
## Thanks | ||
|
||
Thanks to all of the people who use my library! | ||
|
||
Thanks to [Scratchclient](https://github.com/CubeyTheCube/scratchclient) and Raihan142857 ([CubeyTheCube](https://github.com/CubeyTheCube)) for a lot of the login stuff! |