sentry-api 0.2.2 → 0.3.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/.rakeTasks +7 -0
- data/README.md +1 -2
- data/lib/sentry-api/client.rb +1 -0
- data/lib/sentry-api/client/organizations.rb +12 -18
- data/lib/sentry-api/client/projects.rb +26 -38
- data/lib/sentry-api/client/releases.rb +75 -0
- data/lib/sentry-api/client/teams.rb +10 -15
- data/lib/sentry-api/version.rb +1 -1
- data/sentry-api.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8def4de3bf6ebfede842e9cfb5e1285988689747
|
4
|
+
data.tar.gz: b246866444367abc126cfb78ae010c4eee545beb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2278944d85f8e9ede093e7b8649d3e8e90ffc7636187a25ff9e220bf408d0f69713b0e9e618d7582e5c11b482cbbaccd369c252114366a2d892025d1dc84fd54
|
7
|
+
data.tar.gz: 4e75ca075af6176e0c1a14c1acff0265ef8dee29be2a62d699be4bfb1df4110fa4c5cc2ffe933765a9c0121c0e4eb44cbcbf632a37b64ecca544311b62693f1e
|
data/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build sentry-api-0.2.2.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install sentry-api-0.2.2.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install sentry-api-0.2.2.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.2.2 and build and push sentry-api-0.2.2.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Sentry Ruby API
|
2
2
|
[](https://travis-ci.org/thierryxing/sentry-ruby-api)
|
3
|
+
[](https://badge.fury.io/rb/sentry-api)
|
3
4
|
[](https://github.com/thierryxing/sentry-ruby-api/blob/master/LICENSE.txt)
|
4
5
|
|
5
6
|
Sentry Ruby API is a Ruby wrapper for the [getsentry/sentry API](https://docs.sentry.io/hosted/api/).
|
@@ -73,8 +74,6 @@ projects.auto_paginate
|
|
73
74
|
```
|
74
75
|
|
75
76
|
## Development
|
76
|
-
The basic framework had been finished, meanwhile the APIs of Organizations,Projects and Events had been added, more APIs will be added later. You are welcome to help me with it.
|
77
|
-
|
78
77
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
79
78
|
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
80
79
|
prompt that will allow you to experiment.
|
data/lib/sentry-api/client.rb
CHANGED
@@ -18,10 +18,9 @@ class SentryApi::Client
|
|
18
18
|
# SentryApi.organization_projects
|
19
19
|
# SentryApi.organization_projects('slug')
|
20
20
|
#
|
21
|
-
# @param organization_slug [String] the slug of the organization for which the projects should be listed.
|
22
21
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
23
|
-
def organization_projects
|
24
|
-
get("/organizations/#{
|
22
|
+
def organization_projects
|
23
|
+
get("/organizations/#{@default_org_slug}/projects/")
|
25
24
|
end
|
26
25
|
|
27
26
|
# Retrieve an Organization
|
@@ -30,10 +29,9 @@ class SentryApi::Client
|
|
30
29
|
# SentryApi.organization
|
31
30
|
# SentryApi.organization('slug')
|
32
31
|
#
|
33
|
-
# @param organization_slug [String] the slug of the organization the team should be created for.
|
34
32
|
# @return [SentryApi::ObjectifiedHash]
|
35
|
-
def organization
|
36
|
-
get("/organizations/#{
|
33
|
+
def organization
|
34
|
+
get("/organizations/#{@default_org_slug}/")
|
37
35
|
end
|
38
36
|
|
39
37
|
# Update an Organization
|
@@ -43,13 +41,12 @@ class SentryApi::Client
|
|
43
41
|
# SentryApi.update_organization('slug',{name:'new-name'})
|
44
42
|
# SentryApi.update_organization('slug',{name:'new-name', slug:'new-slug'})
|
45
43
|
#
|
46
|
-
# @param organization_slug [String] the slug of the organization the team should be created for.
|
47
44
|
# @param [Hash] options A customizable set of options.
|
48
45
|
# @option options [String] :name an optional new name for the organization.
|
49
46
|
# @option options [String] :slug an optional new slug for the organization. Needs to be available and unique.
|
50
47
|
# @return [SentryApi::ObjectifiedHash]
|
51
|
-
def update_organization(options={}
|
52
|
-
put("/organizations/#{
|
48
|
+
def update_organization(options={})
|
49
|
+
put("/organizations/#{@default_org_slug}/", body: options)
|
53
50
|
end
|
54
51
|
|
55
52
|
# Retrieve Event Counts for an Organization
|
@@ -58,15 +55,14 @@ class SentryApi::Client
|
|
58
55
|
# SentryApi.organization_stats('slug')
|
59
56
|
# SentryApi.organization_stats('slug', {stat:'received', since:'1472158800'})
|
60
57
|
#
|
61
|
-
# @param organization_slug [String] the slug of the organization for which the stats should be retrieved.
|
62
58
|
# @param [Hash] options A customizable set of options.
|
63
59
|
# @option options [String] :stat the name of the stat to query ("received", "rejected", "blacklisted")
|
64
60
|
# @option options [Timestamp] :since a timestamp to set the start of the query in seconds since UNIX epoch.
|
65
61
|
# @option options [Timestamp] :until a timestamp to set the end of the query in seconds since UNIX epoch.
|
66
62
|
# @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.
|
67
63
|
# @return [Array<Array>]
|
68
|
-
def organization_stats(options={}
|
69
|
-
get("/organizations/#{
|
64
|
+
def organization_stats(options={})
|
65
|
+
get("/organizations/#{@default_org_slug}/stats/", query: options)
|
70
66
|
end
|
71
67
|
|
72
68
|
# Create a new team bound to an organization
|
@@ -74,13 +70,12 @@ class SentryApi::Client
|
|
74
70
|
# @example
|
75
71
|
# SentryApi.create_project('team-slug', {name:'team-name', slug:'team-slug'})
|
76
72
|
#
|
77
|
-
# @param organization_slug [String] the slug of the organization the team should be created for
|
78
73
|
# @param [Hash] options A customizable set of options.
|
79
74
|
# @option options [String] :name the name for the new team.
|
80
75
|
# @option options [String] :slug optionally a slug for the new team. If it’s not provided a slug is generated from the name.
|
81
76
|
# @return [SentryApi::ObjectifiedHash]
|
82
|
-
def create_team(options={}
|
83
|
-
post("/organizations/#{
|
77
|
+
def create_team(options={})
|
78
|
+
post("/organizations/#{@default_org_slug}/teams/", body: options)
|
84
79
|
end
|
85
80
|
|
86
81
|
# Return a list of teams bound to a organization.
|
@@ -88,10 +83,9 @@ class SentryApi::Client
|
|
88
83
|
# @example
|
89
84
|
# SentryApi.organization_teams('team-slug')
|
90
85
|
#
|
91
|
-
# @param organization_slug [String] the slug of the organization
|
92
86
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
93
|
-
def organization_teams
|
94
|
-
get("/organizations/#{
|
87
|
+
def organization_teams
|
88
|
+
get("/organizations/#{@default_org_slug}/teams/")
|
95
89
|
end
|
96
90
|
|
97
91
|
end
|
@@ -17,10 +17,9 @@ class SentryApi::Client
|
|
17
17
|
# SentryApi.project('project-slug')
|
18
18
|
#
|
19
19
|
# @param project_slug [String] the slug of the project to retrieve.
|
20
|
-
# @param organization_slug [String] the slug of the organization the project belong to.
|
21
20
|
# @return [SentryApi::ObjectifiedHash]
|
22
|
-
def project(project_slug
|
23
|
-
get("/projects/#{
|
21
|
+
def project(project_slug)
|
22
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/")
|
24
23
|
end
|
25
24
|
|
26
25
|
# Update a Project
|
@@ -34,10 +33,9 @@ class SentryApi::Client
|
|
34
33
|
# @option options [String] :slug the new slug for the project.
|
35
34
|
# @option options [String] :isBookmarked in case this API call is invoked with a user context this allows changing of the bookmark flag.
|
36
35
|
# @option options [Hash] optional options to override in the project settings.
|
37
|
-
# @param organization_slug [String] the slug of the organization the project belong to.
|
38
36
|
# @return [SentryApi::ObjectifiedHash]
|
39
|
-
def update_project(project_slug, options={}
|
40
|
-
put("/projects/#{
|
37
|
+
def update_project(project_slug, options={})
|
38
|
+
put("/projects/#{@default_org_slug}/#{project_slug}/", body: options)
|
41
39
|
end
|
42
40
|
|
43
41
|
# Delete a Project.
|
@@ -46,9 +44,8 @@ class SentryApi::Client
|
|
46
44
|
# SentryApi.delete_project('project-slug')
|
47
45
|
#
|
48
46
|
# @param project_slug [String] the slug of the project to delete.
|
49
|
-
|
50
|
-
|
51
|
-
delete("/projects/#{organization_slug}/#{project_slug}/")
|
47
|
+
def delete_project(project_slug)
|
48
|
+
delete("/projects/#{@default_org_slug}/#{project_slug}/")
|
52
49
|
end
|
53
50
|
|
54
51
|
# Retrieve Event Counts for an Project
|
@@ -63,10 +60,9 @@ class SentryApi::Client
|
|
63
60
|
# @option options [Timestamp] :since a timestamp to set the start of the query in seconds since UNIX epoch.
|
64
61
|
# @option options [Timestamp] :until a timestamp to set the end of the query in seconds since UNIX epoch.
|
65
62
|
# @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.
|
66
|
-
# @param organization_slug [String] the slug of the organization the project belong to.
|
67
63
|
# @return [Array<Array>]
|
68
|
-
def project_stats(project_slug, options={}
|
69
|
-
get("/projects/#{
|
64
|
+
def project_stats(project_slug, options={})
|
65
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/stats/", query: options)
|
70
66
|
end
|
71
67
|
|
72
68
|
# Upload a new dsym file for the given release
|
@@ -78,8 +74,8 @@ class SentryApi::Client
|
|
78
74
|
# @param file_path [String] the absolute file path of the dsym file.
|
79
75
|
# @param organization_slug [String] the slug of the organization.
|
80
76
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
81
|
-
def upload_dsym_files(project_slug, file_path
|
82
|
-
upload("/projects/#{
|
77
|
+
def upload_dsym_files(project_slug, file_path)
|
78
|
+
upload("/projects/#{@default_org_slug}/#{project_slug}/files/dsyms/", body: {file: File.new(file_path)})
|
83
79
|
end
|
84
80
|
|
85
81
|
# List a Project’s DSym Files.
|
@@ -87,11 +83,10 @@ class SentryApi::Client
|
|
87
83
|
# @example
|
88
84
|
# SentryApi.project_dsym_files('project-slug')
|
89
85
|
#
|
90
|
-
# @param organization_slug [String] the slug of the organization.
|
91
86
|
# @param project_slug [String] the slug of the project to list the dsym files of.
|
92
87
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
93
|
-
def project_dsym_files(project_slug
|
94
|
-
get("/projects/#{
|
88
|
+
def project_dsym_files(project_slug)
|
89
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/files/dsyms/")
|
95
90
|
end
|
96
91
|
|
97
92
|
# List a Project’s Client Keys.
|
@@ -100,11 +95,9 @@ class SentryApi::Client
|
|
100
95
|
# SentryApi.client_keys('project-slug')
|
101
96
|
#
|
102
97
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
103
|
-
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
104
98
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
105
|
-
def client_keys(project_slug
|
106
|
-
|
107
|
-
get("/projects/#{organization_slug}/#{project_slug}/keys/")
|
99
|
+
def client_keys(project_slug)
|
100
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/keys/")
|
108
101
|
end
|
109
102
|
|
110
103
|
# Create a new Client Key.
|
@@ -115,10 +108,9 @@ class SentryApi::Client
|
|
115
108
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
116
109
|
# @param [Hash] options A customizable set of options.
|
117
110
|
# @option options [String] :name the name for the new key.
|
118
|
-
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
119
111
|
# @return [SentryApi::ObjectifiedHash]
|
120
|
-
def create_client_key(project_slug, options={}
|
121
|
-
post("/projects/#{
|
112
|
+
def create_client_key(project_slug, options={})
|
113
|
+
post("/projects/#{@default_org_slug}/#{project_slug}/keys/", body: options)
|
122
114
|
end
|
123
115
|
|
124
116
|
# Delete a Client Key.
|
@@ -128,9 +120,8 @@ class SentryApi::Client
|
|
128
120
|
#
|
129
121
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
130
122
|
# @param key_id [String] the ID of the key to delete.
|
131
|
-
|
132
|
-
|
133
|
-
delete("/projects/#{organization_slug}/#{project_slug}/keys/#{key_id}/")
|
123
|
+
def delete_client_key(project_slug, key_id)
|
124
|
+
delete("/projects/#{@default_org_slug}/#{project_slug}/keys/#{key_id}/")
|
134
125
|
end
|
135
126
|
|
136
127
|
# Update a Client Key
|
@@ -142,10 +133,9 @@ class SentryApi::Client
|
|
142
133
|
# @param key_id [String] the ID of the key to update.
|
143
134
|
# @param [Hash] options A customizable set of options.
|
144
135
|
# @option options [String] :name the new name for the client key.
|
145
|
-
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
146
136
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
147
|
-
def update_client_key(project_slug, key_id, options={}
|
148
|
-
put("/projects/#{
|
137
|
+
def update_client_key(project_slug, key_id, options={})
|
138
|
+
put("/projects/#{@default_org_slug}/#{project_slug}/keys/#{key_id}/", body: options)
|
149
139
|
end
|
150
140
|
|
151
141
|
# Return a list of sampled events bound to a project.
|
@@ -154,10 +144,9 @@ class SentryApi::Client
|
|
154
144
|
# SentryApi.project_events('project-slug')
|
155
145
|
#
|
156
146
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
157
|
-
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
158
147
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
159
|
-
def project_events(project_slug
|
160
|
-
get("/projects/#{
|
148
|
+
def project_events(project_slug)
|
149
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/events/")
|
161
150
|
end
|
162
151
|
|
163
152
|
# Retrieve an Event for a Project
|
@@ -167,10 +156,9 @@ class SentryApi::Client
|
|
167
156
|
#
|
168
157
|
# @param project_slug [String] the slug of the project the client keys belong to.
|
169
158
|
# @param event_id [String] the slug of the project the event belongs to.
|
170
|
-
# @param organization_slug [String] the slug of the organization the client keys belong to.
|
171
159
|
# @return [SentryApi::ObjectifiedHash]
|
172
|
-
def project_event(project_slug, event_id
|
173
|
-
get("/projects/#{
|
160
|
+
def project_event(project_slug, event_id)
|
161
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/events/#{event_id}/")
|
174
162
|
end
|
175
163
|
|
176
164
|
# Return a list of aggregates bound to a project
|
@@ -179,8 +167,8 @@ class SentryApi::Client
|
|
179
167
|
# SentryApi.project_issues('project-slug')
|
180
168
|
#
|
181
169
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
182
|
-
def project_issues(project_slug
|
183
|
-
get("/projects/#{
|
170
|
+
def project_issues(project_slug)
|
171
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/issues/")
|
184
172
|
end
|
185
173
|
|
186
174
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
class SentryApi::Client
|
2
|
+
|
3
|
+
module Releases
|
4
|
+
|
5
|
+
# Create a new release for the given project.
|
6
|
+
# Releases are used by Sentry to improve it’s error reporting abilities by correlating first seen events with the release that might have introduced the problem.
|
7
|
+
#
|
8
|
+
# @example
|
9
|
+
# SentryApi.create_release('project-slug',{version:'1.0', ref:'6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb'})
|
10
|
+
#
|
11
|
+
# @param project_slug [String] the slug of the project the client keys belong to.
|
12
|
+
# @param [Hash] options A customizable set of options.
|
13
|
+
# @option options [String] :version a version identifier for this release. Can be a version number, a commit hash etc.
|
14
|
+
# @option options [String] :ref an optional commit reference. This is useful if a tagged version has been provided.
|
15
|
+
# @option options [String] :url a URL that points to the release. This can be the path to an online interface to the sourcecode for instance.
|
16
|
+
# @option options [Timestamp] :dateStarted an optional date that indicates when the release process started.
|
17
|
+
# @option options [Timestamp] :dateReleased an optional date that indicates when the release went live. If not provided the current time is assumed.
|
18
|
+
# @return <SentryApi::ObjectifiedHash>
|
19
|
+
def create_release(project_slug, options={})
|
20
|
+
post("/projects/#{@default_org_slug}/#{project_slug}/releases/", body: options)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Permanently remove a release and all of its files.
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# SentryApi.delete_release('project-slug','1.0')
|
27
|
+
#
|
28
|
+
# @param project_slug [String] the slug of the project to delete the release of.
|
29
|
+
# @param version [String] the version identifier of the release.
|
30
|
+
def delete_release(project_slug, version)
|
31
|
+
delete("/projects/#{@default_org_slug}/#{project_slug}/releases/#{version}/")
|
32
|
+
end
|
33
|
+
|
34
|
+
# List a Project’s Releases
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# SentryApi.releases('project-slug')
|
38
|
+
#
|
39
|
+
# @param project_slug [String] the slug of the project to list the releases of.
|
40
|
+
# @return [Array<SentryApi::ObjectifiedHash>]
|
41
|
+
def releases(project_slug)
|
42
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/releases/")
|
43
|
+
end
|
44
|
+
|
45
|
+
# Retrieve a Release
|
46
|
+
#
|
47
|
+
# @example
|
48
|
+
# SentryApi.release('project-slug','1.0')
|
49
|
+
#
|
50
|
+
# @param project_slug [String] the slug of the project to retrieve the release of.
|
51
|
+
# @param version [String] the version identifier of the release.
|
52
|
+
# @return <SentryApi::ObjectifiedHash>
|
53
|
+
def release(project_slug, version)
|
54
|
+
get("/projects/#{@default_org_slug}/#{project_slug}/releases/#{version}/")
|
55
|
+
end
|
56
|
+
|
57
|
+
# Update a Release
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
# SentryApi.update('project-slug', {ref:'6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb'})
|
61
|
+
#
|
62
|
+
# @param project_slug [String] the slug of the project to retrieve the release of.
|
63
|
+
# @param version [String] the version identifier of the release.
|
64
|
+
# @option options [String] :ref an optional commit reference. This is useful if a tagged version has been provided.
|
65
|
+
# @option options [String] :url a URL that points to the release. This can be the path to an online interface to the sourcecode for instance.
|
66
|
+
# @option options [Timestamp] :dateStarted an optional date that indicates when the release process started.
|
67
|
+
# @option options [Timestamp] :dateReleased an optional date that indicates when the release went live. If not provided the current time is assumed.
|
68
|
+
# @return <SentryApi::ObjectifiedHash>
|
69
|
+
def update_release(project_slug, version, options={})
|
70
|
+
put("/projects/#{@default_org_slug}/#{project_slug}/releases/#{version}/", body: options)
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
@@ -8,13 +8,12 @@ class SentryApi::Client
|
|
8
8
|
# SentryApi.create_project('team-slug', {name:'team-name'})
|
9
9
|
#
|
10
10
|
# @param team_slug [String] the slug of the team
|
11
|
-
# @param organization_slug [String] the slug of the organization
|
12
11
|
# @param [Hash] options A customizable set of options.
|
13
12
|
# @option options [String] :name the name for the new project.
|
14
13
|
# @option options [String] :slug optionally a slug for the new project. If it’s not provided a slug is generated from the name.
|
15
14
|
# @return [SentryApi::ObjectifiedHash]
|
16
|
-
def create_project(team_slug, options={}
|
17
|
-
post("/teams/#{
|
15
|
+
def create_project(team_slug, options={})
|
16
|
+
post("/teams/#{@default_org_slug}/#{team_slug}/projects/", body: options)
|
18
17
|
end
|
19
18
|
|
20
19
|
# Schedules a team for deletion
|
@@ -23,9 +22,8 @@ class SentryApi::Client
|
|
23
22
|
# SentryApi.delete_team('team-slug')
|
24
23
|
#
|
25
24
|
# @param team_slug [String] the slug of the team
|
26
|
-
|
27
|
-
|
28
|
-
delete("/teams/#{organization_slug}/#{team_slug}/")
|
25
|
+
def delete_team(team_slug)
|
26
|
+
delete("/teams/#{@default_org_slug}/#{team_slug}/")
|
29
27
|
end
|
30
28
|
|
31
29
|
# Return a list of projects bound to a team
|
@@ -34,10 +32,9 @@ class SentryApi::Client
|
|
34
32
|
# SentryApi.delete_team('team-slug')
|
35
33
|
#
|
36
34
|
# @param team_slug [String] the slug of the team
|
37
|
-
# @param organization_slug [String] the slug of the organization
|
38
35
|
# @return [Array<SentryApi::ObjectifiedHash>]
|
39
|
-
def team_projects(team_slug
|
40
|
-
get("/teams/#{
|
36
|
+
def team_projects(team_slug)
|
37
|
+
get("/teams/#{@default_org_slug}/#{team_slug}/projects/")
|
41
38
|
end
|
42
39
|
|
43
40
|
# Return details on an individual team.
|
@@ -46,10 +43,9 @@ class SentryApi::Client
|
|
46
43
|
# SentryApi.team_projects('team-slug')
|
47
44
|
#
|
48
45
|
# @param team_slug [String] the slug of the team
|
49
|
-
# @param organization_slug [String] the slug of the organization
|
50
46
|
# @return [SentryApi::ObjectifiedHash]
|
51
|
-
def team(team_slug
|
52
|
-
get("/teams/#{
|
47
|
+
def team(team_slug)
|
48
|
+
get("/teams/#{@default_org_slug}/#{team_slug}/")
|
53
49
|
end
|
54
50
|
|
55
51
|
# Update various attributes and configurable settings for the given team.
|
@@ -58,13 +54,12 @@ class SentryApi::Client
|
|
58
54
|
# SentryApi.update_team('team-slug', {name:'team-name'})
|
59
55
|
#
|
60
56
|
# @param team_slug [String] the slug of the team
|
61
|
-
# @param organization_slug [String] the slug of the organization
|
62
57
|
# @param [Hash] options A customizable set of options.
|
63
58
|
# @option options [String] :name the name for the new project.
|
64
59
|
# @option options [String] :slug optionally a slug for the new project. If it’s not provided a slug is generated from the name.
|
65
60
|
# @return [SentryApi::ObjectifiedHash]
|
66
|
-
def update_team(team_slug, options={}
|
67
|
-
get("/teams/#{
|
61
|
+
def update_team(team_slug, options={})
|
62
|
+
get("/teams/#{@default_org_slug}/#{team_slug}/", body: options)
|
68
63
|
end
|
69
64
|
|
70
65
|
end
|
data/lib/sentry-api/version.rb
CHANGED
data/sentry-api.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = SentryApi::VERSION
|
9
9
|
spec.authors = ["Thierry Xing"]
|
10
10
|
spec.email = ["thierry.xing@gmail.com"]
|
11
|
-
spec.licenses = ['
|
11
|
+
spec.licenses = ['BSD']
|
12
12
|
spec.summary = %q{Ruby client for Sentry API}
|
13
13
|
spec.description = %q{A Ruby wrapper for the Sentry API}
|
14
14
|
spec.homepage = "https://github.com/thierryxing/sentry-ruby-api"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thierry Xing
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httmultiparty
|
@@ -114,6 +114,7 @@ extensions: []
|
|
114
114
|
extra_rdoc_files: []
|
115
115
|
files:
|
116
116
|
- ".gitignore"
|
117
|
+
- ".rakeTasks"
|
117
118
|
- ".travis.yml"
|
118
119
|
- Gemfile
|
119
120
|
- LICENSE.txt
|
@@ -127,6 +128,7 @@ files:
|
|
127
128
|
- lib/sentry-api/client/events.rb
|
128
129
|
- lib/sentry-api/client/organizations.rb
|
129
130
|
- lib/sentry-api/client/projects.rb
|
131
|
+
- lib/sentry-api/client/releases.rb
|
130
132
|
- lib/sentry-api/client/teams.rb
|
131
133
|
- lib/sentry-api/configuration.rb
|
132
134
|
- lib/sentry-api/error.rb
|
@@ -138,7 +140,7 @@ files:
|
|
138
140
|
- sentry-api.gemspec
|
139
141
|
homepage: https://github.com/thierryxing/sentry-ruby-api
|
140
142
|
licenses:
|
141
|
-
-
|
143
|
+
- BSD
|
142
144
|
metadata:
|
143
145
|
allowed_push_host: https://rubygems.org
|
144
146
|
post_install_message:
|
@@ -157,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
159
|
version: '0'
|
158
160
|
requirements: []
|
159
161
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.6.6
|
161
163
|
signing_key:
|
162
164
|
specification_version: 4
|
163
165
|
summary: Ruby client for Sentry API
|