From efa3bf5df6d02bb42bd4e68f8625c5647e417bd1 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 26 Nov 2024 14:04:06 +0100 Subject: [PATCH] Document `setEnabled` [doc only] --- docs/user/reference/pings/index.md | 78 ++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/docs/user/reference/pings/index.md b/docs/user/reference/pings/index.md index 057a13ea5f..7d7b177686 100644 --- a/docs/user/reference/pings/index.md +++ b/docs/user/reference/pings/index.md @@ -108,6 +108,84 @@ GleanPings.search.submit("performed"); {{#include ../../../shared/tab_footer.md}} +### `setEnabled` + +TODO + +{{#include ../../../shared/tab_header.md}} + +
+ +```kotlin +import org.mozilla.yourApplication.GleanMetrics.Pings + +Pings.search.setEnabled(false) +``` + +
+ +
+ +```java +import org.mozilla.yourApplication.GleanMetrics.Pings + +Pings.INSTANCE.search.setEnabled(false); +``` + +
+ +
+ +```swift +import Glean + +GleanMetrics.Pings.shared.search.setEnabled(false) +``` + +
+ +
+ +```Python +from glean import load_pings + +pings = load_pings("pings.yaml") + +pings.search.set_enabled(False) +``` + +
+ +
+ +```Rust +use glean::Pings; + +pings::search.set_enabled(false); +``` + +
+ +
+ +
+ +**C++** + +```cpp +mozilla::glean_pings::Search.SetEnabled(false); +``` + +**JavaScript** + +```js +GleanPings.search.setEnabled(false); +``` + +
+ +{{#include ../../../shared/tab_footer.md}} + ## Testing API ### `getRegisteredPingNames`