Revert "Add Kaggle platform support and path transformation"
This reverts commit 1480595fbc.
This commit is contained in:
1 parent
3469e3f8d6
commit
2166f02cb8
3 files changed
+1
-86
No files matched your search
@@ -38,7 +38,6 @@ export const PLATFORMS = {
|
||||
arch: 'https://geo.mirror.pkgbuild.com',
|
||||
arxiv: 'https://arxiv.org',
|
||||
fdroid: 'https://f-droid.org',
|
||||
kaggle: 'https://www.kaggle.com',
|
||||
|
||||
// AI Inference Providers
|
||||
'ip-openai': 'https://api.openai.com',
|
||||
@@ -158,24 +157,5 @@ export function transformPath(path, platformKey) {
|
||||
}
|
||||
}
|
||||
|
||||
// Special handling for Kaggle API paths
|
||||
if (platformKey === 'kaggle') {
|
||||
// Transform paths to include the API prefix
|
||||
if (transformedPath.startsWith('/')) {
|
||||
// Handle different Kaggle API endpoints:
|
||||
// /datasets/download/owner/dataset-slug -> /api/v1/datasets/download/owner/dataset-slug
|
||||
// /competitions/data/download/competition-name -> /api/v1/competitions/data/download/competition-name
|
||||
// /datasets/list -> /api/v1/datasets/list
|
||||
// /competitions/list -> /api/v1/competitions/list
|
||||
// /models/list -> /api/v1/models/list
|
||||
// /kernels/list -> /api/v1/kernels/list
|
||||
|
||||
// Add API prefix if not already present
|
||||
if (!transformedPath.startsWith('/api/v1/')) {
|
||||
transformedPath = `/api/v1${transformedPath}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return transformedPath;
|
||||
}
|
||||
Reference in new issue
Block a user