Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactor API code #2613

Merged
merged 16 commits into from
Jul 25, 2022
Merged

Refactor API code #2613

merged 16 commits into from
Jul 25, 2022

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented Jul 21, 2022

  • Avoid wrapping heavy database_api objects in other API classes
    • Move some code from database_api_impl to a new class database_api_helper, and let database_api_impl inherit from database_api_helper
  • Avoid magic numbers in code / doc about API limits
    • Add api_limit_get_market_history to app_options
    • Add api_limit_get_full_accounts_subscribe to app_options
  • get_margin_positions API now is implemented with get_call_orders_by_account, and only returns the first page
  • Simplify implementation of some APIs by using template functions
  • Fix code smells

abitmore added 3 commits July 11, 2022 23:44
Avoid wrapping heavy database_api objects in other API classes,
and fix some code smells by the way.
Add api_limit_get_market_history to app_options
Add api_limit_get_full_accounts_subscribe to app_options
@abitmore abitmore added this to the 6.1.0 - Feature Release milestone Jul 21, 2022
@abitmore abitmore marked this pull request as ready for review July 21, 2022 16:01
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

71.2% 71.2% Coverage
0.3% 0.3% Duplication

@abitmore abitmore merged commit 296808a into develop Jul 25, 2022
@abitmore abitmore deleted the refactor-api-limits branch July 25, 2022 10:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant