mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 04:20:05 +00:00
feat(context): made getContextByName function public
This commit is contained in:
14
src/SASjs.ts
14
src/SASjs.ts
@@ -167,6 +167,20 @@ export default class SASjs {
|
||||
return await this.sasViyaApiClient!.deleteContext(contextName, accessToken)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a compute context.
|
||||
* @param contextName - the name of the context to return.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public async getContextByName(contextName: string, accessToken?: string) {
|
||||
this.isMethodSupported('getContextByName', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getContextByName(
|
||||
contextName,
|
||||
accessToken
|
||||
)
|
||||
}
|
||||
|
||||
public async createSession(contextName: string, accessToken: string) {
|
||||
this.isMethodSupported('createSession', ServerType.SASViya)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user