Skip to content

Commit 7485bfc

Browse files
committed
Improve documentation
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 1996e60 commit 7485bfc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export const generateRemoteUrl = (service: string) => window.location.protocol +
3232
* @param {string} url OCS API service url
3333
* @param {object} params parameters to be replaced into the service url
3434
* @param {UrlOptions} options options for the parameter replacement
35+
* @param {boolean} options.escape Set to false if parameters should not be URL encoded (default true)
36+
* @param {Number} options.ocsVersion OCS version to use (defaults to 2)
3537
* @return {string} Absolute path for the OCS URL
3638
*/
3739
export const generateOcsUrl = (url: string, params?: object, options?: UrlOptions) => {
@@ -91,6 +93,11 @@ const _generateUrlPath = (url: string, params?: object, options?: UrlOptions) =>
9193
*
9294
* Parameters will be URL encoded automatically
9395
*
96+
* @param {string} url address (can contain placeholders e.g. /call/{token} would replace {token} with the value of params.token
97+
* @param {object} params parameters to be replaced into the url
98+
* @param {UrlOptions} options options for the parameter replacement
99+
* @param {boolean} options.noRewrite True if you want to force index.php being added
100+
* @param {boolean} options.escape Set to false if parameters should not be URL encoded (default true)
94101
* @return {string} URL with webroot for the given relative URL
95102
*/
96103
export const generateUrl = (url: string, params?: object, options?: UrlOptions) => {

0 commit comments

Comments
 (0)