original_string: public function get_api_functions() {
          return [
              'create_share' => [
                  'endpoint' => $this->ocsendpoint->out(false),
                  'method' => 'post',
                  'args' => [
                      'path' => PARAM_TEXT, // Could be PARAM_PATH, we really don't want to enforce a Moodle understanding of paths.
                      'shareType' => PARAM_INT,
                      'shareWith' => PARAM_TEXT, // Name of receiving user/group. Required if SHARE_TYPE_USER.
                      'publicUpload' => PARAM_RAW, // Actually Boolean, but neither String-Boolean ('false') nor PARAM_BOOL (0/1).
                      'permissions' => PARAM_INT,
                      'shareWith' => PARAM_TEXT,
                      'expireDate' => PARAM_TEXT
                  ],
                  'response' => 'text/xml'
              ],
              'delete_share' => [
                  'endpoint' => $this->build_share_url(),
                  'method' => 'delete',
                  'args' => [
                      'share_id' => PARAM_INT
                  ],
                  'response' => 'text/xml'
              ],
              'get_shares' => [
                  'endpoint' => $this->ocsendpoint->out(false),
                  'method' => 'get',
                  'args' => [
                      'path' => PARAM_TEXT,
                      'reshares' => PARAM_RAW, // Returns not only the shares from the current user but all of the given file.
                      'subfiles' => PARAM_RAW, // Returns all shares within a folder, given that path defines a folder.
                  ],
                  'response' => 'text/xml'
              ],
              'get_information_of_share' => [
                  'endpoint' => $this->build_share_url(),
                  'method' => 'get',
                  'args' => [
                      'share_id' => PARAM_INT
                  ],
                  'response' => 'text/xml'
              ],
          ];
      }
code: public function get_api_functions() {
          return [
              'create_share' => [
                  'endpoint' => $this->ocsendpoint->out(false),
                  'method' => 'post',
                  'args' => [
                      'path' => PARAM_TEXT, // Could be PARAM_PATH, we really don't want to enforce a Moodle understanding of paths.
                      'shareType' => PARAM_INT,
                      'shareWith' => PARAM_TEXT, // Name of receiving user/group. Required if SHARE_TYPE_USER.
                      'publicUpload' => PARAM_RAW, // Actually Boolean, but neither String-Boolean ('false') nor PARAM_BOOL (0/1).
                      'permissions' => PARAM_INT,
                      'shareWith' => PARAM_TEXT,
                      'expireDate' => PARAM_TEXT
                  ],
                  'response' => 'text/xml'
              ],
              'delete_share' => [
                  'endpoint' => $this->build_share_url(),
                  'method' => 'delete',
                  'args' => [
                      'share_id' => PARAM_INT
                  ],
                  'response' => 'text/xml'
              ],
              'get_shares' => [
                  'endpoint' => $this->ocsendpoint->out(false),
                  'method' => 'get',
                  'args' => [
                      'path' => PARAM_TEXT,
                      'reshares' => PARAM_RAW, // Returns not only the shares from the current user but all of the given file.
                      'subfiles' => PARAM_RAW, // Returns all shares within a folder, given that path defines a folder.
                  ],
                  'response' => 'text/xml'
              ],
              'get_information_of_share' => [
                  'endpoint' => $this->build_share_url(),
                  'method' => 'get',
                  'args' => [
                      'share_id' => PARAM_INT
                  ],
                  'response' => 'text/xml'
              ],
          ];
      }
code_tokens: public function get_api_functions ( ) { return [ 'create_share' => [ 'endpoint' => $ this -> ocsendpoint -> out ( false ) , 'method' => 'post' , 'args' => [ 'path' => PARAM_TEXT , // Could be PARAM_PATH, we really don't want to enforce a Moodle understanding of paths. 'shareType' => PARAM_INT , 'shareWith' => PARAM_TEXT , // Name of receiving user/group. Required if SHARE_TYPE_USER. 'publicUpload' => PARAM_RAW , // Actually Boolean, but neither String-Boolean ('false') nor PARAM_BOOL (0/1). 'permissions' => PARAM_INT , 'shareWith' => PARAM_TEXT , 'expireDate' => PARAM_TEXT ] , 'response' => 'text/xml' ] , 'delete_share' => [ 'endpoint' => $ this -> build_share_url ( ) , 'method' => 'delete' , 'args' => [ 'share_id' => PARAM_INT ] , 'response' => 'text/xml' ] , 'get_shares' => [ 'endpoint' => $ this -> ocsendpoint -> out ( false ) , 'method' => 'get' , 'args' => [ 'path' => PARAM_TEXT , 'reshares' => PARAM_RAW , // Returns not only the shares from the current user but all of the given file. 'subfiles' => PARAM_RAW , // Returns all shares within a folder, given that path defines a folder. ] , 'response' => 'text/xml' ] , 'get_information_of_share' => [ 'endpoint' => $ this -> build_share_url ( ) , 'method' => 'get' , 'args' => [ 'share_id' => PARAM_INT ] , 'response' => 'text/xml' ] , ] ; }
docstring: Define relevant functions of the OCS API.
  
  Previously, the instruction to create a oauthclient recommended the user to enter the return format (format=xml).
  However, in this case the shareid is appended at the wrong place. Therefore, a new url is build which inserts the
  shareid at the suitable place for delete_share and get_information_of_share.
  create_share docs: https://docs.nextcloud.com/server/13/developer_manual/core/ocs-share-api.html#create-a-new-share
docstring_tokens: Define relevant functions of the OCS API .