-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit de88df87 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Apr 4, 2022
1 parent
3ba20b1
commit bd3b2f8
Showing
16 changed files
with
706 additions
and
32 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
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,20 @@ | ||
""" | ||
Submit metrics returns "Payload accepted" response | ||
""" | ||
|
||
from datetime import datetime | ||
from datadog_api_client.v2 import ApiClient, Configuration | ||
from datadog_api_client.v2.api.metrics_api import MetricsApi | ||
from datadog_api_client.v2.model.metric_content_encoding import MetricContentEncoding | ||
from datadog_api_client.v2.model.metrics_payload import MetricsPayload | ||
from datadog_api_client.v2.model.point import Point | ||
from datadog_api_client.v2.model.series import Series | ||
|
||
body = MetricsPayload(series=[Series(metric="system.load.1", points=[Point([datetime.now().timestamp(), 0.7])])]) | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = MetricsApi(api_client) | ||
response = api_instance.submit_metrics(content_encoding=MetricContentEncoding("deflate"), body=body) | ||
|
||
print(response) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.