[−][src]Struct octocrab::teams::TeamHandler
Handler for GitHub's teams API.
Created with Octocrab::teams
.
Implementations
impl<'octo> TeamHandler<'octo>
[src]
pub fn list(&self) -> ListTeamsBuilder
[src]
Lists teams in the organization.
let teams = octocrab::instance() .teams("owner") .list() .per_page(10) .page(1u8) .send() .await?;
pub async fn get<'_>(&'_ self, team_slug: impl Into<String>) -> Result<Team>
[src]
Gets a team from its slug.
let team = octocrab::instance() .teams("owner") .get("team") .await?;
pub fn create(&self, name: impl Into<String>) -> CreateTeamBuilder
[src]
Creates a new team in the organization.
use octocrab::params; octocrab::instance() .teams("owner") .create("new-team") .description("My team created from Octocrab!") .maintainers(&vec![String::from("ferris")]) .repo_names(&vec![String::from("crab-stuff")]) .privacy(params::teams::Privacy::Closed) .parent_team_id(1u64) .send() .await?;
pub fn edit(
&self,
team_slug: impl Into<String>,
name: impl Into<String>
) -> EditTeamBuilder
[src]
&self,
team_slug: impl Into<String>,
name: impl Into<String>
) -> EditTeamBuilder
Creates a new team in the organization.
use octocrab::params; octocrab::instance() .teams("owner") .edit("some-team", "Some Team") .description("I edited from Octocrab!") .privacy(params::teams::Privacy::Secret) .parent_team_id(2u64) .send() .await?;
pub async fn delete<'_>(&'_ self, team_slug: impl Into<String>) -> Result<()>
[src]
Deletes a team from the organization.
octocrab::instance().teams("owner").delete("some-team").await?;
pub fn list_children(
&self,
team_slug: impl Into<String>
) -> ListChildTeamsBuilder
[src]
&self,
team_slug: impl Into<String>
) -> ListChildTeamsBuilder
List the child teams of a team in the organization.
octocrab::instance() .teams("owner") .list_children("parent-team") .per_page(5) .page(1u8) .send() .await?;
pub fn repos(&self, team_slug: impl Into<String>) -> TeamRepoHandler
[src]
Creates a new TeamRepoHandler
for the specified team,
that allows you to manage this team's repositories.
Auto Trait Implementations
impl<'octo> !RefUnwindSafe for TeamHandler<'octo>
impl<'octo> Send for TeamHandler<'octo>
impl<'octo> Sync for TeamHandler<'octo>
impl<'octo> Unpin for TeamHandler<'octo>
impl<'octo> !UnwindSafe for TeamHandler<'octo>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,