Skip to content
Merged

V3 #28

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2d461c9
Add project_token
webdev03 Nov 21, 2022
3dfda09
Fix readme
webdev03 Nov 24, 2022
1071aee
Remove unnecessary properties
webdev03 Nov 24, 2022
28a982c
Remove unnecessary properties 2
webdev03 Nov 24, 2022
a51a301
Format
webdev03 Nov 24, 2022
1a31930
Add ability to upload to assets
webdev03 Nov 25, 2022
f573fa7
fix README
webdev03 Nov 25, 2022
8e5435e
Format
webdev03 Nov 25, 2022
9f3320a
change docs
webdev03 Nov 25, 2022
5ae8b52
Refactor types
webdev03 Nov 25, 2022
a85ae33
Fix tests
webdev03 Nov 25, 2022
938120f
Add TS tests
webdev03 Nov 26, 2022
5f84cfd
Remove unnecessary lines
webdev03 Nov 26, 2022
c204524
Fix some types
webdev03 Nov 27, 2022
821e20d
format
webdev03 Nov 27, 2022
f524bab
Update dependencies
webdev03 Nov 27, 2022
ec76c25
Accidentally put in dependencies list
webdev03 Nov 27, 2022
48e1c2b
Try to test on latest version
webdev03 Nov 27, 2022
06966c7
attempt 2
webdev03 Nov 27, 2022
00d200f
Stop returning requests
webdev03 Nov 27, 2022
b3d70f4
Fix mistake
webdev03 Nov 27, 2022
694a8b3
Remove unnecessary replace
webdev03 Nov 27, 2022
51a9198
Format
webdev03 Nov 27, 2022
9a19961
Same
webdev03 Nov 27, 2022
ff85368
Switch to examples documentation
webdev03 Nov 28, 2022
23939ff
Add examples
webdev03 Nov 28, 2022
cfe14d9
more docs
webdev03 Nov 29, 2022
dc98c0d
Format
webdev03 Nov 29, 2022
e201fe8
Switch system
webdev03 Nov 30, 2022
b0a97db
Switch to export statements
webdev03 Nov 30, 2022
8332f40
Fix project type
webdev03 Nov 30, 2022
030da4f
Add dots
webdev03 Nov 30, 2022
d3f849e
docs
webdev03 Nov 30, 2022
5c4d9d5
Disable side effects
webdev03 Nov 30, 2022
d10e2ae
Format
webdev03 Nov 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 32 additions & 33 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '19 6 * * 1'
- cron: "19 6 * * 1"

jobs:
analyze:
Expand All @@ -32,43 +32,42 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Test code
strategy:
matrix:
version: [18.x, 16.x, 14.x]
version: [19.x, 18.x, 16.x, 14.x]
runs-on: ubuntu-latest

steps:
Expand Down
40 changes: 12 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,46 @@

# Meowclient [![Test](https://github.com/webdev03/meowclient/actions/workflows/test.yml/badge.svg)](https://github.com/webdev03/meowclient/actions/workflows/test.yml)

<h3 align="center"> A very cool library to connect to <a href="https://scratch.mit.edu/">Scratch.</a> </h3>

## Getting Started
<h3>A feature-rich library to connect to <a href="https://scratch.mit.edu/">Scratch.</a></h3>

## Getting Started

Follow the steps below:

### ⏳ Installation
### ⏳ Installation

Install Meowclient with this **Quickstart** command to install the latest version of meowclient in your `package.json`.
If you run this install command you will get the latest version of meowclient in your `package.json`.

```bash
npm install meowclient
```

This command generates a brand new project with the default features.
#### The library supports both CJS and ESM.

## Example (async)

```javascript
import { ScratchSession } from "meowclient";
import { ScratchSession, Profile } from "meowclient";
const session = new ScratchSession();
await session.init("user", "pass");
const me = session.getProfile(session.username);
// next line gets html and stores it so only 1 fetch request and no .init function - recreate the object to reset it
const me = new Profile(session, session.username);
console.log("My status is " + (await me.getStatus()));
```

You might be able to use this **without even logging in by not running .init** on the session.
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 = session.getProfile(session.username);
// next line gets html and stores it so only 1 fetch request and no .init function - recreate the object to reset it
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()));
```

## Awesome features

CJS **and** ESM support powered by tsup package!
This is made with _typescript_ so you will also get .d.ts definition file and I will try my best to make good documentation! Some JSDoc comments are there too.

## Why not _insert library name here_?
## Note

ESM support, typescript, comments parsing

## Extra things

I will not add any social actions to the library because then less chance of people getting banned from Scratch.
Automating social actions such as loving, favouriting, commenting, or following users is not allowed in the Scratch Terms of Use so I won't add those features to meowclient unless you have a good reason, although if you know how to use the Scratch API you can definitely make your own fetch requests with the session.

## Thanks

Thanks to [Scratchclient](https://github.com/CubeyTheCube/scratchclient) and Raihan142857 ([CubeyTheCube](https://github.com/CubeyTheCube)) for a lot of the login stuff!


51 changes: 0 additions & 51 deletions docs/pages/ScratchSession.md

This file was deleted.

59 changes: 0 additions & 59 deletions docs/pages/classes/CloudConnection.md

This file was deleted.

91 changes: 0 additions & 91 deletions docs/pages/classes/Forums.md

This file was deleted.

Loading