owncloud/owncloud.py
def share_file_with_link(self, path):
        """Shares a remote file with link

        :param path: path to the remote file to share
        :returns: instance of :class:`PublicShare` with the share info
            or False if the operation failed
        :raises: ResponseError in case an HTTP error status was returned
        """
        path = self.__normalize_path(path)
        post_data = {'shareType': self.OCS_SHARE_TYPE_LINK, 'path': path}

        res = self.__make_ocs_request(
                'POST',
                self.OCS_SERVICE_SHARE,
                'shares',
                data = post_data
                )
        if res.status_code == 200:
            tree = ET.fromstring(res.text)
            self.__check_ocs_status(tree)
            data_el = tree.find('data')
            return PublicShare(
                int(data_el.find('id').text),
                path,
                data_el.find('url').text,
                data_el.find('token').text
            )
        raise ResponseError(res)
Shares a remote file with link

        :param path: path to the remote file to share
        :returns: instance of :class:`PublicShare` with the share info
            or False if the operation failed
        :raises: ResponseError in case an HTTP error status was returned
        
Shares a remote file with link
Shares a remote file with link
def share_file_with_link(self, path):
        path = self.__normalize_path(path)
        post_data = {'shareType': self.OCS_SHARE_TYPE_LINK, 'path': path}
        res = self.__make_ocs_request(
                'POST',
                self.OCS_SERVICE_SHARE,
                'shares',
                data = post_data
                )
        if res.status_code == 200:
            tree = ET.fromstring(res.text)
            self.__check_ocs_status(tree)
            data_el = tree.find('data')
            return PublicShare(
                int(data_el.find('id').text),
                path,
                data_el.find('url').text,
                data_el.find('token').text
            )
        raise ResponseError(res)
def share_file_with_link ( self , path ) : path = self . __normalize_path ( path ) post_data = { 'shareType' : self . OCS_SHARE_TYPE_LINK , 'path' : path } res = self . __make_ocs_request ( 'POST' , self . OCS_SERVICE_SHARE , 'shares' , data = post_data ) if res . status_code == 200 : tree = ET . fromstring ( res . text ) self . __check_ocs_status ( tree ) data_el = tree . find ( 'data' ) return PublicShare ( int ( data_el . find ( 'id' ) . text ) , path , data_el . find ( 'url' ) . text , data_el . find ( 'token' ) . text ) raise ResponseError ( res )
Shares a remote file with link
Shares a remote file with link
"""Shares a remote file with link

        :param path: path to the remote file to share
        :returns: instance of :class:`PublicShare` with the share info
            or False if the operation failed
        :raises: ResponseError in case an HTTP error status was returned
        """
instance of :class:`PublicShare` with the share info
or False if the operation failed
instance of : class : ` PublicShare ` with the share info or False if the operation failed
ResponseError in case an HTTP error status was returned
ResponseError in case an HTTP error status was returned
self
path
path to the remote file to share
path to the remote file to share