Skip to content

Implement retrieval of single thumbnail and content #1618

@ianef

Description

@ianef

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions