mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-06 04:00:05 +00:00
fix(*): expose CSRF token, add getFolder API
This commit is contained in:
@@ -495,6 +495,17 @@ export class SASViyaApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a folder. Path to the folder is required.
|
||||
* @param folderPath - the absolute path to the folder.
|
||||
* @param accessToken - an access token for authorizing the request.
|
||||
*/
|
||||
public async getFolder(folderPath: string, accessToken?: string) {
|
||||
return await this.requestClient
|
||||
.get(`/folders/folders/@item?path=${folderPath}`, accessToken)
|
||||
.then((res) => res.result)
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a folder. Path to or URI of the parent folder is required.
|
||||
* @param folderName - the name of the new folder.
|
||||
|
||||
Reference in New Issue
Block a user