NelsonDane / fennel-invest-api

Unofficial reverse-engineered Fennel.com Invest app API written in Python Requests
MIT License
13 stars 8 forks source link

Update README.md #5

Closed ghost closed 4 months ago

ghost commented 6 months ago

Example said "Symbol" when really it was "ticker". Works fine with ticker. Also edited surrounding code for 2fa, as wait for 2fa is not a requested argument, it just asks for the code without it, and when you add it it doesn't work. Feel free to ask for clarification if you're confused.

deepsource-io[bot] commented 6 months ago

Here's the code health analysis summary for commits 7d6f5f1..2c9c1ab. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.
NelsonDane commented 6 months ago

Good catch on the ticker arg, I didn't notice that!

I understand what you're saying, but I think you're confused about the wait_for_code argument. Yes, if you just provide your email, you can enter the code via the command line (which is a Python input() function), and it will work. But the wait_for_code flag is there for when you want to enter the code a different way. For example, I have a Discord bot that uses this API, and it asks the user to enter their Fennel email 2FA code through Discord instead of the command line. In this case, wait_for_code is set to False initially, so that the login process is started, the 2FA email is sent. Then it throws an exception related to 2FA, that is caught by the main program, and then the user is asked to enter the code through Discord. The same login function is then called again with code set to the 6 digit code, and it logs in successfully.

Hopefully this makes more sense and you can see why that part is needed in the README.