tafkars
tafkars copied to clipboard
Where to start helping
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!
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 fromroux) are Strings, but they should really be ints with an appropriate serde annotation to do base36 conversion automatically, andtafkars-lemmyshould send ids as base36 accordingly for maximum mimicry tafkarsshould have a type that represents reddit sortings (hot, new, rising, etc) andtafkars-lemmyshould 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 fromrouxwhere possible)
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
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)
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.
Link to the reddit api: https://www.reddit.com/dev/api/