Skip to main content

telegram_webapp_sdk/
api.rs

1// SPDX-FileCopyrightText: 2025 RAprogramm <andrey.rozanov.vl@gmail.com>
2// SPDX-License-Identifier: MIT
3
4//! Bindings for the individual Telegram WebApp JavaScript APIs.
5//!
6//! Each submodule wraps one area of the `Telegram.WebApp` interface, from
7//! sensor access and haptic feedback to storage, theming, and viewport
8//! information.
9
10/// Accelerometer sensor: three-axis acceleration readings.
11pub mod accelerometer;
12/// Biometric manager: fingerprint/face authentication and access requests.
13pub mod biometric;
14/// Cloud storage: per-user key-value storage synced across devices.
15pub mod cloud_storage;
16/// Device orientation sensor: orientation angles in degrees.
17pub mod device_orientation;
18/// Device storage: local key-value storage on the current device.
19pub mod device_storage;
20/// WebApp event subscription helpers (`onEvent`/`offEvent`).
21pub mod events;
22/// Gyroscope sensor: angular velocity readings.
23pub mod gyroscope;
24/// Haptic feedback: impact, notification, and selection vibrations.
25pub mod haptic;
26/// Location manager: initialization and geolocation access.
27pub mod location_manager;
28/// Secure storage: encrypted key-value storage that survives reinstalls.
29pub mod secure_storage;
30/// Settings button: control over the WebApp settings button.
31pub mod settings_button;
32/// Theme parameters exposed by the Telegram client.
33pub mod theme;
34/// User data and contact/permission requests.
35pub mod user;
36/// Viewport dimensions and expansion state.
37pub mod viewport;