not-an-aardvark / snoowrap

A JavaScript wrapper for the reddit API
MIT License
1.01k stars 125 forks source link

Update Docs? #355

Closed eli-rich closed 2 years ago

eli-rich commented 2 years ago

Hello! Just found this library and it's pretty nice so far! I do want to suggest updating/improving the docs though.

From what I can see, it doesn't list the object properties anywhere, only the methods.

It would be nice to list the actual property data returned by the reddit API.

For example: If I wanted to get the creation date of a submission or comment, I don't see anywhere in the docs where it lists that as any kind of property. (Btw I still haven't figured this out so please feel free to comment the solution)

My apologies if I'm missing something obvious with this.

Venefilyn commented 2 years ago

Snoowrap doesn't have object properties defined in the code so this isn't something we can include in the docs. Some type definitions that's defined for TypeScript have some fields but they're not complete.

Best option is to either go to something like a post or comment and add .json to the end of the URL to see all the fields, or print out all the fields of a thing fetched through Snoowrap

eli-rich commented 2 years ago

@SpyTec Ahh thank you! I just saved the object keys to a file but the .json method is way better!

Is there ever a plan to add object properties to the code? Something like how the discord.js pkg works?

Either way, I'll go ahead and close the issue since the docs do not need to be updated at the moment.