Discuss Scratch

god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

meowclient js
very cool library!

https://github.com/webdev03/meowclient

why not meow js?
esm support, typescript, thats it

extra things
I will not add any social actions to the library because then less chance of people getting banned.

thanks
Thanks to Scratchclient and Raihan142857 (CubeyTheCube) for a lot of the login stuff!

Last edited by god286 (Jan. 30, 2022 04:38:17)


meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

I have a question:
I've passed “this” from ScratchSession to my Profile class to get auth, but is there a more TypeScript-ish way to do that?

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
mbrick2
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

YESSS








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

mbrick2 wrote:

YESSS
ok! just wondering what made you super excited?

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
MagicCrayon9342
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

It can't get any easier than scratchclient lmao



Templates:

Doesn't belong in the ATs:
Unfortunately, this post does not belong in the Advanced Topics. Please report your post, and in the box type the following:
Please move this post to ‘Thinks I’m Making or Creating' or ‘Show and Tell’
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

MagicCrayon9342 wrote:

It can't get any easier than scratchclient lmao
There's a difference between Python and Javascript

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
MagicCrayon9342
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

god286 wrote:

(#6)

MagicCrayon9342 wrote:

It can't get any easier than scratchclient lmao
There's a difference between Python and Javascript
One's purely for websites one is purely for software…



Templates:

Doesn't belong in the ATs:
Unfortunately, this post does not belong in the Advanced Topics. Please report your post, and in the box type the following:
Please move this post to ‘Thinks I’m Making or Creating' or ‘Show and Tell’
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

MagicCrayon9342 wrote:

god286 wrote:

(#6)

MagicCrayon9342 wrote:

It can't get any easier than scratchclient lmao
There's a difference between Python and Javascript
One's purely for websites one is purely for software…
I am now going to politely ask you to stop arguing over what JS and Python is for. If you're going to keep on doing this I'll politely ask you to stop posting on my forum threads if you make more useless arguments.

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
Chiroyce
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

MagicCrayon9342 wrote:

It can't get any easier than scratchclient lmao
Sure it can't - but isn't this great for people who want to use TypeScript?







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

Chiroyce wrote:

MagicCrayon9342 wrote:

It can't get any easier than scratchclient lmao
Sure it can't - but isn't this great for people who want to use TypeScript?
you dont even need to use typescript its optional, just type definitions = awesome for those who use it, btw I had to use typescript for esm and cjs support

Last edited by god286 (Jan. 23, 2022 04:34:07)


meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
dhuls
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

MagicCrayon9342 wrote:

(#7)

god286 wrote:

(#6)

MagicCrayon9342 wrote:

It can't get any easier than scratchclient lmao
There's a difference between Python and Javascript
One's purely for websites one is purely for software…
Electron and Node.JS.
Also, it's clear you go on AT threads for the purpose of starting arguments. Stop. You're not funny.


Chiroyce
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

MagicCrayon9342 wrote:

One's purely for websites one is purely for software…
Sorry I had to do this

- HTTP(S) servers
- Database integration
- macOS, Linux and Windows Apps
- Frontend Frameworks
- Vanilla JS
- Native iOS and Android Apps


“One's purely for websites” - I recommend that you take some time to think about this.







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

Chiroyce wrote:

MagicCrayon9342 wrote:

One's purely for websites one is purely for software…
Sorry I had to do this

- HTTP(S) servers
- Database integration
- macOS, Linux and Windows Apps
- Frontend Frameworks
- Vanilla JS
- Native iOS and Android Apps


“One's purely for websites” - I recommend that you take some time to think about this.
add in (I think) IOT uses, scripting with zx by Google, and more.
[/offtopic]

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

I'd also like to add that the only time you have to run .init is when creating the session. After that, you literally don't have to .init() on any profile, as it will automatically fetch the data if you haven't already

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
mbrick2
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

god286 wrote:

(#4)

mbrick2 wrote:

YESSS
ok! just wondering what made you super excited?
I saw it in your comments








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

Definition files are fun, especially when they're automated for you
declare class Profile {
    user: string;
    status: string;
    private scratchUserHTML;
    auth: any;
    constructor(username: string, session: any);
    /**
     * Gets the status of the user
     * Can either be Scratcher, New Scratcher, or Scratch Team.
     * @returns {string} The status of the user.
     */
    getStatus(): Promise<any>;
    /**
     * Deletes a comment
     * @param id The comment ID, for example 12345, *not* comment-12345
     * @returns {number} The status code of the request.
     */
    deleteComment(id: {
        toString: () => string;
    }): Promise<number>;
    private getUserHTML;
    /**
     *
     * @param page The page to look at.
     * @returns {Array} An array of comments. There is id, username, content, and apiID keys.
     * apiID is used to input into deleteComment
     */
    getComments(page?: number): Promise<any[]>;
}
/**
 * Logs into Scratch
 */
declare class ScratchSession {
    username: string;
    csrfToken: string;
    token: string;
    cookieSet: string;
    /**
     * Sets up the ScratchSession to use authenticated functions
     * @param user The username of the user you want to log in to
     * @param pass The password of the user you want to log in to
     */
    init(user: string, pass: string): Promise<void>;
    getProfile(username: string): Profile;
}
export { ScratchSession as default };
I was trying to get JSDoc working earlier. I guess I'll just use Jekyll then since it doesn't work.

Last edited by god286 (Jan. 23, 2022 08:54:03)


meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
nampinanathali
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

god286 wrote:

Definition files are fun, especially when they're automated for you
declare class Profile {
    user: string;
    status: string;
    private scratchUserHTML;
    auth: any;
    constructor(username: string, session: any);
    /**
     * Gets the status of the user
     * Can either be Scratcher, New Scratcher, or Scratch Team.
     * @returns {string} The status of the user.
     */
    getStatus(): Promise<any>;
    /**
     * Deletes a comment
     * @param id The comment ID, for example 12345, *not* comment-12345
     * @returns {number} The status code of the request.
     */
    deleteComment(id: {
        toString: () => string;
    }): Promise<number>;
    private getUserHTML;
    /**
     *
     * @param page The page to look at.
     * @returns {Array} An array of comments. There is id, username, content, and apiID keys.
     * apiID is used to input into deleteComment
     */
    getComments(page?: number): Promise<any[]>;
}
/**
 * Logs into Scratch
 */
declare class ScratchSession {
    username: string;
    csrfToken: string;
    token: string;
    cookieSet: string;
    /**
     * Sets up the ScratchSession to use authenticated functions
     * @param user The username of the user you want to log in to
     * @param pass The password of the user you want to log in to
     */
    init(user: string, pass: string): Promise<void>;
    getProfile(username: string): Profile;
}
export { ScratchSession as default };
I was trying to get JSDoc working earlier. I guess I'll just use Jekyll then since it doesn't work.

cool!

mom when look at my browser history
Verixion
Scratcher
100+ posts

MEOWCLIENT - an easy to use library

Meow.ts (Meow.js TS) was on my high priority list haha. Nvm now I guess

back in business

god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

Verixion wrote:

Meow.ts (Meow.js TS) was on my high priority list haha. Nvm now I guess
You can do that if you want!

Last edited by god286 (Jan. 23, 2022 19:15:41)


meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
god286
Scratcher
1000+ posts

MEOWCLIENT - an easy to use library

Now open source in beta
https://github.com/webdev03/meowclient/

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet

Powered by DjangoBB

Standard | Mobile