pub struct People(/* private fields */);Expand description
Combined schema for operations on a group of Persons.
Implementations§
Source§impl People
impl People
Sourcepub fn iter<'a>(
&'a self,
client: &'a dyn Client,
) -> Result<PagedCollection<'a, PersonPage>, Error>
pub fn iter<'a>( &'a self, client: &'a dyn Client, ) -> Result<PagedCollection<'a, PersonPage>, Error>
Get a paged collection of PersonPage.
Sourcepub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>
pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>
Retrieve the WADL description for this resource.
This method fetches the WADL (Web Application Description Language) specification for the current resource, allowing for runtime API discovery.
§Returns
Returns the wadl::ast::Resource definition on success, or an error if the request fails.
Sourcepub fn get_by_email<'a>(
&self,
client: &'a dyn Client,
email: &str,
) -> Result<PersonFull, Error>
pub fn get_by_email<'a>( &self, client: &'a dyn Client, email: &str, ) -> Result<PersonFull, Error>
Sourcepub fn find<'a>(
&self,
client: &'a dyn Client,
text: &str,
) -> Result<PagedCollection<'a, PersonPage>, Error>
pub fn find<'a>( &self, client: &'a dyn Client, text: &str, ) -> Result<PagedCollection<'a, PersonPage>, Error>
Return all non-merged Persons and Teams whose name, displayname or email address match <text>.
The results will be ordered using the default ordering specified in Person._defaultOrder.
While we don’t have Full Text Indexes in the emailaddress table, we’ll be trying to match the text only against the beginning of an email address.
§Arguments
text: Search text
§Returns
Returns crate::blocking::page::PagedCollection<'a, PersonPage> on success, or an error if the request fails.
Sourcepub fn find_person<'a>(
&self,
client: &'a dyn Client,
text: &str,
created_after: Option<&DateTime<Utc>>,
created_before: Option<&DateTime<Utc>>,
) -> Result<PagedCollection<'a, PersonPage>, Error>
pub fn find_person<'a>( &self, client: &'a dyn Client, text: &str, created_after: Option<&DateTime<Utc>>, created_before: Option<&DateTime<Utc>>, ) -> Result<PagedCollection<'a, PersonPage>, Error>
Return all non-merged Persons with at least one email address whose name, displayname or email address match <text>.
If text is an empty string, all persons with at least one email address will be returned.
The results will be ordered using the default ordering specified in Person._defaultOrder.
If exclude_inactive_accounts is True, any accounts whose account_status is any of INACTIVE_ACCOUNT_STATUSES will not be in the returned set.
If must_have_email is True, only people with one or more email addresses are returned.
While we don’t have Full Text Indexes in the emailaddress table, we’ll be trying to match the text only against the beginning of an email address.
If created_before or created_after are not None, they are used to restrict the search to the dates provided.
§Arguments
text: Search textcreated_after: Created aftercreated_before: Created before
§Returns
Returns crate::blocking::page::PagedCollection<'a, PersonPage> on success, or an error if the request fails.
Sourcepub fn find_team<'a>(
&self,
client: &'a dyn Client,
text: &str,
) -> Result<PagedCollection<'a, PersonPage>, Error>
pub fn find_team<'a>( &self, client: &'a dyn Client, text: &str, ) -> Result<PagedCollection<'a, PersonPage>, Error>
Return all Teams whose name, displayname or email address match <text>.
The results will be ordered using the default ordering specified in Person._defaultOrder.
While we don’t have Full Text Indexes in the emailaddress table, we’ll be trying to match the text only against the beginning of an email address.
§Arguments
text: Search text
§Returns
Returns crate::blocking::page::PagedCollection<'a, PersonPage> on success, or an error if the request fails.
Sourcepub fn new_team<'a>(
&self,
client: &'a dyn Client,
name: &str,
display_name: &str,
team_description: Option<&str>,
default_membership_period: Option<&usize>,
default_renewal_period: Option<&usize>,
subscription_policy: Option<&SubscriptionPolicy>,
membership_policy: Option<&SubscriptionPolicy>,
) -> Result<Option<Team>, Error>
pub fn new_team<'a>( &self, client: &'a dyn Client, name: &str, display_name: &str, team_description: Option<&str>, default_membership_period: Option<&usize>, default_renewal_period: Option<&usize>, subscription_policy: Option<&SubscriptionPolicy>, membership_policy: Option<&SubscriptionPolicy>, ) -> Result<Option<Team>, Error>
Create and return a new Team with given arguments.
§Arguments
-
name: NameA short unique name, beginning with a lower-case letter or number, and containing only letters, numbers, dots, hyphens, or plus signs.
-
display_name: Display NameYour name as you would like it displayed throughout Launchpad. Most people use their full name here.
-
team_description: Team DescriptionObsolete. Use description.
-
default_membership_period: Subscription periodNumber of days a new subscription lasts before expiring. You can customize the length of an individual subscription when approving it. Leave this empty or set to 0 for subscriptions to never expire.
-
default_renewal_period: Self renewal periodNumber of days members can renew their own membership. The number can be from 1 to 3650 (10 years).
-
subscription_policy: Membership policyObsolete: use membership_policy
-
membership_policy: Membership policy
§Returns
Returns Option<Team> on success, or an error if the request fails.
Source§impl People
impl People
Sourcepub fn get_by_name(
&self,
client: &dyn Client,
name: &str,
) -> Result<PersonOrTeam, Error>
pub fn get_by_name( &self, client: &dyn Client, name: &str, ) -> Result<PersonOrTeam, Error>
Get a person or team by name