Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

which function is same as api.get(path_id,byte_range) in python3 onedrivesdk? #186

Closed
Gorparth opened this issue Apr 3, 2021 · 5 comments

Comments

@Gorparth
Copy link

Gorparth commented Apr 3, 2021

I'm writing onedrivefs in python3 this onedrive sdk, i'm referring existing code of onedrive-fuse-fs in that read fuction has used this code
def read(self, path, size, offset):
path_id = self._resolve(path)
return self.api.get(path_id, byte_range='{}-{}'.format(offset, offset+size))

i want to implement similar thing i've used download function from http-provider file that look like :

def read(self, path, length, offset):
return authed_usr.client.item(id=authed_usr.folder[path]).download(path)

i'm downloading same file in that folder and folder dictionary gives the item id, but its not working as expected invalid arguement and File type unknown (application/octet-stream) is not supported such errors showing up.

i'm attaching that file where it is implemented.
onedrivefs.txt

@KTibow
Copy link

KTibow commented Apr 4, 2021

On which line? It was hard to understand what you're saying.

@Gorparth
Copy link
Author

Gorparth commented Apr 4, 2021

My question is which function in onedrivesdk will give output same as api.get() method.

the .download() function is returning full file at once, but i want it in chunks as api.get method is giving.

@Gorparth
Copy link
Author

Gorparth commented Apr 4, 2021

On which line? It was hard to understand what you're saying.

line number 98 in onedrivefsnew.txt
in this file i've tried different methods but none of them worked

and what i want is in onedrivefsold.txt line number 191
onedrivefsold.txt
onedrivefsnew.txt

@KTibow
Copy link

KTibow commented Apr 4, 2021

Try playing around with autocomplete. That's how I find most functions in this library. BTW this repo is abandoned.

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #209 for more information

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants