Configuring Graph Requests and using Response Getters
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- php
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu bằng cách xem lại các ví dụ request-builder của PHP SDK cho các endpoint /me/drive/root/children và /drives/{id}, cùng với tài liệu về các đối tượng response. Ghi lại cách ánh xạ các đường dẫn endpoint HTTP sang các lệnh gọi PHP và cách kiểm tra các trường được trả về cũng như dữ liệu lồng nhau. Công việc được xem là hoàn tất khi hướng dẫn bao quát cả việc chuyển đổi request và truy cập response, với các ví dụ khớp với các truy vấn đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi much of the PHP SDK documentation refers to HTTP requests like
https://graph.microsoft.com/v1.0/me/drive/root/children
However when I try to translate this to a Graph query
$result = $graphServiceClient->users()->byUserId("my-user-id")->drive()->root()->children()->get()->wait();
or
$result = $graphServiceClient->users()->byUserId("my-user-id")->drive()->root()->children()->post()->wait();
The SDK tells me root() and children() are not part of the drive request builder.
Is there documentation that shows how to translate HTTP examples like "https://graph.microsoft.com/v1.0/me/drive/root/children" into their PHP equivalent? Or, even better, documentation that shows each of the endpoints for PHP SDK?
Lastly does the PHP SDK, provide a response getter and/or getter for every data field returned from the server? Again, the documentation gives HTTP request examples with JSON response examples,
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives/$entity",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET me/drive?$select=driveType,owner",
"createdDateTime": "2023-10-22T00:11:21Z",
"description": "",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"lastModifiedDateTime": "2024-06-27T10:39:41Z",
"name": "OneDrive",
"webUrl": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Documents",
"driveType": "business",
"createdBy": {
"user": {
"displayName": "System Account"
}
},
"lastModifiedBy": {
"user": {
"email": "[email protected]",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"displayName": "Martin Thorburn"
}
},
"owner": {
"user": {
"email": "[email protected]",
"id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"displayName": "Martin Thorburn"
}
},
"quota": {
"deleted": 1030849340,
"remaining": 1097450601323,
"state": "normal",
"total": 1099511627776,
"used": 1030177113
}
}
however, if I use a query like:
$result = $graphServiceClient->drives()->byDriveId('my-drive-id')->get()->wait();
I do not seem to get anything like the documentated json response. Indeed if I use
print_r($result);
all I get is a huge, unformatted object !!
Is there a reponse getter, i.e.
$result->getResponse();
or
$result->getbody();
How would I even try to read the response, or even know what getters to use to access the retuted data ?
I woould really appreciate some help and guidance on this?
- Ngôn ngữ chính
- PHP
- Star
- 669
- Fork
- 150
- Merge trung bình
- 15 giờ 21 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 microsoftgraph/msgraph-sdk-php
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-php#1794 · 2 bình luận ·
-
bug: metadata type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
microsoftgraph/msgraph-sdk-php#1739 · 6 bình luận ·
-
status:waiting-for-triage type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-php#1643 · 8 bình luận · 4 reaction ·
-
status:waiting-for-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-php#1800 · 2 reaction ·
-
NowĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
microsoftgraph/msgraph-sdk-php#1799 ·
Tất cả issue của microsoftgraph/msgraph-sdk-php
Issue tương tự
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Перевод устарел
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Form
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
symfony/symfony-docs#23159 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug component: bulk editor support
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Yoast/wordpress-seo#23669 ·
Maintainer thường phản hồi trong vòng 3 ngày