pub struct DataverseClient { /* private fields */ }Expand description
HTTP client for the Dataverse OData Web API.
Provides methods for:
- Initial change tracking requests (equivalent to
RetrieveEntityChangesRequestwithoutDataVersion) - Delta polling (equivalent to
RetrieveEntityChangesRequestwithDataVersion) - Standard data retrieval for bootstrap
Implementations§
Source§impl DataverseClient
impl DataverseClient
Sourcepub fn new(
environment_url: &str,
api_version: &str,
identity_provider: Arc<dyn IdentityProvider>,
) -> Self
pub fn new( environment_url: &str, api_version: &str, identity_provider: Arc<dyn IdentityProvider>, ) -> Self
Create a new Dataverse client.
§Arguments
environment_url- Dataverse environment URL (e.g.,https://myorg.crm.dynamics.com)api_version- Web API version (e.g.,v9.2)identity_provider- Identity provider for authentication
Sourcepub async fn initial_change_tracking(
&self,
entity_set_name: &str,
select: Option<&str>,
) -> Result<ODataDeltaResponse>
pub async fn initial_change_tracking( &self, entity_set_name: &str, select: Option<&str>, ) -> Result<ODataDeltaResponse>
Perform an initial change tracking request for an entity.
This is the Web API equivalent of executing RetrieveEntityChangesRequest
without a DataVersion – it returns all current records plus an initial
delta token for subsequent change tracking.
Equivalent to the platform’s GetCurrentDeltaToken() method which pages
through all initial data.
§Arguments
entity_set_name- The entity set name (plural, e.g.,accounts)select- Optional$selectclause for column filtering
Sourcepub async fn follow_delta_link(
&self,
delta_link: &str,
) -> Result<ODataDeltaResponse>
pub async fn follow_delta_link( &self, delta_link: &str, ) -> Result<ODataDeltaResponse>
Follow a delta link to poll for changes.
This is the Web API equivalent of executing RetrieveEntityChangesRequest
with DataVersion set to a previously obtained delta token.
Maps directly to the platform’s GetChanges(deltaToken) method.
§Arguments
delta_link- The delta link URL from a previous response
Sourcepub async fn follow_next_link(
&self,
next_link: &str,
) -> Result<ODataDeltaResponse>
pub async fn follow_next_link( &self, next_link: &str, ) -> Result<ODataDeltaResponse>
Follow a next link for pagination within a response.
Equivalent to following the platform’s PagingCookie for additional pages.
§Arguments
next_link- The next link URL from the current page
Sourcepub async fn get_entity_data(
&self,
entity_set_name: &str,
select: Option<&str>,
) -> Result<ODataDeltaResponse>
pub async fn get_entity_data( &self, entity_set_name: &str, select: Option<&str>, ) -> Result<ODataDeltaResponse>
Retrieve all records from an entity (for bootstrap).
Sends a standard GET request without change tracking headers. Used by the bootstrap provider to load initial data.
§Arguments
entity_set_name- The entity set name (plural, e.g.,accounts)select- Optional$selectclause for column filtering
Sourcepub fn api_version(&self) -> &str
pub fn api_version(&self) -> &str
Get the API version.