ocsApiSharingManager: ocsApiSharingManager

ocsApiSharingManagerR Documentation

ocsApiSharingManager

Description

ocsApiSharingManager

Format

R6Class object.

Value

Object of R6Class for modelling an ocsManager for the Sharing API

General Methods (inherited from 'ocsManager')

new(url, user, pwd, logger, keyring_backend)

This method is used to instantiate an ocsApiSharingManager. The user/pwd are mandatory in order to connect to 'ocs'.

The logger can be either NULL, "INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs).

The keyring_backend can be set to use a different backend for storing the user password with keyring (Default value is 'env').

connect()

A method to connect to 'ocs' and set version/capabilities

getVersion()

Get the 'ocs' server version

getCapabilities()

Get the 'ocs' server capabilities

'OCS' Share API methods

getShares(path, reshares, shared_with_me, state, subfiles, pretty)

Get list of shares as list. To return as data.frame, set pretty = TRUE. The method accepts additional parameters.

createShare(path, name, shareType, shareWith, publicUpload, password, permissions = NULL, expireDate = NULL)

Creates a share for the path (file or folder), given a name. The shareType should be among values 'user','group','publiclink' or 'federated'.The shareWith is required for shareType 'user' and 'group' and corresponds to the username or groupname. The permissions can be set among values 'read', 'update', 'create', 'delete', 'read-write', 'share', 'all'. By default the permissions will be the default permissions set by the ocs server (by default 'all').

shareWithUser(path, name, username, permissions, pretty)

Shares a resource (file or folder) with a user given its username handled with argument username. The permissions can be set among values 'read', 'update', 'create', 'delete', 'read-write', 'share', 'all'. By default the permissions will be the default permissions set by the ocs server (by default 'all'). Returns the share properties as list (or asdata.frame if pretty is set to TRUE).

shareWithGroup(path, name, group, permissions, pretty)

Shares a resource (file or folder) with a group given its name handled with argument group. The permissions can be set among values 'read', 'update', 'create', 'delete', 'read-write', 'share', 'all'. By default the permissions will be the default permissions set by the ocs server (by default 'all'). Returns the share properties as list (or asdata.frame if pretty is set to TRUE).

shareAsPublicLink(path, name, publicUpload, password, permissions, expireDate)

Shares a resource (file or folder) as public link. The function returns the public link generated by ocs.

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>


ocs4R documentation built on March 18, 2022, 6:31 p.m.