pub struct AddressesResource<'a> { /* private fields */ }Expand description
client.addresses()
Implementations§
Source§impl<'a> AddressesResource<'a>
impl<'a> AddressesResource<'a>
Sourcepub fn create(
&self,
domain_type: impl Display,
domain_identifier: impl Display,
body: &GroupAddressCreate,
) -> Result<StoredAddress>
pub fn create( &self, domain_type: impl Display, domain_identifier: impl Display, body: &GroupAddressCreate, ) -> Result<StoredAddress>
Create an address for a domain object
POST /addresses/{domainType}/{domainIdentifier}
Creates another stored meeting-place address for the group. Only domainType=group is registered. Requires permission to edit the group’s meeting-place field (treffpunkt). Ownership and address ID are supplied in the path. Coordinates are accepted as numbers or decimal strings and returned as strings or null. The request does not geocode a postal address automatically.
§Example
let body = models::GroupAddressCreate {
name: Some(Some("Retreat Center".into())),
..Default::default()
};
let result = client.addresses().create("group", "42", &body)?;
println!("{:?}", result.name);Sourcepub fn delete(
&self,
domain_type: impl Display,
domain_identifier: impl Display,
address_id: impl Display,
) -> Result<()>
pub fn delete( &self, domain_type: impl Display, domain_identifier: impl Display, address_id: impl Display, ) -> Result<()>
Delete an address
DELETE /addresses/{domainType}/{domainIdentifier}/{addressId}
Deletes the stored address identified by addressId. Only domainType=group is registered. Requires permission to edit the meeting-place field (treffpunkt) of the group in the path. The group itself remains. This operation has no dry-run mode; an unknown address ID returns 404.
§Example
client.addresses().delete("group", "42", 7)?;Sourcepub fn get(
&self,
domain_type: impl Display,
domain_identifier: impl Display,
) -> Result<Vec<StoredAddress>>
pub fn get( &self, domain_type: impl Display, domain_identifier: impl Display, ) -> Result<Vec<StoredAddress>>
Get addresses by domain object
GET /addresses/{domainType}/{domainIdentifier}
Returns stored meeting-place addresses for the group in the path. Only domainType=group is currently registered for this endpoint. Requires permission to view the group. The list is unpaginated, with no guaranteed order; meta.count is the number of addresses returned. An existing group without addresses returns an empty list.
§Example
for address in client.addresses().get("group", "42")? {
println!("{:?}", address.name);
}Sourcepub fn list_search(
&self,
query: &GetAddressesSearchQuery,
) -> Result<Vec<AddressSearchResult>>
pub fn list_search( &self, query: &GetAddressesSearchQuery, ) -> Result<Vec<AddressSearchResult>>
Search for addresses
GET /addresses/search
Searches for addresses across persons and a global geocoding service (e.g. Nominatim/Photon). Returns matching results from both sources. The query must be at least 2 characters long.
§Example
let query = GetAddressesSearchQuery {
query: Some("Musterstraße".into()),
..Default::default()
};
for search in client.addresses().list_search(&query)? {
println!("{:?}", search);
}Sourcepub fn update(
&self,
domain_type: impl Display,
domain_identifier: impl Display,
address_id: impl Display,
body: &GroupAddressUpdate,
) -> Result<StoredAddress>
pub fn update( &self, domain_type: impl Display, domain_identifier: impl Display, address_id: impl Display, body: &GroupAddressUpdate, ) -> Result<StoredAddress>
Update an address
PUT /addresses/{domainType}/{domainIdentifier}/{addressId}
Replaces a stored meeting-place address. Omitted body fields are cleared; send all values to retain. Only domainType=group is registered. Requires permission to edit the group’s meeting-place field (treffpunkt). Ownership and address ID are supplied in the path. Coordinates are accepted as numbers or decimal strings and returned as strings or null. The request does not geocode a postal address automatically.
§Example
let body = models::GroupAddressUpdate {
name: Some(Some("Retreat Center".into())),
..Default::default()
};
let result = client.addresses().update("group", "42", 7, &body)?;
println!("{:?}", result.name);