pub struct Client { /* private fields */ }
Expand description
Client for Edgee API
Version: 1
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl
is the base URL provided to the internal
reqwest::Client
, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client
,
allowing more control over its configuration.
baseurl
is the base URL provided to the internal
reqwest::Client
, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn api_version(&self) -> &'static str
pub fn api_version(&self) -> &'static str
Get the version of this API.
This string is pulled directly from the source OpenAPI document and may be in any format the API selects.
Source§impl Client
impl Client
Sourcepub fn list_api_tokens(&self) -> ListApiTokens<'_>
pub fn list_api_tokens(&self) -> ListApiTokens<'_>
List all ApiTokens
Returns a list of your ApiTokens. The ApiTokens are returned sorted by creation date, with the most recent ApiTokens appearing first.
Sends a GET
request to /v1/api_tokens
let response = client.list_api_tokens()
.body(body)
.send()
.await;
Sourcepub fn create_api_token(&self) -> CreateApiToken<'_>
pub fn create_api_token(&self) -> CreateApiToken<'_>
Create a new ApiToken
Creates a new ApiToken. The ApiToken is returned, including its token
field, which you should record for future reference. Be careful, this token is only returned once, when the token is created.
Sends a POST
request to /v1/api_tokens
let response = client.create_api_token()
.body(body)
.send()
.await;
Sourcepub fn get_api_token(&self) -> GetApiToken<'_>
pub fn get_api_token(&self) -> GetApiToken<'_>
Get an ApiToken
Retrieve an ApiToken that has previously been created.
Sends a GET
request to /v1/api_tokens/{id}
let response = client.get_api_token()
.id(id)
.send()
.await;
Sourcepub fn delete_api_token(&self) -> DeleteApiToken<'_>
pub fn delete_api_token(&self) -> DeleteApiToken<'_>
Delete an ApiToken
Delete an ApiToken that has previously been created. Once deleted, the ApiToken can no longer be used to authenticate requests.
Sends a DELETE
request to /v1/api_tokens/{id}
let response = client.delete_api_token()
.id(id)
.send()
.await;
Sourcepub fn list_organizations(&self) -> ListOrganizations<'_>
pub fn list_organizations(&self) -> ListOrganizations<'_>
List all Organizations
Returns a list of your Organizations. The Organizations are returned sorted by creation date, with the most recent Organizations appearing first.
Sends a GET
request to /v1/organizations
let response = client.list_organizations()
.body(body)
.send()
.await;
Sourcepub fn create_organization(&self) -> CreateOrganization<'_>
pub fn create_organization(&self) -> CreateOrganization<'_>
Create a new Organization
Creates a new Organization.
Sends a POST
request to /v1/organizations
let response = client.create_organization()
.body(body)
.send()
.await;
Sourcepub fn get_my_organization(&self) -> GetMyOrganization<'_>
pub fn get_my_organization(&self) -> GetMyOrganization<'_>
Get my Organization
Retrieve my Organization personal organization.
Sends a GET
request to /v1/organizations/me
let response = client.get_my_organization()
.send()
.await;
Sourcepub fn get_organization(&self) -> GetOrganization<'_>
pub fn get_organization(&self) -> GetOrganization<'_>
Get an Organization
Retrieve an Organization that has previously been created.
Sends a GET
request to /v1/organizations/{id}
let response = client.get_organization()
.id(id)
.send()
.await;
Sourcepub fn update_organization(&self) -> UpdateOrganization<'_>
pub fn update_organization(&self) -> UpdateOrganization<'_>
Update an Organization
Updates an existing Organization.
Sends a POST
request to /v1/organizations/{id}
let response = client.update_organization()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn delete_organization(&self) -> DeleteOrganization<'_>
pub fn delete_organization(&self) -> DeleteOrganization<'_>
Delete an Organization
Deletes an existing Organization.
Sends a DELETE
request to /v1/organizations/{id}
let response = client.delete_organization()
.id(id)
.send()
.await;
Sourcepub fn list_organizations_users(&self) -> ListOrganizationsUsers<'_>
pub fn list_organizations_users(&self) -> ListOrganizationsUsers<'_>
List Users of an organizations
Retrieves all the Users of an organizations.
Sends a GET
request to /v1/organizations/{id}/users
let response = client.list_organizations_users()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn update_organization_user(&self) -> UpdateOrganizationUser<'_>
pub fn update_organization_user(&self) -> UpdateOrganizationUser<'_>
Update a User of an Organization
Updates an existing User of an Organization.
Sends a POST
request to /v1/organizations/{id}/users/{userId}
let response = client.update_organization_user()
.id(id)
.user_id(user_id)
.body(body)
.send()
.await;
Sourcepub fn delete_organization_user(&self) -> DeleteOrganizationUser<'_>
pub fn delete_organization_user(&self) -> DeleteOrganizationUser<'_>
Delete a User from an Organization
Remove an existing User from an Organization.
Sends a DELETE
request to /v1/organizations/{id}/users/{userId}
let response = client.delete_organization_user()
.id(id)
.user_id(user_id)
.send()
.await;
Sourcepub fn list_projects(&self) -> ListProjects<'_>
pub fn list_projects(&self) -> ListProjects<'_>
List all Projects
Returns a list of your Projects. The Projects are returned sorted by creation date, with the most recent Project appearing first.
Sends a GET
request to /v1/projects
let response = client.list_projects()
.body(body)
.send()
.await;
Sourcepub fn create_project(&self) -> CreateProject<'_>
pub fn create_project(&self) -> CreateProject<'_>
Create a new Project
Creates a new Project.
Sends a POST
request to /v1/projects
let response = client.create_project()
.body(body)
.send()
.await;
Sourcepub fn get_project(&self) -> GetProject<'_>
pub fn get_project(&self) -> GetProject<'_>
Get a Project
Retrieve a Project that has previously been created.
Sends a GET
request to /v1/projects/{id}
let response = client.get_project()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn update_project(&self) -> UpdateProject<'_>
pub fn update_project(&self) -> UpdateProject<'_>
Update a Project
Updates an existing Project.
Sends a POST
request to /v1/projects/{id}
let response = client.update_project()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn delete_project(&self) -> DeleteProject<'_>
pub fn delete_project(&self) -> DeleteProject<'_>
Delete a Project
Deletes an existing Project.
Sends a DELETE
request to /v1/projects/{id}
let response = client.delete_project()
.id(id)
.send()
.await;
Sourcepub fn list_project_domains(&self) -> ListProjectDomains<'_>
pub fn list_project_domains(&self) -> ListProjectDomains<'_>
List all Domains
Retrieves all the Domains of a project.
Sends a GET
request to /v1/projects/{id}/domains
let response = client.list_project_domains()
.id(id)
.send()
.await;
Sourcepub fn create_project_domain(&self) -> CreateProjectDomain<'_>
pub fn create_project_domain(&self) -> CreateProjectDomain<'_>
Create a new Domain
Creates a new Domain of a project.
Sends a POST
request to /v1/projects/{id}/domains
let response = client.create_project_domain()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn get_project_domain(&self) -> GetProjectDomain<'_>
pub fn get_project_domain(&self) -> GetProjectDomain<'_>
Get a Domain
Retrieve a Domain that has previously been created.
Sends a GET
request to /v1/projects/{id}/domains/{name}
let response = client.get_project_domain()
.id(id)
.name(name)
.send()
.await;
Sourcepub fn update_project_domain(&self) -> UpdateProjectDomain<'_>
pub fn update_project_domain(&self) -> UpdateProjectDomain<'_>
Update a Domain
Updates an existing Domain.
Sends a POST
request to /v1/projects/{id}/domains/{name}
let response = client.update_project_domain()
.id(id)
.name(name)
.body(body)
.send()
.await;
Sourcepub fn delete_project_domain(&self) -> DeleteProjectDomain<'_>
pub fn delete_project_domain(&self) -> DeleteProjectDomain<'_>
Delete a Domain
Deletes an existing Domain.
Sends a DELETE
request to /v1/projects/{id}/domains/{name}
let response = client.delete_project_domain()
.id(id)
.name(name)
.send()
.await;
Sourcepub fn list_project_proxy_settings(&self) -> ListProjectProxySettings<'_>
pub fn list_project_proxy_settings(&self) -> ListProjectProxySettings<'_>
List Proxy Settings revisions of a project
Retrieves all the Proxy Settings revisions of a project.
Sends a GET
request to /v1/projects/{id}/proxy-settings
let response = client.list_project_proxy_settings()
.id(id)
.send()
.await;
Sourcepub fn create_project_proxy_settings(&self) -> CreateProjectProxySettings<'_>
pub fn create_project_proxy_settings(&self) -> CreateProjectProxySettings<'_>
Create a new ProxySettings
Creates a new ProxySettings.
Sends a POST
request to /v1/projects/{id}/proxy-settings
let response = client.create_project_proxy_settings()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn update_project_proxy_settings(&self) -> UpdateProjectProxySettings<'_>
pub fn update_project_proxy_settings(&self) -> UpdateProjectProxySettings<'_>
Update a ProxySettings by its revision number
Updates a ProxySettings.
Sends a POST
request to /v1/projects/{id}/proxy-settings/{revision}
let response = client.update_project_proxy_settings()
.id(id)
.revision(revision)
.body(body)
.send()
.await;
Sourcepub fn list_project_components(&self) -> ListProjectComponents<'_>
pub fn list_project_components(&self) -> ListProjectComponents<'_>
List all Project Components
Retrieves all the Components of a project.
Sends a GET
request to /v1/projects/{id}/components
let response = client.list_project_components()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn create_project_component(&self) -> CreateProjectComponent<'_>
pub fn create_project_component(&self) -> CreateProjectComponent<'_>
Create a new Project Component
Creates a new Component for a project.
Sends a POST
request to /v1/projects/{id}/components
let response = client.create_project_component()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn get_project_component(&self) -> GetProjectComponent<'_>
pub fn get_project_component(&self) -> GetProjectComponent<'_>
Get a Component of a project
Retrieve a Project Component that has previously been set up.
Sends a GET
request to /v1/projects/{id}/components/{project_component_id}
let response = client.get_project_component()
.id(id)
.project_component_id(project_component_id)
.send()
.await;
Sourcepub fn update_project_component(&self) -> UpdateProjectComponent<'_>
pub fn update_project_component(&self) -> UpdateProjectComponent<'_>
Update a Project Component
Updates an existing Project Component.
Sends a POST
request to /v1/projects/{id}/components/{project_component_id}
let response = client.update_project_component()
.id(id)
.project_component_id(project_component_id)
.body(body)
.send()
.await;
Sourcepub fn delete_project_component(&self) -> DeleteProjectComponent<'_>
pub fn delete_project_component(&self) -> DeleteProjectComponent<'_>
Delete a Project Component
Deletes an existing Project Component.
Sends a DELETE
request to /v1/projects/{id}/components/{project_component_id}
let response = client.delete_project_component()
.id(id)
.project_component_id(project_component_id)
.send()
.await;
Sourcepub fn list_public_components(&self) -> ListPublicComponents<'_>
pub fn list_public_components(&self) -> ListPublicComponents<'_>
List public components
Returns a list of public components.
Sends a GET
request to /v1/components
let response = client.list_public_components()
.body(body)
.send()
.await;
Sourcepub fn get_component(&self) -> GetComponent<'_>
pub fn get_component(&self) -> GetComponent<'_>
Get a Component
Retrieve a Component.
Sends a GET
request to /v1/components/{id}
let response = client.get_component()
.id(id)
.send()
.await;
Sourcepub fn update_component(&self) -> UpdateComponent<'_>
pub fn update_component(&self) -> UpdateComponent<'_>
Update a Component
Updates an existing Component.
Sends a PUT
request to /v1/components/{id}
let response = client.update_component()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn create_component_version(&self) -> CreateComponentVersion<'_>
pub fn create_component_version(&self) -> CreateComponentVersion<'_>
Create a Component Version
Create a Component Version.
Sends a POST
request to /v1/components/{id}/versions
let response = client.create_component_version()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn update_component_version(&self) -> UpdateComponentVersion<'_>
pub fn update_component_version(&self) -> UpdateComponentVersion<'_>
Update a Component Version
Update a Component Version.
Sends a PUT
request to /v1/components/{id}/versions/{versionId}
let response = client.update_component_version()
.id(id)
.version_id(version_id)
.body(body)
.send()
.await;
Sourcepub fn list_organization_components(&self) -> ListOrganizationComponents<'_>
pub fn list_organization_components(&self) -> ListOrganizationComponents<'_>
List organization components
Returns a list of organization components.
Sends a GET
request to /v1/organizations/{id}/components
let response = client.list_organization_components()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn create_component(&self) -> CreateComponent<'_>
pub fn create_component(&self) -> CreateComponent<'_>
Create a Component
Create a Component.
Sends a POST
request to /v1/organizations/{id}/components
let response = client.create_component()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn list_invitations(&self) -> ListInvitations<'_>
pub fn list_invitations(&self) -> ListInvitations<'_>
List all Invitations
Returns a list of the invitation of your organizations. The Invitations are returned sorted by creation date, with the most recent Invitation appearing first.
Sends a GET
request to /v1/invitations
let response = client.list_invitations()
.body(body)
.send()
.await;
Sourcepub fn create_invitation(&self) -> CreateInvitation<'_>
pub fn create_invitation(&self) -> CreateInvitation<'_>
Create a new Invitation
Creates a new Invitation.
Sends a POST
request to /v1/invitations
let response = client.create_invitation()
.body(body)
.send()
.await;
Sourcepub fn get_invitation(&self) -> GetInvitation<'_>
pub fn get_invitation(&self) -> GetInvitation<'_>
Get an Invitation
Retrieve an Invitation that has previously been created.
Sends a GET
request to /v1/invitations/{id}
let response = client.get_invitation()
.id(id)
.send()
.await;
Sourcepub fn delete_invitation(&self) -> DeleteInvitation<'_>
pub fn delete_invitation(&self) -> DeleteInvitation<'_>
Delete an Invitation
Deletes an existing Invitation.
Sends a DELETE
request to /v1/invitations/{id}
let response = client.delete_invitation()
.id(id)
.send()
.await;
Sourcepub fn get_me(&self) -> GetMe<'_>
pub fn get_me(&self) -> GetMe<'_>
Get my User object
Retrieves my current User object.
Sends a GET
request to /v1/users/me
let response = client.get_me()
.send()
.await;
Sourcepub fn get_user(&self) -> GetUser<'_>
pub fn get_user(&self) -> GetUser<'_>
Get a User
Retrieve a User that has previously been created.
Sends a GET
request to /v1/users/{id}
let response = client.get_user()
.id(id)
.send()
.await;
Sourcepub fn get_incoming_data_collection_events(
&self,
) -> GetIncomingDataCollectionEvents<'_>
pub fn get_incoming_data_collection_events( &self, ) -> GetIncomingDataCollectionEvents<'_>
List all Incoming Data Collection Events
Retrieves all the Incoming Data Collection Events of a project.
Sends a GET
request to /v1/projects/{id}/debug/data-collection/incoming
let response = client.get_incoming_data_collection_events()
.id(id)
.body(body)
.send()
.await;
Sourcepub fn get_outgoing_data_collection_events(
&self,
) -> GetOutgoingDataCollectionEvents<'_>
pub fn get_outgoing_data_collection_events( &self, ) -> GetOutgoingDataCollectionEvents<'_>
List all Outgoing Data Collection Events
Retrieves all the Outgoing Data Collection Events of a project.
Sends a GET
request to /v1/projects/{id}/debug/data-collection/outgoing/{event_id}
let response = client.get_outgoing_data_collection_events()
.id(id)
.event_id(event_id)
.body(body)
.send()
.await;