macadmins / macadmins/jamf-pro-sdk-python
[Feature Request] Pass a model to the Classic and Pro API request methods as the return type.
Aperta
@liquidz00 ci sta già lavorando.
Dal 20/6/2025.
enhancement
- Lingua principale
- Python
- Stelle
- 69
- Fork
- 16
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Proposal
When using the classic_api_request and pro_api_request methods on the client directly users have to take the response and cast it to an SDK model themselves.
resp = jamf_client.classic_api_request(
method="get",
resource_path=f"computergroups/name/{group_name}"
)
group = ClassicComputerGroup(**resp.json()["computer_group"])
Both methods should optionally accept an SDK model as an optional response type. When set, the requests response object is not returned, but the method attempts to instantiate the provided model from the data.
group = jamf_client.classic_api_request(
method="get",
resource_path=f"computergroups/name/{group_name}",
return_model=ClassicComputerGroup
)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.