Struct octocrab::teams::TeamHandler [−][src]
pub struct TeamHandler<'octo> { /* fields omitted */ }
Expand description
Handler for GitHub’s teams API.
Created with Octocrab::teams
.
Implementations
Lists teams in the organization.
let teams = octocrab::instance() .teams("owner") .list() .per_page(10) .page(1u8) .send() .await?;
Gets a team from its slug.
let team = octocrab::instance() .teams("owner") .get("team") .await?;
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.into()) .send() .await?;
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.into()) .send() .await?;
Deletes a team from the organization.
octocrab::instance().teams("owner").delete("some-team").await?;
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?;
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>