threadsjs / threads.js

A Node.js library for the Threads API
MIT License
279 stars 29 forks source link

Fixed string restriction with user ids. #48

Closed JayyDoesDev closed 1 year ago

JayyDoesDev commented 1 year ago

User ids will no longer be restricted to strings (https://github.com/threadsjs/threads.js/issues/23) and will now be converted to a string no matter what. This will allow numbers to be used in parameters. Appropriate formatting has also been added to methods using more than 2 parameters. The methods will now use object oriented parameters for better readability.

elijah-wright commented 1 year ago

there are some tabbing issues I need to fix and conflicts, give me a minute

esau-morais commented 1 year ago

it doesn't make sense to enforce as a string because when i tested, the endpoint still returned data for both number and string (?)

JayyDoesDev commented 1 year ago

I mainly based it off what was being provided as a string and assumed to be a string only. The reason of this though is because normally you won't see someone using a string to assign a number. So in this case it could of just been typings that could be changed to get away from a strict string type value.