[Feature Request] Pass a model to the Classic and Pro API request methods as the return type.
@liquidz00 đang làm issue này rồi.
Từ ngày 20/6/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
)
- Ngôn ngữ chính
- Python
- Star
- 69
- Fork
- 16
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của macadmins/jamf-pro-sdk-python
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
[Bug] preview/mdm/commands deprecated & removed which breaks send_mdm_command_preview() method. Đang mởbug
macadmins/jamf-pro-sdk-python#68 · 1 bình luận · 1 người được giao ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
macadmins/jamf-pro-sdk-python#55 · 1 bình luận ·
-
enhancement feedback
macadmins/jamf-pro-sdk-python#33 · 4 bình luận · 1 người được giao ·
-
feedback
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
macadmins/jamf-pro-sdk-python#30 · 1 bình luận ·
Tất cả issue của macadmins/jamf-pro-sdk-python
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·