sentry-api 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sentry-api/client/organizations.rb +27 -0
- data/lib/sentry-api/client/teams.rb +56 -4
- data/lib/sentry-api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f417ef159c36e5e86fd6b538e20e3ad7b94d37e
|
4
|
+
data.tar.gz: 984a3de7467106db6c7972b0c39e2413fded01c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:'
|
8
|
+
# SentryApi.create_project('team-slug', {name:'team-name'})
|
9
9
|
#
|
10
|
-
# @param team_slug [String] the slug of the team
|
11
|
-
# @param organization_slug [String] the slug of the organization
|
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
|
-
|
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
|
data/lib/sentry-api/version.rb
CHANGED