Tentacat v0.7.2 Tentacat.Organizations.Teams

Summary

Functions

create(organization, body, client \\ %Tentacat.Client{})

Specs

create(binary, map, Tentacat.Client.t) :: Tentacat.response

Create a team

Create body example:

%{
  "name" => "my new team",
  "description" => "Team for everyone with commit access",
  "repo_names" => [
    "my_org/secret_repo",
    "my_org/secret_repo2",
  ],
  "privacy" => "closed",
}

Example

Tentacat.Organizations.Teams.create "my_org", body
Tentacat.Organizations.Teams.create "my_org", body, client

More info at: https://developer.github.com/v3/orgs/teams/#create-team

delete(team_id, client \\ %Tentacat.Client{})

Specs

delete(integer, Tentacat.Client.t) :: Tentacat.response

Delete a team

Example

Tentacat.Organizations.Teams.delete "1485060"
Tentacat.Organizations.Teams.delete "1485060", client

More info at: https://developer.github.com/v3/orgs/teams/#delete-team

find(team_id, client \\ %Tentacat.Client{})

Specs

Get a team

Example

Tentacat.Orgnizations.Teams.find "1485060"
Tentacat.Orgnizations.Teams.find "1485060", client

More info at: https://developer.github.com/v3/orgs/teams/#get-team

list(organization, client \\ %Tentacat.Client{})

Specs

List all public teams for an organization

Example

Tentacat.Organizations.Teams.list "my_org"
Tentacat.Organizations.Teams.list "my_org", client

More info at: https://developer.github.com/v3/orgs/teams/#list-teams

update(team_id, options, client \\ %Tentacat.Client{})

Specs

update(integer, map, Tentacat.Client.t) :: Tentacat.response

Update a team

Update body example:

%{
  "name": "Super Admins",
  "description": "Team for everyone with commit and admin access",
}

Example

Tentacat.Organizations.Teams.update "1485060", body
Tentacat.Organizations.Teams.update "1485060", body, client

More info at: https://developer.github.com/v3/orgs/teams/#edit-team