wasmer_api/
lib.rs

1// Allowed because it makes code more readable.
2#![allow(clippy::bool_comparison, clippy::match_like_matches_macro)]
3
4mod client;
5mod error;
6
7pub mod global_id;
8pub mod query;
9pub mod stream;
10pub mod types;
11
12use url::Url;
13
14pub use self::{client::WasmerClient, error::GraphQLApiFailure};
15
16/// Api endpoint for the dev environment.
17pub const ENDPOINT_DEV: &str = "https://registry.wasmer.wtf/graphql";
18/// Api endpoint for the prod environment.
19pub const ENDPOINT_PROD: &str = "https://registry.wasmer.io/graphql";
20
21/// API endpoint for the dev environment.
22pub fn endpoint_dev() -> Url {
23    Url::parse(ENDPOINT_DEV).unwrap()
24}
25
26/// API endpoint for the prod environment.
27pub fn endpoint_prod() -> Url {
28    Url::parse(ENDPOINT_PROD).unwrap()
29}