Skip to content
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

fix: allow to omit api version with custom backend url #35

Merged
merged 5 commits into from
Nov 8, 2023

Conversation

slowbackspace
Copy link
Contributor

@slowbackspace slowbackspace commented Apr 28, 2023

Problem

Blockfrost RYO exposes all endpoints in the following format host:port/*. However, this SDK constructs the URL in a format <base_url>/<api_version> with api_version falling back v0 if omitted or set to None while instantiating SDK client.

Solution

This PR introduces breaking change (for people using custom base_url value) to fix this behaviour.
If base_url is passed to BlockFrostApi constructor then also api_version will be used (instead of falling back to v0). If api_version is omitted or set to None then only base_url is used.

Related issues

#28 (which proposes workaround with passing empty string to api_version)

todo:

  • test for custom base_url with and without api_version

@sorki sorki marked this pull request as ready for review November 8, 2023 07:52
@sorki sorki force-pushed the fix/api-version-ryo branch from 2a8013f to 15e0014 Compare November 8, 2023 07:59
@sorki sorki force-pushed the fix/api-version-ryo branch from 6b4e972 to 5937d64 Compare November 8, 2023 08:05
@sorki sorki merged commit 6b3e054 into master Nov 8, 2023
9 checks passed
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.

3 participants