Repository navigation
Add filtered variants - #3
Merged
Merged
Conversation
digizeph
requested changes
Aug 2, 2026
digizeph
left a comment
Member
There was a problem hiding this comment.
Review (via Hermes Agent)
Feature is useful and the API design (a _filtered sibling per loader, delegating to get_reader_with_params) is clean. Blocking issues below; also needs a rebase on top of PR #1 and PR #2.
- netixlan endpoint bug carried over (inline) — the filtered netixlan variant still fetches
/api/org; PR #1 fixes this in the unfiltered loader. Merging as-is meansload_peeringdb_netixlan_filteredreturns org objects (silently deserialized,asn= None). - Clippy fails (inline) —
get_readeris now dead code; CI runscargo clippy -- -D warnings, so this blocks merge. - Conflicts with PR #1 (netixlan.rs) and PR #2 (utils.rs) — PR #3 was branched from pre-fix main. PR #2 removed the unconditional empty
Authorization: Api-Keyheader; PR #3's utils.rs still contains that logic and would revert the fix if resolved naively. Please rebase onto main after #1 and #2 merge.
Non-blocking: consider a unit test for the filtered path (e.g. fetch with ix_id filter and assert all records match).
| /// | ||
| /// [api]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20netixlan | ||
| pub fn load_peeringdb_netixlan_filtered(params: &[(&str, &str)]) -> Result<Vec<PeeringdbNetixlan>> { | ||
| let mut reader = get_reader_with_params("https://www.peeringdb.com/api/org", params)?; |
Member
| @@ -4,6 +4,13 @@ use std::io::Read; | |||
| use tracing::warn; | |||
|
|
|||
| pub(crate) fn get_reader(url: &str) -> Result<Box<dyn Read + Send>> { | |||
Member
There was a problem hiding this comment.
get_reader is now unused (all callers go through get_reader_with_params) and the crate CI runs cargo clippy --all-features -- -D warnings, so this fails the build. Either drop the wrapper and have base loaders call get_reader_with_params(url, &[]), or keep it referenced.
This was referenced Aug 2, 2026
digizeph
force-pushed
the
add-query-params
branch
from
August 10, 2026 21:36
64c4d11 to
5146869
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds a variant of the API calls that allow for filters, such that we can allow for filtering on the peeringdb side instead of having to query everything and do client-side filtering.
Cheers