pub mod account;
pub use account::Account;
pub mod activities;
pub use activities::Activities;
pub mod avatars;
pub use avatars::Avatars;
pub mod backups;
pub use backups::Backups;
pub mod databases;
pub use databases::Databases;
pub mod functions;
pub use functions::Functions;
pub mod graphql;
pub use graphql::Graphql;
pub mod health;
pub use health::Health;
pub mod locale;
pub use locale::Locale;
pub mod messaging;
pub use messaging::Messaging;
pub mod project;
pub use project::Project;
pub mod sites;
pub use sites::Sites;
pub mod storage;
pub use storage::Storage;
pub mod tables_db;
pub use tables_db::TablesDB;
pub mod teams;
pub use teams::Teams;
pub mod tokens;
pub use tokens::Tokens;
pub mod users;
pub use users::Users;
pub mod webhooks;
pub use webhooks::Webhooks;
use crate::client::Client;
pub trait Service {
fn client(&self) -> &Client;
}
pub struct Services {
client: Client,
account: Account,
activities: Activities,
avatars: Avatars,
backups: Backups,
databases: Databases,
functions: Functions,
graphql: Graphql,
health: Health,
locale: Locale,
messaging: Messaging,
project: Project,
sites: Sites,
storage: Storage,
tables_db: TablesDB,
teams: Teams,
tokens: Tokens,
users: Users,
webhooks: Webhooks,
}
impl Services {
pub fn new(client: Client) -> Self {
Self {
account: Account::new(&client),
activities: Activities::new(&client),
avatars: Avatars::new(&client),
backups: Backups::new(&client),
databases: Databases::new(&client),
functions: Functions::new(&client),
graphql: Graphql::new(&client),
health: Health::new(&client),
locale: Locale::new(&client),
messaging: Messaging::new(&client),
project: Project::new(&client),
sites: Sites::new(&client),
storage: Storage::new(&client),
tables_db: TablesDB::new(&client),
teams: Teams::new(&client),
tokens: Tokens::new(&client),
users: Users::new(&client),
webhooks: Webhooks::new(&client),
client,
}
}
pub fn client(&self) -> &Client {
&self.client
}
pub fn account(&self) -> &Account {
&self.account
}
pub fn activities(&self) -> &Activities {
&self.activities
}
pub fn avatars(&self) -> &Avatars {
&self.avatars
}
pub fn backups(&self) -> &Backups {
&self.backups
}
pub fn databases(&self) -> &Databases {
&self.databases
}
pub fn functions(&self) -> &Functions {
&self.functions
}
pub fn graphql(&self) -> &Graphql {
&self.graphql
}
pub fn health(&self) -> &Health {
&self.health
}
pub fn locale(&self) -> &Locale {
&self.locale
}
pub fn messaging(&self) -> &Messaging {
&self.messaging
}
pub fn project(&self) -> &Project {
&self.project
}
pub fn sites(&self) -> &Sites {
&self.sites
}
pub fn storage(&self) -> &Storage {
&self.storage
}
pub fn tables_db(&self) -> &TablesDB {
&self.tables_db
}
pub fn teams(&self) -> &Teams {
&self.teams
}
pub fn tokens(&self) -> &Tokens {
&self.tokens
}
pub fn users(&self) -> &Users {
&self.users
}
pub fn webhooks(&self) -> &Webhooks {
&self.webhooks
}
}