1.0.4 • Published 1 year ago
knooly-client v1.0.4
Installation
npm i knooly-client
Client Configuration
All base properties of this API client can be configured via client constructor.
new KnoolyClient(
{
enabled: true,
baseUrl: "https://knooly-api-integration-results-qa.azurewebsites.net/api",
projectId: 999,
cycleDate: "2022-08-17",
loginMethod: "clientId",
clientId: "tester@keeggo.com",
clientSecret: "B6f2FgNvcgG1FLecsiS1ONYC6Ymqrwk5TOQSwH7dHQfOKdaG7VRB",
tenantId: "HNu5+kEPT+yMiW7sn0PNCarLk6/oHqtXZM8EQ5nMUINIhNaeuQCESdu7ketzup+i",
email: "",
password: "",
customerName: "QA"
});
Each property is described bellow:
property name | description | Possible Values (Example) |
---|---|---|
enabled | Enable/disable the client | true, false |
baseUrl | Base URL of the Knooly API | https://knooly-api-integration-results-qa.azurewebsites.net/api |
projectId | The project id is generated when a project is registered in Knooly. For more information access Help Knooly > Projetos > Criando um projeto de teste on Knooly documentation. | 999 |
cycleDate | The initial date of the project cycle. It can be obtained from Knooly. For more information access Help Knooly > Projetos > Definindo os ciclos de execução on Knooly documentation. | 2022-08-17 |
loginMethod | The preferable way to get authenticated on Knooly API. | clientId, email |
clientId | The clientId from User Access Token. Required only if loginMethod is clientId. | tester@keeggo.com |
clientSecret | The clientSecret from User Access Token. Required only if loginMethod is clientId. | B6f2FaNvcgG1FLechjk10lYC6YmqRwk5TsQSwe7dhQfOKDag7VRB |
tenantId | The tenantId from User Access Token. Required only if loginMethod is clientId. | HNu5+KEPT+yMiW7sn2PNCarLk6/oHQtwZM8eQ5nMUINIhNaEuQCESdu7ketzup+i |
The user email. Required only if loginMethod is email. | tester@keeggo.com | |
password | The user password. Required only if loginMethod is email. | p@ssw0rd |
customerName | The customer name that is associated with the user account. | QA |
Usage
import KnoolyClient from "knooly-client";
var knoolyClient = new KnoolyClient(
{
enabled: true,
baseUrl: "https://knooly-api-integration-results-qa.azurewebsites.net/api",
projectId: 999,
cycleDate: "2022-08-17",
loginMethod: "clientId",
clientId: "tester@keeggo.com",
clientSecret: "B6f2FgNvcgG1FLecsiS1ONYC6Ymqrwk5TOQSwH7dHQfOKdaG7VRB",
tenantId: "HNu5+kEPT+yMiW7sn0PNCarLk6/oHqtXZM8EQ5nMUINIhNaeuQCESdu7ketzup+i",
email: "",
password: "",
customerName: "QA"
});
knoolyClient.updateResultKnooly(true, "passed", "ID_0001");