Coder Social home page Coder Social logo

Comments (9)

kevklam avatar kevklam commented on August 16, 2024 1

Ah, gotcha. Yes, unfortunately that's less than convenient. I'll forward this feedback to the service team.

from onedrive-sdk-ios.

kevklam avatar kevklam commented on August 16, 2024 1

I haven't heard back, but will post here when I do.

from onedrive-sdk-ios.

tobihagemann avatar tobihagemann commented on August 16, 2024

ODItemRequestBuilder's itemByPath: method doesn't seem to work on shared folders either. I'm always receiving a response with an empty collection. That's too bad, I really liked this method.

But it works, if I use the id of remoteItem (which doesn't exist in this SDK yet, but I've implemented a category on ODItem as a workaround).

Maaan, I really wanted to avoid implementing an ID-based directory browser. It's so similar to Google Drive and I think it's awful. Dropbox has a really good API purely based on paths, as it should be. I guess I have no choice, or maybe someone here has an idea to use paths to access shared folders?

from onedrive-sdk-ios.

kevklam avatar kevklam commented on August 16, 2024

Hi @MuscleRumble,
Regarding shared folders - the service API returns all facets (including 'folder' as you discovered) as sub-properties of the 'remoteItem' facet rather than on the item itself.

Can you give an example of a failing query using itemByPath? I did a quick test against a shared folder and it returned the item including remoteItem facet as expected (at least in the JSON response - as you noticed, remoteItem is not exposed as a property on ODItem yet):

[ODClient authenticatedClientWithCompletion:^(ODClient *client, NSError *error){
        [[[[[client drive] items:@"root"] itemByPath:@"sharedfolder"] request] getWithCompletion:^(ODItem *response, NSError *error) {
            NSLog(@"name: %@ id: %@", response.name, response.id);
        }];
    }];

from onedrive-sdk-ios.

tobihagemann avatar tobihagemann commented on August 16, 2024

Thanks for looking into it! Sorry, I wasn't clear enough. Now try to get the children of this shared folder by using the children method between the itemByPath: and request methods:

[[[[[[client drive] items:@"root"] itemByPath:@"sharedfolder"] children] request] getWithCompletion:^(...){...}]

That doesn't work for me. I can't "navigate" inside a shared folder by its path.

from onedrive-sdk-ios.

kevklam avatar kevklam commented on August 16, 2024

As of PR #96 remoteItem should be supported (will need to explicitly point pod at this commit until pod is versioned next)

from onedrive-sdk-ios.

tobihagemann avatar tobihagemann commented on August 16, 2024

Alright, thanks! How about "navigating" through a shared folder by its path. Any update on this?

from onedrive-sdk-ios.

kevklam avatar kevklam commented on August 16, 2024

Unfortunately it looks like there is nothing planned in that regard in the short term, but it's been added to the growing "to-investigate" list of features :)

from onedrive-sdk-ios.

tobihagemann avatar tobihagemann commented on August 16, 2024

Okay, I guess I have to work with IDs then. Thanks for the info!

from onedrive-sdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.