diff --git a/.gitignore b/.gitignore index 40599ef..e3e608b 100644 --- a/.gitignore +++ b/.gitignore @@ -136,3 +136,4 @@ dmypy.json # Pyre type checker .pyre/ +.aider* diff --git a/README.md b/README.md index 418aa50..2a890e6 100644 --- a/README.md +++ b/README.md @@ -27,22 +27,23 @@ Run ``python -m finary_uapi` for an up to date version. ``` Usage: - finary_uapi signin + finary_uapi signin [MFA_CODE] finary_uapi me finary_uapi institution_connections - finary_uapi dashboard net [all | 1w | 1m | ytd | 1y] - finary_uapi dashboard gross [all | 1w | 1m | ytd | 1y] - finary_uapi dashboard finary [all | 1w | 1m | ytd | 1y] - finary_uapi portfolio [all | 1w | 1m | ytd | 1y] - finary_uapi commodities [all | 1w | 1m | ytd | 1y] - finary_uapi checking_accounts [all | 1w | 1m | ytd | 1y] - finary_uapi fonds_euro [all | 1w | 1m | ytd | 1y] - finary_uapi other_assets [all | 1w | 1m | ytd | 1y] - finary_uapi saving_accounts [all | 1w | 1m | ytd | 1y] - finary_uapi real_estates [all | 1w | 1m | ytd | 1y] + finary_uapi organizations + finary_uapi timeseries + finary_uapi checking_accounts transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=] + finary_uapi fonds_euro finary_uapi startups finary_uapi investments + finary_uapi investments dividends + finary_uapi investments transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=] + finary_uapi crowdlendings + finary_uapi crowdlendings distribution + finary_uapi crowdlendings add + finary_uapi crowdlendings delete finary_uapi cryptos + finary_uapi cryptos distribution finary_uapi cryptos add finary_uapi cryptos update finary_uapi cryptos delete @@ -50,8 +51,8 @@ Usage: finary_uapi precious_metals finary_uapi precious_metals add finary_uapi precious_metals delete - finary_uapi holdings_accounts [crypto | stocks | ] - finary_uapi holdings_accounts add (crypto | stocks) + finary_uapi holdings_accounts [crypto | stocks | crowdlending | ] + finary_uapi holdings_accounts add (crypto | stocks | crowdlending) finary_uapi holdings_accounts add (checking | saving) finary_uapi holdings_accounts delete finary_uapi holdings_accounts update [] @@ -60,6 +61,7 @@ Usage: finary_uapi generic_assets add finary_uapi generic_assets update finary_uapi generic_assets delete + finary_uapi crypto_chains finary_uapi crypto_currency search QUERY finary_uapi fiat_currency search QUERY finary_uapi institutions search QUERY @@ -67,11 +69,24 @@ Usage: finary_uapi securities finary_uapi securities add finary_uapi securities delete + finary_uapi insights + finary_uapi loans + finary_uapi credit_accounts transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=] + finary_uapi real_estates + finary_uapi real_estates add rent
[] + finary_uapi real_estates add
[] + finary_uapi real_estates update rent + finary_uapi real_estates update + finary_uapi real_estates delete + finary_uapi scpis search QUERY + finary_uapi scpis + finary_uapi watches search QUERY + finary_uapi import crowdlending_csv FILENAME [-d] [-f] finary_uapi import cryptocom FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] finary_uapi import nexo FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] finary_uapi import crypto_csv FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] - finary_uapi import stocks_csv FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] - finary_uapi import stocks_json FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] + finary_uapi import stocks_csv FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] [-d] + finary_uapi import stocks_json FILENAME [(--new=NAME | --edit=account_id | --add=account_id)] [-d] ``` ## Examples @@ -151,4 +166,4 @@ Thanks go to these people ([emoji key](https://allcontributors.org/docs/en/emoji -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/finary_uapi/__main__.py b/finary_uapi/__main__.py index 7ef9217..fd9942b 100644 --- a/finary_uapi/__main__.py +++ b/finary_uapi/__main__.py @@ -6,12 +6,12 @@ finary_uapi institution_connections finary_uapi organizations finary_uapi timeseries - finary_uapi checking_accounts transactions + finary_uapi checking_accounts transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=] finary_uapi fonds_euro finary_uapi startups finary_uapi investments finary_uapi investments dividends - finary_uapi investments transactions + finary_uapi investments transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=] finary_uapi crowdlendings finary_uapi crowdlendings distribution finary_uapi crowdlendings add @@ -45,7 +45,7 @@ finary_uapi securities delete finary_uapi insights finary_uapi loans - finary_uapi credit_accounts transactions + finary_uapi credit_accounts transactions [--page=] [--perpage=] [--account=] [--institution=] [--query=] finary_uapi real_estates finary_uapi real_estates add rent
[] finary_uapi real_estates add
[] @@ -64,9 +64,16 @@ Options: - --new=NAME Create a new account and import the lines - --edit=account_id Edit the line with new value if it exists, create it otherwise - --add=account_id If line exists, add the quantity and change the price accordingly, create it otherwise + --new=NAME Create a new account and import the lines + --edit=account_id Edit the line with new value if it exists, create it otherwise + --add=account_id If line exists, add the quantity and change the price accordingly, create it otherwise + --page= First page [default: 1]. + --perpage= Elements per page [default: 50]. + --account= Account ids, comma separated if necessary + --institution= Institutions (banks) ids, comma separated if necessary + --query= Full text search + + """ # noqa import json @@ -167,7 +174,14 @@ def main() -> int: # pragma: nocover result = get_user_me_institution_connections(session) elif args["checking_accounts"]: if args["transactions"]: - result = get_portfolio_checking_accounts_transactions(session) + result = get_portfolio_checking_accounts_transactions( + session, + page=args["--page"], + per_page=args["--perpage"], + account_id=args["--account"], + institution_id=args["--institution"], + query=args["--query"], + ) elif args["fonds_euro"]: result = get_user_fonds_euro(session) elif args["startups"]: @@ -339,7 +353,14 @@ def main() -> int: # pragma: nocover if args["dividends"]: result = get_portfolio_investments_dividends(session) elif args["transactions"]: - result = get_portfolio_investments_transactions(session) + result = get_portfolio_investments_transactions( + session, + page=args["--page"], + per_page=args["--perpage"], + account_id=args["--account"], + institution_id=args["--institution"], + query=args["--query"], + ) else: result = get_portfolio_investments(session) elif args["timeseries"]: @@ -368,7 +389,14 @@ def main() -> int: # pragma: nocover result = get_loans(session) elif args["credit_accounts"]: if args["transactions"]: - result = get_portfolio_credit_accounts_transactions(session) + result = get_portfolio_credit_accounts_transactions( + session, + page=args["--page"], + per_page=args["--perpage"], + account_id=args["--account"], + institution_id=args["--institution"], + query=args["--query"], + ) elif args["real_estates"]: result = get_user_real_estates(session) elif args["scpis"]: