Glitch API SDK on TypeScript - glitch-api

Okay, half of the way is done: I have working WSS connection where you can set your own message handler and do your stuff.

Editor functionality will be added later.

The example which shows how to use ws is here: https://github.com/jarvis394/glitch-api/blob/master/docs/examples/websockets.js

1 Like

gets a new pc

finally, i can use this

1 Like

I’m waiting for the editor functionality to come out… :smile: :slight_smile: :grinning:

1 Like

finally, i can use this!

3.0.0-alpha3

  • added Context class to the API response handler, so debugging might be more helpful now

No changes for websockets for now

If you want to get a user by their username just use the following code.

const api = ...
api.users.get({ login: "username here" }).then(user => { /* do stuff with the user object */ });

Hey @charliea21,
The library is build with power of TypeScript, so there would be some handy descriptions for every method (in a proper editor, like VSCode).

In addition to that, I’ve build a great documentation using TypeDoc (glapi.ml) and so you can always check what should something do.

Thanks. The code I posted was to mainly clarify some issues in this thread about getting a users ID. Also I may be creating a pull request at some point as I’m thinking of adding some features related to the Glitch Support Forum! (i doubt many people would use it but it would be a nice addition)

That helped, @charliea21. @jarvis394, are user IDs supposed to stay private? And what all kinds of tokens are supposed to be private?

Hello @khalby786,

No, user IDs are public because you can get them by API without a token. And, of course, any token should be kept in private place because, for example, someone could retrieve list of private projects of a user

Okay, 3.0 is actually released, to update run:

npm update glitch-api

Migration: https://github.com/jarvis394/glitch-api#-migration-from-2x-to-3x

Website: glapi.ml

1 Like

Cool! Might try it out if I can think of something to use it for :slight_smile:

Seems really cool. Might work on this in another language.

Ah, you don’t need Typescript to use it; TS just gives you the typings!

1 Like

Will this be updated sometime soon? lol

talkin bout the site btw, Doesn’t show up when i go to it.

1 Like

we have a problem?

3 Likes

Should be okay now, some problems from Glitch side I guess :stuck_out_tongue:

2 Likes