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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.