Total Complexity | 1 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from datetime import datetime |
||
|
|||
2 | |||
3 | import requests |
||
4 | |||
5 | from alphavantage.reference import BASE_URL |
||
6 | |||
7 | |||
8 | def get(session: requests.Session, parameters=None, url=BASE_URL): |
||
9 | """Request data as JSON.""" |
||
10 | |||
11 | response = session.get(url, params=parameters) |
||
12 | retrieved_at = datetime.utcnow() |
||
13 | |||
14 | return response.json(), retrieved_at |
||
15 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.