Skip to content
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

Implement retrieval of single thumbnail and content #1618

Open
ianef opened this issue Nov 18, 2024 · 1 comment
Open

Implement retrieval of single thumbnail and content #1618

ianef opened this issue Nov 18, 2024 · 1 comment
Labels
status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question

Comments

@ianef
Copy link

ianef commented Nov 18, 2024

Describe the bug

I am trying to get the thumbnail content of a specific size via the API but I am having to resort to retrieving the thumbnail URL and performing a standard GET request to do this.

MS Graph does provide an endpoint for doing this, although it only describes the endpoint for me/drive/items, it does however work in other places too:
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_thumbnails?view=odsp-graph-online#get-a-single-thumbnail

Using graph explorer I have tested it against the drives endpoint, and it works, so I would suggest it should work against all the endpoint listed at the top of the article.

Could this be implemented within the PHP SDK please? Or is there already some way of achieving this?

Expected behavior

I would have thought the fluent request would look something like this:

$client->drives()->byDriveId($driveId)->items()->byDriveItemId($driveItem->getId())->thumbnails()->byThumbnailSetId('0')->small()->get()->wait();

And

$client->drives()->byDriveId($driveId)->items()->byDriveItemId($driveItem->getId())->thumbnails()->byThumbnailSetId('0')->large()->content()->get()->wait();

How to reproduce

NA.

SDK Version

2.18.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

No response

Configuration

No response

Other information

No response

@ianef ianef added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 18, 2024
@Ndiritu
Copy link
Contributor

Ndiritu commented Jan 13, 2025

@ianef thanks for reaching out.

Thanks for the feedback. Just curious if you've explored using the $select query parameter which would allow you to filter the size of the thumbnail.

@Ndiritu Ndiritu added type:question An issue that's a question status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question
Projects
None yet
Development

No branches or pull requests

2 participants