Skip to content

Commit

Permalink
Merge pull request #174 from p-reuber/allocations
Browse files Browse the repository at this point in the history
add paginated and documents_limited decorator to query_offered_capacity
  • Loading branch information
fboerman authored Mar 21, 2022
2 parents 861f7b0 + 87292b1 commit d2bf86a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions entsoe/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,11 +1443,13 @@ def query_intraday_offered_capacity(
return ts

@year_limited
@paginated
@documents_limited(100)
def query_offered_capacity(
self, country_code_from: Union[Area, str],
self, country_code_from: Union[Area, str],
country_code_to: Union[Area, str], start: pd.Timestamp,
end: pd.Timestamp, contract_marketagreement_type: str,
implicit:bool = True,**kwargs) -> pd.Series:
implicit: bool = True, offset: int = 0, **kwargs) -> pd.Series:
"""
Allocated result documents, for OC evolution see query_intraday_offered_capacity
Note: Result will be in the timezone of the origin country --> to check
Expand All @@ -1461,6 +1463,8 @@ def query_offered_capacity(
contract_marketagreement_type : str
type of contract (see mappings.MARKETAGREEMENTTYPE)
implicit: bool (True = implicit - default for most borders. False = explicit - for instance BE-GB)
offset: int
offset for querying more than 100 documents
Returns
-------
pd.Series
Expand All @@ -1473,7 +1477,8 @@ def query_offered_capacity(
start=start,
end=end,
contract_marketagreement_type=contract_marketagreement_type,
implicit=implicit)
implicit=implicit,
offset=offset)
ts = parse_crossborder_flows(text)
ts = ts.tz_convert(area_from.tz)
ts = ts.truncate(before=start, after=end)
Expand Down

0 comments on commit d2bf86a

Please sign in to comment.