Skip to content

Commit 649b70b

Browse files
available metrics
1 parent 8f2d83f commit 649b70b

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

calcbench/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__version__ = '0.0.7'
22
from .api_client import (normalized_data, normalized_dataframe, tickers, set_credentials,
33
companies, normalized_raw, as_reported_raw, breakouts_raw, companies_raw,
4-
company_disclosures, disclosure_text)
4+
company_disclosures, disclosure_text, available_metrics)

calcbench/api_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ def breakouts_raw(company_identifiers=None, metrics=[], start_year=None,
307307
return _json_POST('breakouts', payload)
308308

309309

310-
def tickers(SIC_codes=[], index=None, company_identifiers=[], universe=False):
310+
def tickers(SIC_codes=[], index=None, company_identifiers=[], entire_universe=False):
311311
'''Return a list of tickers in the peer-group'''
312-
companies = _companies(SIC_codes, index, company_identifiers, universe)
312+
companies = _companies(SIC_codes, index, company_identifiers, entire_universe)
313313
tickers = [co['ticker'] for co in companies]
314314
return tickers
315315

@@ -360,6 +360,12 @@ def disclosure_text(network_id):
360360
r = _calcbench_session().get(url, params={'networkID': network_id}, verify=_SESSION_STUFF['ssl_verify'])
361361
r.raise_for_status()
362362
return r.json()
363+
364+
def available_metrics():
365+
url = _SESSION_STUFF['api_url_base'].format('availableMetrics')
366+
r = _calcbench_session().get(url, verify=_SESSION_STUFF['ssl_verify'])
367+
r.raise_for_status()
368+
return r.json()
363369

364370
if __name__ == '__main__':
365371

0 commit comments

Comments
 (0)