pub struct DomainObjectsResource<'a> { /* private fields */ }Expand description
client.domain_objects()
Implementations§
Source§impl<'a> DomainObjectsResource<'a>
impl<'a> DomainObjectsResource<'a>
Sourcepub fn list(
&self,
query: &GetDomainobjectsQuery,
) -> Result<Vec<ResolvedDomainObject>>
pub fn list( &self, query: &GetDomainobjectsQuery, ) -> Result<Vec<ResolvedDomainObject>>
Get domain objects
GET /domainobjects
Resolves heterogeneous ChurchTools references into compact display objects. Pair domain_types[] and domain_identifiers[] by index. Output order and count may differ from the input, and repeated IDs may not produce repeated results. Missing or inaccessible objects are usually omitted, but an unresolved appointment_occurrence may fail the request. Resolver permissions differ by domain type.
§Example
let query = GetDomainobjectsQuery {
domain_types: Some(vec!["person".into(), "group".into()]),
domain_identifiers: Some(vec!["42".into(), "7".into()]),
..Default::default()
};
for domain_object in client.domain_objects().list(&query)? {
println!("{:?}", domain_object.api_url);
}Sourcepub fn resolve(
&self,
body: &DomainObjectPayload,
) -> Result<Vec<ResolvedDomainObject>>
pub fn resolve( &self, body: &DomainObjectPayload, ) -> Result<Vec<ResolvedDomainObject>>
Resolve domain objects from a JSON payload
POST /domainobjects
Read-only JSON alternative to GET /domainobjects with the same resolution and permission behavior. Output order and count may differ from the input. Missing or inaccessible objects are usually omitted, but an unresolved appointment_occurrence may fail the request.
§Example
let body = models::DomainObjectPayload {
domain_identifiers: vec!["42".into(), "7".into()],
domain_types: vec!["person".into(), "group".into()],
..Default::default()
};
for domain_object in client.domain_objects().resolve(&body)? {
println!("{:?}", domain_object.api_url);
}