Skip to content

Commit 0338cb0

Browse files
committed
Support statsPeriod and query param for project_issues
1 parent b47bedc commit 0338cb0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: ruby
22
rvm:
3-
- 1.9.3
43
- 2.0
54
- 2.1
65
- 2.2

lib/sentry-api/client/projects.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def project_events(project_slug)
149149
get("/projects/#{@default_org_slug}/#{project_slug}/events/")
150150
end
151151

152-
# Retrieve an Event for a Project
152+
# Return a list of issues (groups) bound to a project. All parameters are supplied as query string parameters.
153153
#
154154
# @example
155155
# SentryApi.project_event('project-slug', 'event-id')
@@ -161,14 +161,18 @@ def project_event(project_slug, event_id)
161161
get("/projects/#{@default_org_slug}/#{project_slug}/events/#{event_id}/")
162162
end
163163

164-
# Return a list of aggregates bound to a project
164+
# List a Project’s Issues
165165
#
166166
# @example
167-
# SentryApi.project_issues('project-slug')
167+
# SentryApi.project_issues('project-slug', {'query': 'is:unresolved Build-version:6.5.0'})
168168
#
169+
# @param project_slug [String] the slug of the project the client keys belong to.
170+
# @param [Hash] options A customizable set of options.
171+
# @option options [String] :statsPeriod an optional stat period (can be one of "24h", "14d", and "").
172+
# @option options [String] :query an optional Sentry structured search query. If not provided an implied "is:resolved" is assumed.)
169173
# @return [Array<SentryApi::ObjectifiedHash>]
170-
def project_issues(project_slug)
171-
get("/projects/#{@default_org_slug}/#{project_slug}/issues/")
174+
def project_issues(project_slug, options={})
175+
get("/projects/#{@default_org_slug}/#{project_slug}/issues/", query: options)
172176
end
173177

174178
end

lib/sentry-api/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SentryApi
2-
VERSION = "0.3.0"
2+
VERSION = "0.3.1"
33
end

0 commit comments

Comments
 (0)