Skip to content

Commit

Permalink
Fix timeseries data routes docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Jun 20, 2024
1 parent e34cf6b commit 0f32f05
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions src/bemserver_api/resources/timeseries_data/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,13 @@ def get(args):
Returns data in either JSON or CSV format.
JSON: each key is a timestamp ID as string. For each timeseries, values are
passed a {timestamp: value} mappings.
JSON: Each key is a timeseries ID as string. For each timeseries, values are
passed as {timestamp: value} mappings.
CSV: The first column is the timestamp and each other column is a timeseries data.
Column headers are timeseries IDs.
CSV: the first column is the timestamp as timezone aware datetime and each
other column is a timeseries data. Column headers are timeseries IDs.
In both cases, timestamps are timezone aware datetimes.
"""
mime_type = flask.request.headers.get("Accept", "application/json")

Expand Down Expand Up @@ -263,11 +265,13 @@ def get_aggregate(args):
Returns data in either JSON or CSV format.
JSON: each key is a timestamp ID as string. For each timeseries, values are
passed a {timestamp: value} mappings.
JSON: Each key is a timeseries ID as string. For each timeseries, values are
passed as {timestamp: value} mappings.
CSV: The first column is the timestamp and each other column is a timeseries data.
Column headers are timeseries IDs.
CSV: the first column is the timestamp as timezone aware datetime and each
other column is a timeseries data. Column headers are timeseries IDs.
In both cases, timestamps are timezone aware datetimes.
"""
mime_type = flask.request.headers.get("Accept", "application/json")

Expand Down Expand Up @@ -333,8 +337,13 @@ def post(args):
Loads data in either JSON or CSV format.
JSON: each key is a timestamp ID as string. For each timeseries, values are
JSON: Each key is a timeseries ID as string. For each timeseries, values are
passed as {timestamp: value} mappings.
CSV: The first column is the timestamp and each other column is a timeseries data.
Column headers are timeseries IDs.
In both cases, timestamps are timezone aware datetimes.
"""
mime_type = flask.request.headers.get("content-type", "application/json")

Expand Down Expand Up @@ -411,11 +420,13 @@ def get_for_campaign(args, campaign_id):
Returns data in either JSON or CSV format.
JSON: each key is a timestamp name as string. For each timeseries, values
are passed a {timestamp: value} mappings.
JSON: Each key is a timeseries name as string. For each timeseries, values are
passed as {timestamp: value} mappings.
CSV: The first column is the timestamp and each other column is a timeseries data.
Column headers are timeseries names.
CSV: the first column is the timestamp as timezone aware datetime and each
other column is a timeseries data. Column headers are timeseries names.
In both cases, timestamps are timezone aware datetimes.
"""
mime_type = flask.request.headers.get("Accept", "application/json")

Expand Down Expand Up @@ -462,11 +473,13 @@ def get_aggregate_for_campaign(args, campaign_id):
Returns data in either JSON or CSV format.
JSON: each key is a timestamp name as string. For each timeseries, values
are passed a {timestamp: value} mappings.
JSON: Each key is a timeseries name as string. For each timeseries, values are
passed as {timestamp: value} mappings.
CSV: The first column is the timestamp and each other column is a timeseries data.
Column headers are timeseries names.
CSV: the first column is the timestamp as timezone aware datetime and each
other column is a timeseries data. Column headers are timeseries names.
In both cases, timestamps are timezone aware datetimes.
"""
mime_type = flask.request.headers.get("Accept", "application/json")

Expand Down Expand Up @@ -533,8 +546,13 @@ def post_for_campaign(args, campaign_id):
Loads data in either JSON or CSV format.
JSON: each key is a timestamp ID as string. For each timeseries, values are
JSON: Each key is a timeseries name as string. For each timeseries, values are
passed as {timestamp: value} mappings.
CSV: The first column is the timestamp and each other column is a timeseries data.
Column headers are timeseries names.
In both cases, timestamps are timezone aware datetimes.
"""
mime_type = flask.request.headers.get("content-type", "application/json")

Expand Down

0 comments on commit 0f32f05

Please sign in to comment.