OneDrive cloud provides a functionality to get embedded iFrame tags with a publicly accessible URL inside. I'm trying to achieve the same thing using Python OneDrive SDK
There are various features as shown on the documentation page like, uploading, downloading, renaming a file, etc. What I'm trying to achieve here is create an embedded iFrame and get it in response. Something like this.
There is a function inside one of the classes of the SDK called create_link. This function is located inside the same class where other functions like upload
are present. onedrivesdk/request/item_request_builder.pyitem_builder_request.py
There is also a type
argument that can be used. I believe, embed
would be the argument that we would pass.
However, when I execute client.item(drive='me', id='fileid').create_link('embed')
it does not give the same result as it's shown in case of Graph API on this page.
What should I do?
My purpose is to basically get a public URL to the excel sheet that I upload via. python code. This URL should not ask for a login.
def create_link(self, type):
"""Executes the createLink method
Args:
type (str):
The type to use in the method request
Returns:
:class:`ItemCreateLinkRequestBuilder<onedrivesdk.request.item_create_link.ItemCreateLinkRequestBuilder>`:
A ItemCreateLinkRequestBuilder for the method
"""
return ItemCreateLinkRequestBuilder(self.append_to_request_url("action.createLink"), self._client, type)
What I have right now is the item object after I upload the file.