This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# ***************************************************************************** | ||
# | ||
# Copyright (c) 2022, the pyEX authors. | ||
# | ||
# This file is part of the pyEX library, distributed under the terms of | ||
# the Apache License 2.0. The full license can be found in the LICENSE file. | ||
# | ||
from functools import wraps | ||
import pandas as pd | ||
from ..common import _get | ||
|
||
|
||
def queryMetadata( | ||
id="", key="", subkey="", token="", version="stable", filter="", format="json" | ||
): | ||
"""Get inventory of available time series endpoints | ||
Args: | ||
id (str): Timeseries ID | ||
key (str): Timeseries Key | ||
subkey (str): Timeseries Subkey | ||
token (str): Access token | ||
version (str): API version | ||
filter (str): https://iexcloud.io/docs/api/#filter-results | ||
format (str): output format | ||
""" | ||
url = "metadata/time-series" | ||
if id: | ||
url += "/{}".format(id) | ||
if key: | ||
url += "/{}".format(key) | ||
if subkey: | ||
url += "/{}".format(subkey) | ||
return _get(url, token=token, version=version, filter=filter, format=format) | ||
|
||
|
||
@wraps(queryMetadata) | ||
def queryMetadataDF(*args, **kwargs): | ||
return pd.DataFrame(queryMetadata(*args, **kwargs)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters