You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sentry Ruby API is a Ruby wrapper for the [getsentry/sentry API](https://docs.sentry.io/hosted/api/). **And it still being developed, and not published yet.**
3
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sentry`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
5
-
## Installation
6
-
7
-
add to a Gemfile:
8
-
9
-
```ruby
10
-
gem 'sentry', :path => '/path/to/sentry'
11
-
```
5
+
TODO: Delete this and the text above, and describe your gem
12
6
13
-
## Usage
7
+
## Installation
14
8
15
-
Configuration example:
9
+
Add this line to your application's Gemfile:
16
10
17
11
```ruby
18
-
Sentry.configure do |config|
19
-
config.endpoint ='http://example.com/api/0'
20
-
config.auth_token ='your_auth_token'
21
-
config.default_org_slug ='sentry-sc'
22
-
end
12
+
gem 'sentry'
23
13
```
24
14
25
-
(Note: If you are using getsentry.com's hosted service, your endpoint will be `https://app.getsentry.com/api/0`)
s =Sentry.client(endpoint:'https://api.example.com', auth_token:'your_auth_token', default_org_slug:'sentry-sc')
48
-
49
-
# a paginated response
50
-
projects =Sentry.projects
51
-
52
-
# check existence of the next page
53
-
projects.has_next_page?
54
-
55
-
# retrieve the next page
56
-
projects.next_page
57
-
58
-
# iterate all projects
59
-
projects.auto_paginate do |project|
60
-
# do something
61
-
end
23
+
## Usage
62
24
63
-
# retrieve all projects as an array
64
-
projects.auto_paginate
65
-
```
25
+
TODO: Write usage instructions here
66
26
67
27
## Development
68
-
The basic framework had been finished, meanwhile the APIs of Organizations and Projects had been added, more APIs will be added later. You are welcome to help me with it.
69
28
70
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run
71
-
`rake spec` to run the tests. You can also run `bin/console` for an interactive
72
-
prompt that will allow you to experiment.
29
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run`bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
73
32
74
-
## License
33
+
## Contributing
75
34
76
-
Released under the BSD 2-clause license. See LICENSE.txt for details.
35
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sentry.
77
36
78
-
## Special Thank
79
-
Thanks to NARKOZ's [gitlab](https://github.com/NARKOZ/gitlab) ruby wrapper which really gives me a lot of inspiration.
# @param issue_id [String] the ID of the issue to retrieve.
56
+
# @param [Hash] options A customizable set of options.
57
+
# @option options [String] :status the new status for the groups. Valid values are "resolved", "unresolved" and "muted".
58
+
# @option options [String] :assignedTo the username of the user that should be assigned to this issue.
59
+
# @option options [Boolean] :hasSeen in case this API call is invoked with a user context this allows changing of the flag that indicates if the user has seen the event.
60
+
# @option options [Boolean] :isBookmarked in case this API call is invoked with a user context this allows changing of the bookmark flag.
61
+
# @option options [Boolean] :isSubscribed in case this API call is invoked with a user context this allows changing of the subscribed flag.
62
+
defupdate_issue(issue_id,options={})
63
+
put("/issues/#{issue_id}/",body: options)
40
64
end
41
65
42
-
# Retrieves the details of the latest sample for an aggregate.
66
+
# Retrieves the details of the latest event.
43
67
#
44
68
# @example
45
-
# Sentry.projects
69
+
# Sentry.latest_event('120633628')
46
70
#
47
-
# @return [Array<Sentry::ObjectifiedHash>]
48
-
deflatest_events
71
+
# @param issue_id [String] the ID of the issue to retrieve.
72
+
# @return Sentry::ObjectifiedHash
73
+
deflatest_event(issue_id)
74
+
get("/issues/#{issue_id}/events/latest/")
49
75
end
50
76
51
-
# Retrieves the details of the oldest sample for an aggregate.
77
+
# Retrieves the details of the oldest event.
52
78
#
53
79
# @example
54
-
# Sentry.projects
80
+
# Sentry.oldest_event('120633628')
55
81
#
56
-
# @return [Array<Sentry::ObjectifiedHash>]
57
-
defoldest_events
82
+
# @param issue_id [String] the ID of the issue to retrieve.
0 commit comments