Skip to content

Commit

Permalink
add docs (#896)
Browse files Browse the repository at this point in the history
* add docs

* add more to readme for npm
  • Loading branch information
danoswaltCL committed Aug 3, 2023
1 parent 6f4227a commit 91697f0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions clientlibs/js/src/UpgradeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,31 @@ import Assignment from './Assignment';
* ```
*/

/**
* UpGradeClient is the main class for interacting with the UpGrade API.
*
* @example
* ```typescript
* import UpgradeClient from 'upgrade_client_lib/dist/browser';
* ```
*
* ```typescript
* import UpgradeClient from 'upgrade_client_lib/dist/node';
* ```
*
* General UpGrade types can also be accessed as named exports:
* ```typescript
* import UpgradeClient, { IExperimentAssignment } from 'upgrade_client_lib/dist/browser';
* ```
*
* SDK-Specific types can be accessed also:
* ```typescript
* import { Interfaces } from 'upgrade_client_lib/dist/clientlibs/js/src/identifiers';
*
* const initResponse: Interfaces.IUser = await upgradeClient.init();
* ```
*/

export default class UpgradeClient {
// Endpoints URLs
private api: UpGradeClientInterfaces.IEndpoints = {
Expand Down

0 comments on commit 91697f0

Please sign in to comment.