Skip to content

Conversation

@aglensmith
Copy link
Owner

@aglensmith aglensmith commented Mar 18, 2022

What?

  • Moves all v2 resource modules to a new v2 directory
  • Adds modules and classes for v3 resources to a new v3 directory
  • Adds a ApiSubSubResource base class to handle requests to double-nested objects like Product Modifier Option Values
  • modifies BigcommerceApi to not require client_id on init
  • Adds optional version param to BigcommerceApi that determines whether to use v2 or v3 resources (defaults to v2)
  • Adds new TryLatestApiResourceWrapper that’s used when BigcommerceApi version is set to ’latest' -- it will attempt to use the v3 resource, and if not found, falls back to the v2 resource.
  • Makes ID optional for *.get(), and when no ID is specified, it returns same results as *.all()

To Do

  • Add subresource methods to V3 resource classes (ex: Product.configurable_fields()) -- these aren’t necessary per se, but are required to reach feature parity with the v2 resources.
  • Make sure class name plurality follows conventions (ProductsModifiers vs ProductModifiers vs ProductModifier)
  • Remove unused classes in api.py and unused modifications to ApiSubResource base classes in base.py (since ApiSubSubResource makes those unnecessary)
  • Add more tests

This is in-service of a personal project to create a bigcommerce API CLI tool written in python, but it might be beneficial to merge into bigcommerce/bigcommerce-api-python once complete and thoroughly tested.

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