Skip to content

Commit c1e550e

Browse files
committed
wrapper for get_instruments_from_url
1 parent f2d84d8 commit c1e550e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

harmony_api/routers/text_router.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
CacheResponse,
4848
SearchInstrumentsResponse,
4949
)
50+
from harmony.util.url_loader import load_instruments_from_url
5051

5152
from harmony.schemas.enums.clustering_algorithms import ClusteringAlgorithm
5253
from harmony_api import helpers, dependencies, constants
@@ -435,3 +436,9 @@ def search_instruments(
435436
]
436437

437438
return SearchInstrumentsResponse(instruments=instruments)
439+
440+
@router.get(
441+
path="/get_instruments_from_url", status_code=status.HTTP_200_OK, response_model_exclude_none=True
442+
)
443+
def get_instruments_from_url(url: str) -> List[Instrument]:
444+
return load_instruments_from_url(url)

0 commit comments

Comments
 (0)