livekit_api/
lib.rs

1// Copyright 2023 LiveKit, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#[cfg(feature = "access-token")]
16pub mod access_token;
17
18#[cfg(any(feature = "services-tokio", feature = "services-async"))]
19pub mod services;
20
21#[cfg(any(
22    feature = "signal-client-tokio",
23    feature = "signal-client-async",
24    feature = "signal-client-dispatcher"
25))]
26pub mod signal_client;
27
28#[cfg(any(
29    feature = "signal-client-tokio",
30    feature = "signal-client-async",
31    feature = "signal-client-dispatcher",
32    feature = "services-tokio",
33    feature = "services-async"
34))]
35mod http_client;
36
37#[cfg(feature = "webhooks")]
38pub mod webhooks;
39
40#[allow(dead_code)]
41pub(crate) fn get_env_keys() -> Result<(String, String), std::env::VarError> {
42    let api_key = std::env::var("LIVEKIT_API_KEY")?;
43    let api_secret = std::env::var("LIVEKIT_API_SECRET")?;
44    Ok((api_key, api_secret))
45}