pub mod rest_api;
use crate::common::{
config::ConfigurationRestApi, constants::SIMPLE_EARN_REST_API_PROD_URL, utils::build_user_agent,
};
pub struct SimpleEarnRestApi {}
impl SimpleEarnRestApi {
#[must_use]
pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi {
config.user_agent = build_user_agent("simple-earn");
if config.base_path.is_none() {
config.base_path = Some(SIMPLE_EARN_REST_API_PROD_URL.to_string());
}
rest_api::RestApi::new(config)
}
#[must_use]
pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi {
config.base_path = Some(SIMPLE_EARN_REST_API_PROD_URL.to_string());
SimpleEarnRestApi::from_config(config)
}
}