Closed farizrifqi closed 1 year ago
@farizrifqi Thank you so much for the getPostIDfromURL
function!
For the getThread
and getThreadReplies
methods, I decided to merge those two into one, since they're using the same API calls — users can destructure only the properties they want from the result.
https://github.com/junhoyeo/threads-api/commit/e8c9527459ac4b4f6fdd64ed3a0164892e491dfc
first time writing typescript and structured code. Code aint fully tested since it even takes almost an hour for me to start using ts. im sorry.
just adding some based on my own code.
added 2 types
GetThreadResponse
GetThreadRepliesResponse
get postID from post url (fetch)
get thread splitted to getThread (without replies) and getThreadReplies