8000 Add base managers for all endpoints by lezorich · Pull Request #69 · fintoc-com/fintoc-python · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add base managers for all endpoints #69

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

Merged
merged 3 commits into from
Apr 15, 2025

Conversation

lezorich
Copy link
Member
@lezorich lezorich commented Apr 12, 2025

Description

This PR adds base managers for all endpoints. The objective is to stop using resource managers and instead use base managers always.

Example:

# Deprecated this
link = client.links.get("link_123123_token_asdasd")
print(link.accounts.all(lazy=False)[0])

# Use this instead
print(client.accounts.all(link_token="link_123123_token_asdasd", lazy=False)[0])

Nested resources are called like this:

# Deprecated this
link = client.links.get("link_123123_token_asdasd")
account = link.accounts.get("acc_1234324")
print(account.movements.all(lazy=False)[0])

# Use this instead
print(client.accounts.movements.all(
    account_id="acc_123412", 
    link_token="link_123123_token_asdasd, 
    lazy=False
))

Calling the resource managers is still available to maintain backwards compatibility, but I removed it from the documentation.

Requirements

None.

Additional changes

Rewrote the README.md to make it more concise, simpler and removed references to using resources to call API endpoints

@lezorich lezorich changed the base branch from master to refactor/do-not-create-multiple-clients April 12, 2025 18:20
@lezorich lezorich changed the base branch from refactor/do-not-create-multiple-clients to master April 12, 2025 18:21
@lezorich lezorich force-pushed the refactor/deprecate-resource-managers branch from 1d09e34 to 36470a8 Compare April 12, 2025 18:28
@lezorich lezorich changed the base branch from master to refactor/do-not-create-multiple-clients April 12, 2025 18:29
@lezorich lezorich force-pushed the refactor/deprecate-resource-managers branch 3 times, most recently from 5991bfd to b040ac2 Compare April 13, 2025 04:09
@lezorich lezorich changed the title Refactor/deprecate resource managers Add base managers for all endpoints Apr 13, 2025
@lezorich lezorich marked this pull request as ready for review April 13, 2025 05:31
@lezorich lezorich requested a review from daleal April 13, 2025 05:31
Base automatically changed from refactor/do-not-create-multiple-clients to master April 15, 2025 03:16
@lezorich lezorich force-pushed the refactor/deprecate-resource-managers branch 2 times, most recently from 337e42b to ef77b19 Compare April 15, 2025 04:00
@lezorich lezorich force-pushed the refactor/deprecate-resource-managers branch from ef77b19 to 4fbc59c Compare April 15, 2025 04:04
@lezorich lezorich merged commit 64a26c7 into master Apr 15, 2025
5 checks passed
@lezorich lezorich deleted the refactor/deprecate-resource-managers branch April 15, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0