-
Notifications
You must be signed in to change notification settings - Fork 15
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
URL params are not handled cleanly when defined #45
Comments
Probably the easiest way to ensure params are appropriately dealt with is to utilise the ability of For example:
In the case of querying devices using Any methods that then call on the |
- params input is now converted to req_params while preserving any input params
- Cleaned up my bad merge on Devices.get_device() and adds some help docs - Closes the session on deinit that the Connection class now opens - Resolves issue #45 by preserving input parameters instead of overwriting them - Added setup.cfg and pyproject.toml files for packaging new releases - Added a few basic tests - Updates the changelog and gitignore files
I think this should finally be fixed now with the merge of PR #59 |
* resolves the bug in issue #25 by removing id_override, replacing data with params, and adding specific input parameters. * required changes to resolve the bug in issue #25. migrated from updating the url in _get_data to a local _params variable that is updated with the input params var. * added Unreleased section and updated with issue #25 changes. * Fix calls that return a single item. * Return single items without wrapping in list. * added params= to be explicit, and marked a potential bug. * updated CHANGELOG * added docstring * updated CHANGELOG * Resolves Issue 38 (#1) * Resolves issue #38 * Resolves issue #24 - Updated update_device input to accept both name and device_name input (breaking change) - Data is now updated with the inputs - Added validation that data has input - Updated the README with update_device's new inputs * Adding download option to profile * Update CHANGELOG.md * v3.0.7 * adding _get_xml connection * update CHANGELOG * update README * Adding include_awaiting_enrollment option #43 (#44) * Merging dev branch (#46) * Use request params instead of url string in SimpleMDM._get_data() * Fix Devices.delete_device() * Add methods for enabling/disabling remote desktop * Add /devices request rate limiting * Add profile and user listing * Add retry on 5xx errors to GET requests * Updates gitignore and changelog (#47) - Added ignoring egg files - Updated changelog * A little clean up, some fixen, and a few tests. (#48) - Cleaned up my bad merge on Devices.get_device() and adds some help docs - Closes the session on deinit that the Connection class now opens - Resolves issue #45 by preserving input parameters instead of overwriting them - Added setup.cfg and pyproject.toml files for packaging new releases - Added a few basic tests - Updates the changelog and gitignore files * Add script support * Add error handling for update_script * Fix handling of req_params for pagination * Update CHANGELOG.md * Fix handling of req_params for pagination * Update CHANGELOG.md * Add Sample Projects Adding some samples projects for issue #28 * Use monotonic time for rate limit and fix sleep time calc * Update CHANGELOG.md Co-authored-by: Steve <steve.kueng@gmail.com> Co-authored-by: Bryan Heinz <git@bryanheinz.com> Co-authored-by: Jon Crain <joncrain@users.noreply.github.com>
In the current SimpleMDM.py, a starting_after=0 is force-applied to each URL in _get_data, and any passed parameters tacked on the end. When overriding the starting value (e.g. for Logs, found while testing #25) this ends up with two start values in the URL, eg:
https://a.simplemdm.com/api/v1/logs?limit=100&starting_after=0&starting_after=aldskjrgawop4fjasdlkfjasfw93f4war
Obviously the SimpleMDM service is honoring the second one of these because it works, but we should add some more intelligent parsing of the parameters and use the existing start_id value if specific params are passed from the various functions.
The text was updated successfully, but these errors were encountered: