platypush/plugins/nextcloud/__init__.py
def create_share(self, path: str, share_type: str, share_with: Optional[str] = None, public_upload: bool = False,
                     password: Optional[str] = None, permissions: Optional[List[str]] = None, **server_args) -> dict:
        """
        Share a file/folder with a user/group or a public link.

        :param path: Path to the resource to be shared.
        :param share_type: Share type. Supported values:

          - ``user``
          - ``group``
          - ``public_link``
          - ``email``
          - ``federated_cloud_share``
          - ``circle``
          - ``talk_conversation``

        :param share_with: User/group ID, email or conversation ID the resource should be shared with.
        :param public_upload: Whether public upload to the shared folder is allowed (default: False).
        :param password: Optional password to protect the share.
        :param permissions: Share permissions, as a list including any of the following (default: ``read``):

          - ``read``
          - ``update``
          - ``create``
          - ``delete``
          - ``share``
          - ``all``

        :param server_args: Override the default server settings (see :meth:`._get_client` arguments).
        :return: The details of the newly created share. Example:

          .. code-block:: json

            {
              "id": "4",
              "share_type": 3,
              "uid_owner": "your_uid",
              "displayname_owner": "Your Name",
              "permissions": 17,
              "can_edit": true,
              "can_delete": true,
              "stime": 1599691325,
              "parent": null,
              "expiration": null,
              "token": "AbCdEfG0123456789",
              "uid_file_owner": "your_uid",
              "note": "",
              "label": "",
              "displayname_file_owner": "Your Name",
              "path": "/Shared Path",
              "item_type": "folder",
              "mimetype": "httpd/unix-directory",
              "storage_id": "home::your-uid",
              "storage": 2,
              "item_source": 13960,
              "file_source": 13960,
              "file_parent": 6,
              "file_target": "/Shared Path",
              "share_with": null,
              "share_with_displayname": "(Shared link)",
              "password": null,
              "send_password_by_talk": false,
              "url": "https://your-domain/nextcloud/index.php/s/AbCdEfG0123456789",
              "mail_send": 1,
              "hide_download": 0
            }

        """
        share_type = self._get_share_type(share_type)
        permissions = self._get_permissions(permissions or ['read'])
        return self._execute(server_args, 'create_share', path, share_type=share_type, share_with=share_with,
                             public_upload=public_upload,
                             password=password, permissions=permissions)

        Share a file/folder with a user/group or a public link.

        :param path: Path to the resource to be shared.
        :param share_type: Share type. Supported values:

          - ``user``
          - ``group``
          - ``public_link``
          - ``email``
          - ``federated_cloud_share``
          - ``circle``
          - ``talk_conversation``

        :param share_with: User/group ID, email or conversation ID the resource should be shared with.
        :param public_upload: Whether public upload to the shared folder is allowed (default: False).
        :param password: Optional password to protect the share.
        :param permissions: Share permissions, as a list including any of the following (default: ``read``):

          - ``read``
          - ``update``
          - ``create``
          - ``delete``
          - ``share``
          - ``all``

        :param server_args: Override the default server settings (see :meth:`._get_client` arguments).
        :return: The details of the newly created share. Example:

          .. code-block:: json

            {
              "id": "4",
              "share_type": 3,
              "uid_owner": "your_uid",
              "displayname_owner": "Your Name",
              "permissions": 17,
              "can_edit": true,
              "can_delete": true,
              "stime": 1599691325,
              "parent": null,
              "expiration": null,
              "token": "AbCdEfG0123456789",
              "uid_file_owner": "your_uid",
              "note": "",
              "label": "",
              "displayname_file_owner": "Your Name",
              "path": "/Shared Path",
              "item_type": "folder",
              "mimetype": "httpd/unix-directory",
              "storage_id": "home::your-uid",
              "storage": 2,
              "item_source": 13960,
              "file_source": 13960,
              "file_parent": 6,
              "file_target": "/Shared Path",
              "share_with": null,
              "share_with_displayname": "(Shared link)",
              "password": null,
              "send_password_by_talk": false,
              "url": "https://your-domain/nextcloud/index.php/s/AbCdEfG0123456789",
              "mail_send": 1,
              "hide_download": 0
            }

        
Share a file/folder with a user/group or a public link.
Share a file / folder with a user / group or a public link .
def create_share(self, path: str, share_type: str, share_with: Optional[str] = None, public_upload: bool = False,
                     password: Optional[str] = None, permissions: Optional[List[str]] = None, **server_args) -> dict:
        share_type = self._get_share_type(share_type)
        permissions = self._get_permissions(permissions or ['read'])
        return self._execute(server_args, 'create_share', path, share_type=share_type, share_with=share_with,
                             public_upload=public_upload,
                             password=password, permissions=permissions)
def create_share ( self , path : str , share_type : str , share_with : Optional [ str ] = None , public_upload : bool = False , password : Optional [ str ] = None , permissions : Optional [ List [ str ] ] = None , ** server_args ) -> dict : share_type = self . _get_share_type ( share_type ) permissions = self . _get_permissions ( permissions or [ 'read' ] ) return self . _execute ( server_args , 'create_share' , path , share_type = share_type , share_with = share_with , public_upload = public_upload , password = password , permissions = permissions )
Share a file/folder with a user/group or a public link.
Share a file / folder with a user / group or a public link .
"""
        Share a file/folder with a user/group or a public link.

        :param path: Path to the resource to be shared.
        :param share_type: Share type. Supported values:

          - ``user``
          - ``group``
          - ``public_link``
          - ``email``
          - ``federated_cloud_share``
          - ``circle``
          - ``talk_conversation``

        :param share_with: User/group ID, email or conversation ID the resource should be shared with.
        :param public_upload: Whether public upload to the shared folder is allowed (default: False).
        :param password: Optional password to protect the share.
        :param permissions: Share permissions, as a list including any of the following (default: ``read``):

          - ``read``
          - ``update``
          - ``create``
          - ``delete``
          - ``share``
          - ``all``

        :param server_args: Override the default server settings (see :meth:`._get_client` arguments).
        :return: The details of the newly created share. Example:

          .. code-block:: json

            {
              "id": "4",
              "share_type": 3,
              "uid_owner": "your_uid",
              "displayname_owner": "Your Name",
              "permissions": 17,
              "can_edit": true,
              "can_delete": true,
              "stime": 1599691325,
              "parent": null,
              "expiration": null,
              "token": "AbCdEfG0123456789",
              "uid_file_owner": "your_uid",
              "note": "",
              "label": "",
              "displayname_file_owner": "Your Name",
              "path": "/Shared Path",
              "item_type": "folder",
              "mimetype": "httpd/unix-directory",
              "storage_id": "home::your-uid",
              "storage": 2,
              "item_source": 13960,
              "file_source": 13960,
              "file_parent": 6,
              "file_target": "/Shared Path",
              "share_with": null,
              "share_with_displayname": "(Shared link)",
              "password": null,
              "send_password_by_talk": false,
              "url": "https://your-domain/nextcloud/index.php/s/AbCdEfG0123456789",
              "mail_send": 1,
              "hide_download": 0
            }

        """
The details of the newly created share. Example:
code-block:: json


The details of the newly created share . Example : code - block :: json
self
path
str
Path to the resource to be shared.
Path to the resource to be shared .
share_type
str
Share type. Supported values:
``user``
``group``
``public_link``
``email``
``federated_cloud_share``
``circle``
``talk_conversation``
Share type . Supported values : ` ` user ` ` ` ` group ` ` ` ` public_link ` ` ` ` email ` ` ` ` federated_cloud_share ` ` ` ` circle ` ` ` ` talk_conversation ` `
share_with
Optional[str]
User/group ID, email or conversation ID the resource should be shared with.
User / group ID email or conversation ID the resource should be shared with .
public_upload
bool
Whether public upload to the shared folder is allowed (default: False).
Whether public upload to the shared folder is allowed ( default : False ) .
password
Optional[str]
Optional password to protect the share.
Optional password to protect the share .
permissions
Optional[List[str]]
Share permissions, as a list including any of the following (default: ``read``):
``read``
``update``
``create``
``delete``
``share``
``all``
Share permissions as a list including any of the following ( default : ` ` read ` ` ) : ` ` read ` ` ` ` update ` ` ` ` create ` ` ` ` delete ` ` ` ` share ` ` ` ` all ` `
server_args
Override the default server settings .
Override the default server settings .