sentry-api 0.2.0 → 0.2.1
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 +6 -10
- data/lib/sentry-api/client/projects.rb +12 -23
- data/lib/sentry-api/client/teams.rb +5 -10
- 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: 7ec974675932262a7c8d6875497f3060f3d8626f
|
4
|
+
data.tar.gz: ce66695b09cff8aa769500f3044e2530c1c74323
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d1bc1582b31ee1a5fa4cd76d6fa048efa84f1761a065163e8a1d72599a7c4ea8f9875be30e7fc0c023e9e9b7f0ee2a8831c6121be4056d73111f345ec9e42ad
|
7
|
+
data.tar.gz: bc0fb8df7a438a934de987f070985d07090e554749644f33edb2f36aef8c97646bc01c70ea31ccbbe463060dbb98e8d07b081d77b93670deab53b415bf35ac02
|
@@ -20,8 +20,7 @@ class SentryApi::Client
|
|
20
20
|
#
|
21
21
|
# @param organization_slug [String] the slug of the organization for which the projects should be listed.
|
22
22
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
23
|
-
def organization_projects(organization_slug
|
24
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
23
|
+
def organization_projects(organization_slug=@default_org_slug)
|
25
24
|
get("/organizations/#{organization_slug}/projects/")
|
26
25
|
end
|
27
26
|
|
@@ -33,8 +32,7 @@ class SentryApi::Client
|
|
33
32
|
#
|
34
33
|
# @param organization_slug [String] the slug of the organization the team should be created for.
|
35
34
|
# @return [SentryApi::ObjectifiedHash]
|
36
|
-
def organization(organization_slug
|
37
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
35
|
+
def organization(organization_slug=@default_org_slug)
|
38
36
|
get("/organizations/#{organization_slug}/")
|
39
37
|
end
|
40
38
|
|
@@ -50,7 +48,7 @@ class SentryApi::Client
|
|
50
48
|
# @option options [String] :name an optional new name for the organization.
|
51
49
|
# @option options [String] :slug an optional new slug for the organization. Needs to be available and unique.
|
52
50
|
# @return [SentryApi::ObjectifiedHash]
|
53
|
-
def update_organization(
|
51
|
+
def update_organization(options={}, organization_slug=@default_org_slug)
|
54
52
|
put("/organizations/#{organization_slug}/", body: options)
|
55
53
|
end
|
56
54
|
|
@@ -67,7 +65,7 @@ class SentryApi::Client
|
|
67
65
|
# @option options [Timestamp] :until a timestamp to set the end of the query in seconds since UNIX epoch.
|
68
66
|
# @option options [String] :resolution an explicit resolution to search for (eg: 10s). This should not be used unless you are familiar with Sentry’s internals as it’s restricted to pre-defined values.
|
69
67
|
# @return [Array<Array>]
|
70
|
-
def organization_stats(
|
68
|
+
def organization_stats(options={}, organization_slug=@default_org_slug)
|
71
69
|
get("/organizations/#{organization_slug}/stats/", query: options)
|
72
70
|
end
|
73
71
|
|
@@ -81,8 +79,7 @@ class SentryApi::Client
|
|
81
79
|
# @option options [String] :name the name for the new team.
|
82
80
|
# @option options [String] :slug optionally a slug for the new team. If it’s not provided a slug is generated from the name.
|
83
81
|
# @return [SentryApi::ObjectifiedHash]
|
84
|
-
def create_team(options={}, organization_slug
|
85
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
82
|
+
def create_team(options={}, organization_slug=@default_org_slug)
|
86
83
|
post("/organizations/#{organization_slug}/teams/", body: options)
|
87
84
|
end
|
88
85
|
|
@@ -93,8 +90,7 @@ class SentryApi::Client
|
|
93
90
|
#
|
94
91
|
# @param organization_slug [String] the slug of the organization
|
95
92
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
96
|
-
def organization_teams(organization_slug
|
97
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
93
|
+
def organization_teams(organization_slug=@default_org_slug)
|
98
94
|
get("/organizations/#{organization_slug}/teams/")
|
99
95
|
end
|
100
96
|
|
@@ -19,8 +19,7 @@ class SentryApi::Client
|
|
19
19
|
# @param project_slug [String] the slug of the project to retrieve.
|
20
20
|
# @param organization_slug [String] the slug of the organization the project belong to.
|
21
21
|
# @return [SentryApi::ObjectifiedHash]
|
22
|
-
def project(project_slug, organization_slug
|
23
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
22
|
+
def project(project_slug, organization_slug=@default_org_slug)
|
24
23
|
get("/projects/#{organization_slug}/#{project_slug}/")
|
25
24
|
end
|
26
25
|
|
@@ -37,8 +36,7 @@ class SentryApi::Client
|
|
37
36
|
# @option options [Hash] optional options to override in the project settings.
|
38
37
|
# @param organization_slug [String] the slug of the organization the project belong to.
|
39
38
|
# @return [SentryApi::ObjectifiedHash]
|
40
|
-
def update_project(project_slug, options={}, organization_slug
|
41
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
39
|
+
def update_project(project_slug, options={}, organization_slug=@default_org_slug)
|
42
40
|
put("/projects/#{organization_slug}/#{project_slug}/", body: options)
|
43
41
|
end
|
44
42
|
|
@@ -49,8 +47,7 @@ class SentryApi::Client
|
|
49
47
|
#
|
50
48
|
# @param project_slug [String] the slug of the project to delete.
|
51
49
|
# @param organization_slug [String] the slug of the organization the project belong to.
|
52
|
-
def delete_project(project_slug, organization_slug
|
53
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
50
|
+
def delete_project(project_slug, organization_slug=@default_org_slug)
|
54
51
|
delete("/projects/#{organization_slug}/#{project_slug}/")
|
55
52
|
end
|
56
53
|
|
@@ -68,7 +65,7 @@ class SentryApi::Client
|
|
68
65
|
# @option options [String] :resolution an explicit resolution to search for (eg: 10s). This should not be used unless you are familiar with Sentry’s internals as it’s restricted to pre-defined values.
|
69
66
|
# @param organization_slug [String] the slug of the organization the project belong to.
|
70
67
|
# @return [Array<Array>]
|
71
|
-
def project_stats(project_slug, options={}, organization_slug
|
68
|
+
def project_stats(project_slug, options={}, organization_slug=@default_org_slug)
|
72
69
|
get("/projects/#{organization_slug}/#{project_slug}/stats/", query: options)
|
73
70
|
end
|
74
71
|
|
@@ -81,8 +78,7 @@ class SentryApi::Client
|
|
81
78
|
# @param file_path [String] the absolute file path of the dsym file.
|
82
79
|
# @param organization_slug [String] the slug of the organization.
|
83
80
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
84
|
-
def upload_dsym_files(project_slug, file_path, organization_slug
|
85
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
81
|
+
def upload_dsym_files(project_slug, file_path, organization_slug=@default_org_slug)
|
86
82
|
post("/projects/#{organization_slug}/#{project_slug}/files/dsyms/", body: {file: File.new(file_path)})
|
87
83
|
end
|
88
84
|
|
@@ -94,8 +90,7 @@ class SentryApi::Client
|
|
94
90
|
# @param organization_slug [String] the slug of the organization.
|
95
91
|
# @param project_slug [String] the slug of the project to list the dsym files of.
|
96
92
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
97
|
-
def project_dsym_files(project_slug, organization_slug
|
98
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
93
|
+
def project_dsym_files(project_slug, organization_slug=@default_org_slug)
|
99
94
|
get("/projects/#{organization_slug}/#{project_slug}/files/dsyms/")
|
100
95
|
end
|
101
96
|
|
@@ -122,8 +117,7 @@ class SentryApi::Client
|
|
122
117
|
# @option options [String] :name the name for the new key.
|
123
118
|
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
124
119
|
# @return [SentryApi::ObjectifiedHash]
|
125
|
-
def create_client_key(project_slug, options={}, organization_slug
|
126
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
120
|
+
def create_client_key(project_slug, options={}, organization_slug=@default_org_slug)
|
127
121
|
post("/projects/#{organization_slug}/#{project_slug}/keys/", body: options)
|
128
122
|
end
|
129
123
|
|
@@ -135,8 +129,7 @@ class SentryApi::Client
|
|
135
129
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
136
130
|
# @param key_id [String] the ID of the key to delete.
|
137
131
|
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
138
|
-
def delete_client_key(project_slug, key_id, organization_slug
|
139
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
132
|
+
def delete_client_key(project_slug, key_id, organization_slug=@default_org_slug)
|
140
133
|
delete("/projects/#{organization_slug}/#{project_slug}/keys/#{key_id}/")
|
141
134
|
end
|
142
135
|
|
@@ -151,8 +144,7 @@ class SentryApi::Client
|
|
151
144
|
# @option options [String] :name the new name for the client key.
|
152
145
|
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
153
146
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
154
|
-
def update_client_key(project_slug, key_id, options={}, organization_slug
|
155
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
147
|
+
def update_client_key(project_slug, key_id, options={}, organization_slug=@default_org_slug)
|
156
148
|
put("/projects/#{organization_slug}/#{project_slug}/keys/#{key_id}/", body: options)
|
157
149
|
end
|
158
150
|
|
@@ -164,8 +156,7 @@ class SentryApi::Client
|
|
164
156
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
165
157
|
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
166
158
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
167
|
-
def project_events(project_slug, organization_slug
|
168
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
159
|
+
def project_events(project_slug, organization_slug=@default_org_slug)
|
169
160
|
get("/projects/#{organization_slug}/#{project_slug}/events/")
|
170
161
|
end
|
171
162
|
|
@@ -178,8 +169,7 @@ class SentryApi::Client
|
|
178
169
|
# @param event_id [String] the slug of the project the event belongs to.
|
179
170
|
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
180
171
|
# @return [SentryApi::ObjectifiedHash]
|
181
|
-
def project_event(project_slug, event_id, organization_slug
|
182
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
172
|
+
def project_event(project_slug, event_id, organization_slug=@default_org_slug)
|
183
173
|
get("/projects/#{organization_slug}/#{project_slug}/events/#{event_id}/")
|
184
174
|
end
|
185
175
|
|
@@ -189,8 +179,7 @@ class SentryApi::Client
|
|
189
179
|
# SentryApi.project_issues('project-slug')
|
190
180
|
#
|
191
181
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
192
|
-
def project_issues(project_slug, organization_slug
|
193
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
182
|
+
def project_issues(project_slug, organization_slug=@default_org_slug)
|
194
183
|
get("/projects/#{organization_slug}/#{project_slug}/issues/")
|
195
184
|
end
|
196
185
|
|
@@ -13,8 +13,7 @@ class SentryApi::Client
|
|
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.
|
15
15
|
# @return [SentryApi::ObjectifiedHash]
|
16
|
-
def create_project(team_slug, options={}, organization_slug
|
17
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
16
|
+
def create_project(team_slug, options={}, organization_slug=@default_org_slug)
|
18
17
|
post("/teams/#{organization_slug}/#{team_slug}/projects/", body: options)
|
19
18
|
end
|
20
19
|
|
@@ -25,8 +24,7 @@ class SentryApi::Client
|
|
25
24
|
#
|
26
25
|
# @param team_slug [String] the slug of the team
|
27
26
|
# @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 == ""
|
27
|
+
def delete_team(team_slug, organization_slug=@default_org_slug)
|
30
28
|
delete("/teams/#{organization_slug}/#{team_slug}/")
|
31
29
|
end
|
32
30
|
|
@@ -38,8 +36,7 @@ class SentryApi::Client
|
|
38
36
|
# @param team_slug [String] the slug of the team
|
39
37
|
# @param organization_slug [String] the slug of the organization
|
40
38
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
41
|
-
def team_projects(team_slug, organization_slug
|
42
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
39
|
+
def team_projects(team_slug, organization_slug=@default_org_slug)
|
43
40
|
get("/teams/#{organization_slug}/#{team_slug}/projects/")
|
44
41
|
end
|
45
42
|
|
@@ -51,8 +48,7 @@ class SentryApi::Client
|
|
51
48
|
# @param team_slug [String] the slug of the team
|
52
49
|
# @param organization_slug [String] the slug of the organization
|
53
50
|
# @return [SentryApi::ObjectifiedHash]
|
54
|
-
def team(team_slug, organization_slug
|
55
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
51
|
+
def team(team_slug, organization_slug=@default_org_slug)
|
56
52
|
get("/teams/#{organization_slug}/#{team_slug}/")
|
57
53
|
end
|
58
54
|
|
@@ -67,8 +63,7 @@ class SentryApi::Client
|
|
67
63
|
# @option options [String] :name the name for the new project.
|
68
64
|
# @option options [String] :slug optionally a slug for the new project. If it’s not provided a slug is generated from the name.
|
69
65
|
# @return [SentryApi::ObjectifiedHash]
|
70
|
-
def update_team(team_slug, options={}, organization_slug
|
71
|
-
organization_slug = @default_org_slug if organization_slug == ""
|
66
|
+
def update_team(team_slug, options={}, organization_slug=@default_org_slug)
|
72
67
|
get("/teams/#{organization_slug}/#{team_slug}/", body: options)
|
73
68
|
end
|
74
69
|
|
data/lib/sentry-api/version.rb
CHANGED