alpacahq / alpaca-ts

A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
ISC License
154 stars 42 forks source link

The rework of the Client class. #8

Closed aqilc closed 4 years ago

aqilc commented 4 years ago

The whole of the Client rework.

aqilc commented 4 years ago

Also, even if we wanted to support the close method, the current way is the worst way imaginable. Ideally, we should put the promise handling in the request method, where it's actually most useful.

aqilc commented 4 years ago

Also, Node automatically closes promises when exiting from what I know.

aqilc commented 4 years ago

Yes it does: https://github.com/nodejs/node/issues/22088

aqilc commented 4 years ago

So first thing to do now, is to remove all of the promise allocation stuff.

117 commented 4 years ago

Perhaps we make a new ‘dev’ branch for this before beginning with changes? Then we can keep pushing changes without worry.

aqilc commented 4 years ago

Oh, uhhhhh ok. I think I can switch, but I need to push my current changes first...

aqilc commented 4 years ago

Ok, here is the start of the client rework I was talking about(#5)... I do feel as if it's a bit unnecessary but I love the fact that it can group together methods and make the coding experience a bit better.

aqilc commented 4 years ago

Ok I have to go now, see you tomorrow. Also, some way to contact you would be nice(like a Discord or email)

117 commented 4 years ago

I switched the base branch to dev and merged the PR.

117 commented 4 years ago

Ok I have to go now, see you tomorrow. Also, some way to contact you would be nice(like a Discord or email)

Discord Bubbles#9497

aqilc commented 4 years ago

^ that started an awesome friendship