Skip to content

feat: make blocsync the default server#7

Merged
mtwichel merged 3 commits into
mainfrom
feat/make-blocsync-the-default-server
Aug 3, 2025
Merged

feat: make blocsync the default server#7
mtwichel merged 3 commits into
mainfrom
feat/make-blocsync-the-default-server

Conversation

@mtwichel

@mtwichel mtwichel commented Aug 3, 2025

Copy link
Copy Markdown
Owner

Status

READY

Description

This pull request updates the ApiClient class in blocsync/lib/src/api_client.dart to improve usability and simplify the initialization process. The most important change is the replacement of the baseUrl parameter with a default string value, along with adjustments to how host, port, and secure are derived.

Updates to ApiClient initialization:

  • The baseUrl parameter now defaults to 'https://api.blocsync.dev' instead of requiring a Uri object during initialization. This simplifies the instantiation of ApiClient for common use cases.
  • host, port, and secure are now derived by parsing the baseUrl string using Uri.parse(baseUrl). This ensures consistent handling of the base URL and avoids requiring the caller to pass a Uri.
  • The port field type has been updated from int to int? to accommodate cases where the port might not be explicitly specified in the URL.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore
  • 🧪 Test

@mtwichel mtwichel self-assigned this Aug 3, 2025
@mtwichel
mtwichel merged commit 00feb6d into main Aug 3, 2025
0 of 2 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.

1 participant