Module: SentryApi::Client::Teams

Included in:
SentryApi::Client
Defined in:
lib/sentry-api/client/teams.rb

Instance Method Summary collapse

Instance Method Details

#create_project(team_slug, options = {}, organization_slug = @default_org_slug) ⇒ SentryApi::ObjectifiedHash

Create a new project bound to a team.

Examples:

SentryApi.create_project('team-slug', {name:'team-name'})

Parameters:

  • team_slug (String)

    the slug of the team

  • organization_slug (String) (defaults to: @default_org_slug)

    the slug of the organization

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :name (String)

    the name for the new project.

  • :slug (String)

    optionally a slug for the new project. If it’s not provided a slug is generated from the name.

Returns:



16
17
18
# File 'lib/sentry-api/client/teams.rb', line 16

def create_project(team_slug, options={}, organization_slug=@default_org_slug)
  post("/teams/#{organization_slug}/#{team_slug}/projects/", body: options)
end

#delete_team(team_slug, organization_slug = @default_org_slug) ⇒ Object

Schedules a team for deletion

Examples:

SentryApi.delete_team('team-slug')

Parameters:

  • team_slug (String)

    the slug of the team

  • organization_slug (String) (defaults to: @default_org_slug)

    the slug of the organization



27
28
29
# File 'lib/sentry-api/client/teams.rb', line 27

def delete_team(team_slug, organization_slug=@default_org_slug)
  delete("/teams/#{organization_slug}/#{team_slug}/")
end

#team(team_slug, organization_slug = @default_org_slug) ⇒ SentryApi::ObjectifiedHash

Return details on an individual team.

Examples:

SentryApi.team_projects('team-slug')

Parameters:

  • team_slug (String)

    the slug of the team

  • organization_slug (String) (defaults to: @default_org_slug)

    the slug of the organization

Returns:



51
52
53
# File 'lib/sentry-api/client/teams.rb', line 51

def team(team_slug, organization_slug=@default_org_slug)
  get("/teams/#{organization_slug}/#{team_slug}/")
end

#team_projects(team_slug, organization_slug = @default_org_slug) ⇒ Array<SentryApi::ObjectifiedHash>

Return a list of projects bound to a team

Examples:

SentryApi.delete_team('team-slug')

Parameters:

  • team_slug (String)

    the slug of the team

  • organization_slug (String) (defaults to: @default_org_slug)

    the slug of the organization

Returns:



39
40
41
# File 'lib/sentry-api/client/teams.rb', line 39

def team_projects(team_slug, organization_slug=@default_org_slug)
  get("/teams/#{organization_slug}/#{team_slug}/projects/")
end

#update_team(team_slug, options = {}, organization_slug = @default_org_slug) ⇒ SentryApi::ObjectifiedHash

Update various attributes and configurable settings for the given team.

Examples:

SentryApi.update_team('team-slug', {name:'team-name'})

Parameters:

  • team_slug (String)

    the slug of the team

  • organization_slug (String) (defaults to: @default_org_slug)

    the slug of the organization

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :name (String)

    the name for the new project.

  • :slug (String)

    optionally a slug for the new project. If it’s not provided a slug is generated from the name.

Returns:



66
67
68
# File 'lib/sentry-api/client/teams.rb', line 66

def update_team(team_slug, options={}, organization_slug=@default_org_slug)
  get("/teams/#{organization_slug}/#{team_slug}/", body: options)
end