Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Reddit #12

Open
cyyynthia opened this issue Dec 21, 2020 · 3 comments
Open

Add support for Reddit #12

cyyynthia opened this issue Dec 21, 2020 · 3 comments

Comments

@cyyynthia
Copy link
Owner

Relevant documentation:

@cyyynthia
Copy link
Owner Author

It is. Interaction with Reddit's API will be quite small, just a matter of configuring the internal oauth abstract layer and fetching the authenticated user's profile. Most of the work will be on the extension part, to add pronouns throughout the Reddit interface.

As usernames are an immutable account property on Reddit, they can safely be considered IDs for PronounDB's purposes. It'll be easier than trying to scrape the Reddit's actual ID.

Last note, if you start working on it I'd be preferable to support both the modern and old Reddit interfaces.

@Enderchief
Copy link
Contributor

Hi there 👋
I've been using pronoundb for a while now and I would like to implement this.
I do know my way around the reddit api pretty well and I think I could figure out the extension stuff.

My biggest question is development and testing.
For now, I am just working on the api part of pronoundb and it think it's done but I have some issues.

  1. eslint, I cannot get it to run in packages/api
    I run pnpm run lint and get this
$ pnpm run lint

> @pronoundb/api@ lint redacted/pronoundb.org.git/issue/12/packages/api
> eslint --ext ts --ext tsx src


Oops! Something went wrong! :(

ESLint: 8.31.0

ESLint couldn't determine the plugin "@typescript-eslint" uniquely.

- redacted/pronoundb.org.git/issue/12/node_modules/.pnpm/@[email protected]_k73wpmdolxikpyqun3p36akaaq/node_modules/@typescript-eslint/eslint-plugin/dist/index.js (loaded in ".eslintrc.json » ../../.eslintrc.json")
- redacted/pronoundb.org.git/issue/12/node_modules/.pnpm/@[email protected]_m2kn7xiag5lymyarkgri27ztxm/node_modules/@typescript-eslint/eslint-plugin/dist/index.js (loaded in "../../.eslintrc.json")

Please remove the "plugins" setting from either config or remove either plugin installation.

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

 ELIFECYCLE  Command failed with exit code 2.
  1. typescript, running pnpm build also gives typescript errors. the good thing is at least it still builds
  2. when doing docker-compose up in the main root folder. I got it all built and running but how do I test it from there?

Sorry for the long message. 😔

@cyyynthia
Copy link
Owner Author

Hey there,

The eslint issues I'm not very sure why they happen, they've been a problem for a while that I've dealt with a sub-optimal method. Try adding "root": true to the files in the packages/. If it doesn't work, my "solution" was to nuke node_modules folders (all) and pnpm i again.

I can't really help you for the TypeScript issues if I don't know what these are. I know for a fact mistress branch should build, so it's probably a weird issue (I've had these happen a long time ago).

Once the containers are up, everything should be available on localhost:8080. Frontend is broken iirc because of some weird quirks in passing --host to Vite that no longer works (feel free to fix it) and the API should be on localhost:8080/api. If it yields Bad Gateway, restart the nginx contianer. I suck at configuring compose and dependencies aren't properly set ugh.


2 extra notes:

  • I've started rewriting the backend & frontend from scratch in the rewrite/astro branch. You might be better off focusing efforts on the extension side of things as the whole API is being rewritten.
  • If you want to chat more about it, you can join my Discord server and ask whatever you wish there :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants