WIP: Add public/get_last_trades_by_currency method, allow for pagination results #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ok, so I was playing around with your library some more, tried to add the
get_last_trades_by_currency
method, but that didn't work on its own, as the "result" part of the json response actually has two parts - "trades" which has the collection of trades and has_more which is a bool.Couldn't parse it w/ the existing helper enum, so had to write an object that wraps around Either..which uhm I don't like? I mean it works, I was able to make it run, but I'd say I'm still new-ish to Rust and it just isn't a solution I like right out of the gate, hence the WIP.
If I'm reading it correctly, Either is really the same object collections crate uses that you're using here so you can parse either the response or an error and propagate it back to the user?
Also I couldn't figure out what's the purpose of Any enums, looks like it's dead code? Thanks for writing this library, I think I'm getting the gist of the internals and I definitely learned a lot by reading the code and playing around w/ it!