-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docs for pagination in /api/v2/metrics endpoint (#416)
Co-authored-by: Sherzod Karimov <sherzod.karimov@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
- Loading branch information
1 parent
bc86586
commit 5d15d77
Showing
15 changed files
with
878 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Get a list of metrics returns "Success" response with pagination | ||
use datadog_api_client::datadog; | ||
use datadog_api_client::datadogV2::api_metrics::ListTagConfigurationsOptionalParams; | ||
use datadog_api_client::datadogV2::api_metrics::MetricsAPI; | ||
use futures_util::pin_mut; | ||
use futures_util::stream::StreamExt; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let configuration = datadog::Configuration::new(); | ||
let api = MetricsAPI::with_config(configuration); | ||
let response = api.list_tag_configurations_with_pagination( | ||
ListTagConfigurationsOptionalParams::default().page_size(2), | ||
); | ||
pin_mut!(response); | ||
while let Some(resp) = response.next().await { | ||
if let Ok(value) = resp { | ||
println!("{:#?}", value); | ||
} else { | ||
println!("{:#?}", resp.unwrap_err()); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.