sentry-api 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8b17332ffe6b7c3740b3acda3256007b9707ab2
4
- data.tar.gz: ab1af12f7cfb73c90ac3d651d6000510489bfd00
3
+ metadata.gz: 1f417ef159c36e5e86fd6b538e20e3ad7b94d37e
4
+ data.tar.gz: 984a3de7467106db6c7972b0c39e2413fded01c5
5
5
  SHA512:
6
- metadata.gz: 241e63d67c12b558096dc100fffb5e1af11bcbb4715c2d2c9fe211f72d0fc1d1448b56222eb130887be2ac94d73924ad8da45c7dd0fd09a6f6e69197192639da
7
- data.tar.gz: da8488d89638f3427f687dacdfdad2ccd5eeb5562886a6176254378afd2460daea632d0418babdb4db20c833fa0a02ba1aeef3697bfc1c2e9cfa1fa23020d0eb
6
+ metadata.gz: 9ca244194601ddc134295ccab44fdf5b653a89a5f5daed97d614eb20d039d1c5b8b39129ca70bd2515ef298c6387c6fa97fa55025b38e0ac3f1cc9e2298dfa02
7
+ data.tar.gz: 8db1a3de6387026ccdd69484858f3c33cd1ce72d8402bd48f1cf5494a8d11e53b29ee53182ab49a8663cf905c143a6f24d376e9532c5088ac35a2808385a2e98
@@ -71,6 +71,33 @@ class SentryApi::Client
71
71
  get("/organizations/#{organization_slug}/stats/", query: options)
72
72
  end
73
73
 
74
+ # Create a new team bound to an organization
75
+ #
76
+ # @example
77
+ # SentryApi.create_project('team-slug', {name:'team-name', slug:'team-slug'})
78
+ #
79
+ # @param organization_slug [String] the slug of the organization the team should be created for
80
+ # @param [Hash] options A customizable set of options.
81
+ # @option options [String] :name the name for the new team.
82
+ # @option options [String] :slug optionally a slug for the new team. If it’s not provided a slug is generated from the name.
83
+ # @return [SentryApi::ObjectifiedHash]
84
+ def create_team(options={}, organization_slug="")
85
+ organization_slug = @default_org_slug if organization_slug == ""
86
+ post("/organizations/#{organization_slug}/teams/", body: options)
87
+ end
88
+
89
+ # Return a list of teams bound to a organization.
90
+ #
91
+ # @example
92
+ # SentryApi.organization_teams('team-slug')
93
+ #
94
+ # @param organization_slug [String] the slug of the organization
95
+ # @return [Array<SentryApi::ObjectifiedHash>]
96
+ def organization_teams(organization_slug="")
97
+ organization_slug = @default_org_slug if organization_slug == ""
98
+ get("/organizations/#{organization_slug}/teams/")
99
+ end
100
+
74
101
  end
75
102
 
76
103
  end
@@ -5,10 +5,10 @@ class SentryApi::Client
5
5
  # Create a new project bound to a team.
6
6
  #
7
7
  # @example
8
- # SentryApi.create_project('team-slug',{name:'new-name'})
8
+ # SentryApi.create_project('team-slug', {name:'team-name'})
9
9
  #
10
- # @param team_slug [String] the slug of the team to create a new project for.
11
- # @param organization_slug [String] the slug of the organization the team belongs to.
10
+ # @param team_slug [String] the slug of the team
11
+ # @param organization_slug [String] the slug of the organization
12
12
  # @param [Hash] options A customizable set of options.
13
13
  # @option options [String] :name the name for the new project.
14
14
  # @option options [String] :slug optionally a slug for the new project. If it’s not provided a slug is generated from the name.
@@ -18,7 +18,59 @@ class SentryApi::Client
18
18
  post("/teams/#{organization_slug}/#{team_slug}/projects/", body: options)
19
19
  end
20
20
 
21
+ # Schedules a team for deletion
22
+ #
23
+ # @example
24
+ # SentryApi.delete_team('team-slug')
25
+ #
26
+ # @param team_slug [String] the slug of the team
27
+ # @param organization_slug [String] the slug of the organization
28
+ def delete_team(team_slug, organization_slug="")
29
+ organization_slug = @default_org_slug if organization_slug == ""
30
+ delete("/teams/#{organization_slug}/#{team_slug}/")
31
+ end
21
32
 
22
- end
33
+ # Return a list of projects bound to a team
34
+ #
35
+ # @example
36
+ # SentryApi.delete_team('team-slug')
37
+ #
38
+ # @param team_slug [String] the slug of the team
39
+ # @param organization_slug [String] the slug of the organization
40
+ # @return [Array<SentryApi::ObjectifiedHash>]
41
+ def team_projects(team_slug, organization_slug="")
42
+ organization_slug = @default_org_slug if organization_slug == ""
43
+ get("/teams/#{organization_slug}/#{team_slug}/projects/")
44
+ end
23
45
 
46
+ # Return details on an individual team.
47
+ #
48
+ # @example
49
+ # SentryApi.team_projects('team-slug')
50
+ #
51
+ # @param team_slug [String] the slug of the team
52
+ # @param organization_slug [String] the slug of the organization
53
+ # @return [SentryApi::ObjectifiedHash]
54
+ def team(team_slug, organization_slug="")
55
+ organization_slug = @default_org_slug if organization_slug == ""
56
+ get("/teams/#{organization_slug}/#{team_slug}/")
57
+ end
58
+
59
+ # Update various attributes and configurable settings for the given team.
60
+ #
61
+ # @example
62
+ # SentryApi.update_team('team-slug', {name:'team-name'})
63
+ #
64
+ # @param team_slug [String] the slug of the team
65
+ # @param organization_slug [String] the slug of the organization
66
+ # @param [Hash] options A customizable set of options.
67
+ # @option options [String] :name the name for the new project.
68
+ # @option options [String] :slug optionally a slug for the new project. If it’s not provided a slug is generated from the name.
69
+ # @return [SentryApi::ObjectifiedHash]
70
+ def update_team(team_slug, options={}, organization_slug="")
71
+ organization_slug = @default_org_slug if organization_slug == ""
72
+ get("/teams/#{organization_slug}/#{team_slug}/", body: options)
73
+ end
74
+
75
+ end
24
76
  end
@@ -1,3 +1,3 @@
1
1
  module SentryApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thierry Xing