Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Maybe?) Universal Snipe-IT pagination #117

Open
uberbrady opened this issue Aug 19, 2023 · 0 comments
Open

(Maybe?) Universal Snipe-IT pagination #117

uberbrady opened this issue Aug 19, 2023 · 0 comments

Comments

@uberbrady
Copy link
Member

So when we fetch Models, it looks like we fetch one page, and then, if needed, a second page. But that's it. (This may be the cause of #111). The function get_snipe_users seems to do things the right way, but isn't really user-specific - just about any method could do something similar. I suspect we can extract out the "iterate through offsets and page sizes until you get everything" logic into its own functions and just use it in both get_snipe_users as well as get_snipe_models.

It sounds like, according to @jerm, we might want to just steal most of this: grokability/kandji2snipe#13 - and that may handle most of the problem with #111 , anyways.

We don't want to fall into a situation where we're making 'perfect' the enemy of 'good'. And maybe that's just good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant