Skip to content

Commit

Permalink
make readme better
Browse files Browse the repository at this point in the history
  • Loading branch information
webdev03 committed Oct 5, 2023
1 parent 0e1729f commit 17dcd07
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions README.md
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!

0 comments on commit 17dcd07

Please sign in to comment.