Coder Social home page Coder Social logo

Get share information about nextcloud-node-client HOT 1 OPEN

hobigo avatar hobigo commented on August 16, 2024
Get share information

from nextcloud-node-client.

Comments (1)

hobigo avatar hobigo commented on August 16, 2024 1

Hi sushibear,
great requirement. It is not yet planned.

There is only an API to get all the shares of a user and to query share information.
A file/folder can have many shares. If your find multiple shares, you have to decide if the desired share is already available.

I would extend the API of File and Folder with the method File.getShares() / Folder.getShares()
This method will return a list of share objects of the File/Folder.

This will be my next activity. But I can make no promises when it will be available.

Implementation:
GET https://..../ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2Fp1%2Fp2%2Fp3&reshares=true

{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":[{"id":"54","share_type":3,"uid_owner":"xxx","displayname_owner":"xxx","permissions":17,"can_edit":true,"can_delete":true,"stime":1607531674,"parent":null,"expiration":null,"token":"Gwr8LMXTGAjW2o3","uid_file_owner":"xxx","note":"","label":"","displayname_file_owner":"xxx","path":"/p1/p2/p3","item_type":"folder","mimetype":"httpd/unix-directory","storage_id":"home::xxx","storage":2,"item_source":60991,"file_source":60991,"file_parent":15465,"file_target":"/p3","share_with":null,"share_with_displayname":"(Geteilter Link)","password":null,"send_password_by_talk":false,"url":"http://...../index.php/s/Gwr8LMXTGAjW2o3","mail_send":0,"hide_download":0},{"id":"55","share_type":3,"uid_owner":"xxx","displayname_owner":"xxx","permissions":17,"can_edit":true,"can_delete":true,"stime":1607534317,"parent":null,"expiration":null,"token":"Kw5qTZWcdXnN3Y5","uid_file_owner":"xxxx","note":"","label":"","displayname_file_owner":"xxx","path":"/p1/p2/p3","item_type":"folder","mimetype":"httpd/unix-directory","storage_id":"home::holger","storage":2,"item_source":60991,"file_source":60991,"file_parent":15465,"file_target":"/p3","share_with":null,"share_with_displayname":"(Geteilter Link)","password":null,"send_password_by_talk":false,"url":"http://xxx/index.php/s/Kw5qTZWcdXnN3Y5","mail_send":0,"hide_download":0}]}}

from nextcloud-node-client.

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.