New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieve the events list for a project for v2 #1307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to patch everything today
src/api.rs
Outdated
@@ -2307,6 +2351,81 @@ pub struct Project { | |||
pub team: Option<Team>, | |||
} | |||
|
|||
#[derive(Debug, Deserialize)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have all those types in sentry-sdk crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kamilogorek I found Event
but I don't think you're talking about this one because it is not good for this JSON response.
For EventUser
you were right because we can use sentry::protocol::User
instead of EventUserOption
.
For EventTags
I suggest to keep the Vec<EventTag>
due the JSON serialization. If we use the same way used for sentry-sdk we have to refactor tags
in Vec<BTreeMap<String, String>>
(or HashMap
) but we always have a BTreeMap (or HashMap) with a tuple ("key", "...")
and a ("value", "...")
cause the nature of the response.
Fixed everything, applied necessary changes and added basic cli tests. Thanks for your contribution! |
Co-authored-by: Kamil Og贸rek <kamil.ogorek@gmail.com>
Sorry to re-open a PR for the same feat, but I can't re-open #1047. This PR adds
As requested on this comment I added two flags:
limit
is the limit of API requestsmax_rows
is the limit of events the table will print (default is all)I'm not really sure about the last flag but I think it is the closets thing to "per-page" as
cursor
moves 100 items at a time.@kamilogorek sorry if I could only work on it now but I was a bit busy 馃槄