crystal-community / crystal-libraries-needed

A list of libraries that are needed or wanted for the Crystal-Language
141 stars 4 forks source link

Reddit API Wrapper #86

Open notcraig opened 6 years ago

notcraig commented 6 years ago

Python famously has PRAW. Ruby has Redd.
I'd love to see a Crystal Reddit API wrapper (CRAW?)

watzon commented 6 years ago

I actually started work on this, but the process of gaining access to Reddits API is terrible. Like filling out a Google doc terrible.

alexanderadam commented 2 years ago

I guess @edwardloveall's reddit.cr (a file in the pixelfeed repo) would be a good start if someone would extract it into a separate shard.

gxfr commented 2 years ago

I'm currently building a class that authenticates and allows sending GET requests. It shouldn't be too hard expanding to an API wrapper with proper PUT/POST/DELETE request methods.

alexanderadam commented 2 years ago

I'm currently building a class that authenticates and allows sending GET requests. It shouldn't be too hard expanding to an API wrapper with proper PUT/POST/DELETE request methods.

This would be great! :raised_hands: By the way, the official API doesn't only has the typical REST actions but also WebSocket subscriptions (see here).

gxfr commented 2 years ago

Coming from Python, I simply write the library in Python first and then convert everything to Crystal. I guess websockets is how PRAW implements the submission/comment streams? I've never used websockets so I'll have to figure out how it works, but I can 100% implement support for reddit's live endpoints.