Add Packages to Pro API, and a few Typing Enhancements#54
Add Packages to Pro API, and a few Typing Enhancements#54brysontyrrell merged 14 commits intomacadmins:mainfrom
Conversation
…nderlying request if the HTTP method is``POST``.
…ed by the documentation; duplicated the documented values for filter.
|
Can you discuss the inclusion of overloads? I'm not seeing the value they're bringing to the two interfaces you've implemented them with. |
|
Sure! It allows the type checker to infer what will be returned by the method, based on whether or not pagination is being used. This doesn't do much within the API itself, but it improves the ergonomics of code that consumes the SDK. |
Not two minutes after I sent that did it click that it made the return type deterministic. ...I am not against this. I'd want to get it added to the remaining Pro API methods though and included in the dev docs as a part of the style guide. |
|
This is an overall very solid PR with good enhancements. 🎉 |
…nventory_v2``. Update ``get_packages_v1()`` documentation to correct entity name. Update ``get_mdm_commands_v2()`` documentation to correct entity name. Insert section heading comments for consistency in ``pro_api/__init__.py``
Overloads added to other Pro API methods. |
…ptional[]`` type hinting.
Updated |
Add Packages to Pro API, and a few Typing Enhancements
Pro
PackageAPIPackagemodel.ProApi.get_packages_v1()with overloads.Typing Enhancements
filesparameter topro_api_request()(create policies with icons!)get_computer_inventory_v1().