Skip to content

Commit 2cf9d5d

Browse files
VoxHashUnCarnavalScarlettHelp
committed
Minor updates
Co-Authored-By: UnCarnaval <100311079+UnCarnaval@users.noreply.github.com> Co-Authored-By: Scarlett <269428575+ScarlettHelp@users.noreply.github.com>
1 parent a6eaf95 commit 2cf9d5d

15 files changed

Lines changed: 43 additions & 31 deletions

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ await client.start_webhook_listener()
166166

167167
## 📚 API Endpoints
168168

169-
All endpoints automatically use the `/v1` prefix when connecting to `https://api.licensechain.app`.
169+
Use the canonical API base URL `https://api.licensechain.app/v1`. The SDK also accepts the root host and normalizes requests to the same API version.
170170

171171
### Base URL
172172
- **Production**: `https://api.licensechain.app/v1`
@@ -187,7 +187,7 @@ All endpoints automatically use the `/v1` prefix when connecting to `https://api
187187
| `POST` | `/v1/webhooks` | Create webhook |
188188
| `GET` | `/v1/analytics` | Get analytics |
189189

190-
**Note**: The SDK automatically prepends `/v1` to all endpoints, so you only need to specify the path (e.g., `/auth/login` instead of `/v1/auth/login`).
190+
**Note**: The SDK accepts either the root host or the canonical `/v1` base and normalizes endpoint requests automatically.
191191

192192
## 📚 API Reference
193193

@@ -200,7 +200,7 @@ config = LicenseChainConfig(
200200
api_key="your-api-key",
201201
app_name="your-app-name",
202202
version="1.0.0",
203-
base_url="https://api.licensechain.app" # Optional
203+
base_url="https://api.licensechain.app/v1" # Optional
204204
)
205205

206206
client = LicenseChainClient(config)
@@ -417,7 +417,7 @@ export LICENSECHAIN_APP_NAME=your-app-name
417417
export LICENSECHAIN_APP_VERSION=1.0.0
418418

419419
# Optional
420-
export LICENSECHAIN_BASE_URL=https://api.licensechain.app
420+
export LICENSECHAIN_BASE_URL=https://api.licensechain.app/v1
421421
export LICENSECHAIN_DEBUG=true
422422
```
423423

@@ -428,7 +428,7 @@ config = LicenseChainConfig(
428428
api_key="your-api-key",
429429
app_name="your-app-name",
430430
version="1.0.0",
431-
base_url="https://api.licensechain.app",
431+
base_url="https://api.licensechain.app/v1",
432432
timeout=30, # Request timeout in seconds
433433
retries=3, # Number of retry attempts
434434
debug=False, # Enable debug logging
@@ -1018,7 +1018,7 @@ except LicenseChainException as e:
10181018
| Parameter | Type | Default | Description |
10191019
|-----------|------|---------|-------------|
10201020
| `api_key` | str | Required | Your LicenseChain API key |
1021-
| `base_url` | str | `https://api.licensechain.app` | API base URL |
1021+
| `base_url` | str | `https://api.licensechain.app/v1` | API base URL |
10221022
| `timeout` | int | 30 | Request timeout in seconds |
10231023
| `retry_attempts` | int | 3 | Number of retry attempts |
10241024
| `retry_delay` | float | 1.0 | Delay between retries in seconds |

examples/advanced_analytics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def main():
2525
api_key = os.getenv('LICENSECHAIN_API_KEY', 'your-api-key-here')
2626
client = LicenseChainClient(
2727
api_key=api_key,
28-
base_url='https://api.licensechain.app',
28+
base_url='https://api.licensechain.app/v1',
2929
timeout=30,
3030
retry_attempts=3,
3131
)

examples/basic_analytics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def main():
2525
api_key = os.getenv('LICENSECHAIN_API_KEY', 'your-api-key-here')
2626
client = LicenseChainClient(
2727
api_key=api_key,
28-
base_url='https://api.licensechain.app',
28+
base_url='https://api.licensechain.app/v1',
2929
timeout=30,
3030
retry_attempts=3,
3131
)

examples/basic_usage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main():
3333
# Initialize the client
3434
client = Client(
3535
api_key='your-api-key-here',
36-
base_url='https://api.licensechain.app',
36+
base_url='https://api.licensechain.app/v1',
3737
timeout=30,
3838
retries=3
3939
)

examples/licenses_comprehensive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def main():
2525
api_key = os.getenv('LICENSECHAIN_API_KEY', 'your-api-key-here')
2626
client = LicenseChainClient(
2727
api_key=api_key,
28-
base_url='https://api.licensechain.app',
28+
base_url='https://api.licensechain.app/v1',
2929
timeout=30,
3030
retry_attempts=3,
3131
)

examples/products_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def main():
2424
api_key = os.getenv('LICENSECHAIN_API_KEY', 'your-api-key-here')
2525
client = LicenseChainClient(
2626
api_key=api_key,
27-
base_url='https://api.licensechain.app',
27+
base_url='https://api.licensechain.app/v1',
2828
timeout=30,
2929
retry_attempts=3,
3030
)

examples/secure_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(
5454
api_key: str,
5555
license_key: str,
5656
app_id: Optional[str] = None,
57-
base_url: str = "https://api.licensechain.app",
57+
base_url: str = "https://api.licensechain.app/v1",
5858
validation_interval: int = 300, # Re-validate every 5 minutes
5959
):
6060
"""

examples/teams_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def main():
2424
api_key = os.getenv('LICENSECHAIN_API_KEY', 'your-api-key-here')
2525
client = LicenseChainClient(
2626
api_key=api_key,
27-
base_url='https://api.licensechain.app',
27+
base_url='https://api.licensechain.app/v1',
2828
timeout=30,
2929
retry_attempts=3,
3030
)

examples/test_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424

2525

26-
async def test_api_connection(api_key: str, base_url: str = "https://api.licensechain.app"):
26+
async def test_api_connection(api_key: str, base_url: str = "https://api.licensechain.app/v1"):
2727
"""Test basic API connection."""
2828
print("🔍 Testing API Connection...")
2929

examples/test_licenses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async def main():
165165
# Initialize client
166166
client = LicenseChainClient(
167167
api_key=api_key,
168-
base_url="https://api.licensechain.app",
168+
base_url="https://api.licensechain.app/v1",
169169
timeout=30,
170170
)
171171

0 commit comments

Comments
 (0)