Skip to content

Commit

Permalink
feat: improve api for getting case results
Browse files Browse the repository at this point in the history
BREAKING CHANGE: API for getting experiment case result
 changed.
  • Loading branch information
x-oflisback committed Oct 10, 2022
1 parent 9a74023 commit ee560c2
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,35 @@ export class Client {
})
}

getTrajectories({
getExperimentTrajectories({
experimentId,
variableNames,
workspaceId,
}: {
experimentId: string
variableNames: string[]
workspaceId: string
}): Promise<Trajectories | undefined> {
return new Promise((resolve, reject) => {
this.ensureImpactToken()
.then(() => {
this.axios
.post(
`${this.baseUrl}${this.jhUserPath}impact/api/workspaces/${workspaceId}/experiments/${experimentId}/trajectories`,
{ variable_names: variableNames },
{
headers: {
Accept: 'application/vnd.impact.trajectories.v2+json',
},
}
)
.then((res) => resolve(res.data))
})
.catch((e) => reject(e))
})
}

getCaseTrajectories({
caseId,
experimentId,
variableNames,
Expand Down

0 comments on commit ee560c2

Please sign in to comment.