tafkars icon indicating copy to clipboard operation
tafkars copied to clipboard

Where to start helping

Open SpyrosRoum opened this issue 2 years ago • 5 comments

Hello! I'm fairly experienced with Rust and I love the idea of (hopefully) using my reddit client on lemmy, so I'd love to help.

I see you have written that people should contact you on how to get started, but I think creating some issues that people can pick up would go a long way.

With that said, please let me know how and where I can help!

SpyrosRoum avatar Jun 09 '23 08:06 SpyrosRoum

Hey and welcome! :) Good point, I'll try to make some issues later. Off the top of my head, there's

  • a couple // TODOs littered around the code.
  • reddit uses base36 ids, so ids in tafkars (which is forked from roux) are Strings, but they should really be ints with an appropriate serde annotation to do base36 conversion automatically, and tafkars-lemmy should send ids as base36 accordingly for maximum mimicry
  • tafkars should have a type that represents reddit sortings (hot, new, rising, etc) and tafkars-lemmy should use actix extractors to get the sorting from the path and translate it to the appropriate lemmy sorting
  • implement more API endpoints like subreddit/user about (copy API definitions over from roux where possible)

derivator avatar Jun 09 '23 09:06 derivator

Awesome, I'll take some time over the weekend to familiarize my self with the code. For now I am trying to understand how it works on a high level, is the following mental image roughly correct?

tafkars -> tafkars-lemmy -> lemmy

Where -> means "talks to".

So basically tafkars is a library/client which can be any reddit client, and tafkars-lemmy is a server which "translates" requests and forwards them to lemmy and the other way around

SpyrosRoum avatar Jun 09 '23 09:06 SpyrosRoum

tafkars is just a bunch of API definitions that I copied from roux and modified a bit to make them easier to work with. It's not a client per se. (roux is, but I dumped all of that code out, because I'm using the API definitions to impersonate a reddit server)

derivator avatar Jun 09 '23 12:06 derivator

More things to be done:

  • might be useful to have a dump of actual Reddit API responses for as many endpoints as possible, to reference during development and with unit tests in tafkars ensuring that they can be deserialized (even though we don't really need to deserialize Reddit responses, just as a way to check API conformity).
  • there should probably a pub type CommentsResponse = (Listing<Submission>, Listing<CommentOrMore>) somewhere in tafkars.

If someone is feeling bored, feel free to open issues for these and the ones above.

derivator avatar Jun 12 '23 23:06 derivator

Link to the reddit api: https://www.reddit.com/dev/api/

evolve2k avatar Jun 15 '23 00:06 evolve2k