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 = "") ⇒ SentryApi::ObjectifiedHash

Create a new project bound to a team.

Examples:

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

Parameters:

  • team_slug (String)

    the slug of the team to create a new project for.

  • organization_slug (String) (defaults to: "")

    the slug of the organization the team belongs to.

  • 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
19
# File 'lib/sentry-api/client/teams.rb', line 16

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