Skip to content

v1.0.0

Latest

Choose a tag to compare

@r-thomson r-thomson released this 18 Jul 17:19
· 1 commit to master since this release
8fde54e

What’s New

  • Standardized Signatures The method signatures across all API resources have been standardized to provide a consistent Pythonic interface.
  • Reworked Exceptions Exceptions now include structured error messages from BigCommerce. The exception hierarchy has been reworked to make exception handling more convenient.
  • Automatic Retries API calls can be configured to automatically retry after a failed attempt.
  • Versioned APIs To support future- and backwards-compatibility, each resource now includes its API version in its signature.
  • Timeouts can be specified on a per-request basis using the timeout keyword argument.
  • Comma-separated query parameters may be specified as a list, e.g. [1, 2, 3]'1,2,3'.
  • Added support for cursor-based pagination in the V3 API client.
  • Added update_many and delete_many to the Customers v3 resource.

Breaking Changes

  • The minimum supported Python version is now 3.10.
  • The timeout argument to BigCommerceAPI.__init__ is now keyword-only.
  • Resources are now grouped by the BigCommerce API version. For example, BigCommerceAPI.orders has been split into BigCommerceAPI.orders_v2 and BigCommerceAPI.orders_v3.
  • Request bodies are now always passed as a dictionary (data={}), rather than as individual keyword arguments.
  • Query parameters are now always passed as a dictionary (params={}, kwarg-only), rather than as individual keyword arguments.
  • The customer_id argument has been removed from customer address methods.
  • BigCommerceAPI.api.v2 and BigCommerceAPI.api.v3 have been renamed to BigCommerceAPI.api_v2 and BigCommerceAPI.api_v3, respectively.
  • The signatures of BigCommerceRequestClient.request and BigCommerceRequestClient.get_many have changed. Keyword arguments are no longer directly passed to requests.request.
  • The signature of BigCommerceException.__init__ has changed.
  • The exception hierarchy has been reworked completely:
    • BigCommerceAPIExceptionBigCommerceError
    • BigCommerceRedirectionError → removed
    • InvalidAuthorizationErrorUnauthorizedError
    • InsufficientScopesErrorForbiddenError
    • ResourceNotFoundErrorDoesNotExistError
    • (new) ConflictError
    • (new) EntityTooLargeError
    • (new) InvalidDataError
    • (new) LockedError
    • RateLimitExceededErrorTooManyRequestsError
    • InternalBigCommerceErrorInternalServerError
    • (new) BadGatewayError
    • StoreUnavailableErrorServiceUnavailableError
    • (new) GatewayTimeoutError
    • PlanLimitExceededErrorInsufficientStorageError
    • (new) BigCommerceNetworkError
  • The type of BigCommerceException.message is now str | None. To get a non-optional message, call BigCommerceException.__str__.
  • The type of BigCommerceException.response is now Any (at runtime it is still requests.Response).
  • Exceptions raised from Requests are now wrapped in a BigCommerceException.