mirror of
https://github.com/LukeHagar/log10ts.git
synced 2025-12-06 04:20:12 +00:00
108 lines
10 KiB
Markdown
108 lines
10 KiB
Markdown
# FeedbackSDK
|
|
(*feedback*)
|
|
|
|
## Overview
|
|
|
|
Feedback
|
|
|
|
### Available Operations
|
|
|
|
* [get](#get) - Fetch feedback by id.
|
|
* [upload](#upload) - Upload a piece of feedback
|
|
|
|
## get
|
|
|
|
Fetch feedback by id.
|
|
|
|
### Example Usage
|
|
|
|
```typescript
|
|
import { Log10 } from "log10ts";
|
|
|
|
const log10 = new Log10({
|
|
log10Token: "<YOUR_API_KEY_HERE>",
|
|
xLog10Organization: "<value>",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await log10.feedback.get("<value>", "<value>");
|
|
|
|
// Handle the result
|
|
console.log(result)
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `feedbackId` | *string* | :heavy_check_mark: | The feedback id to fetch. |
|
|
| `xLog10Organization` | *string* | :heavy_minus_sign: | N/A |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.GetResponse](../../models/getresponse.md)\>**
|
|
### Errors
|
|
|
|
| Error Object | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| models.SDKError | 4xx-5xx | */* |
|
|
|
|
## upload
|
|
|
|
Upload a piece of feedback
|
|
|
|
### Example Usage
|
|
|
|
```typescript
|
|
import { Log10 } from "log10ts";
|
|
|
|
const log10 = new Log10({
|
|
log10Token: "<YOUR_API_KEY_HERE>",
|
|
xLog10Organization: "<value>",
|
|
});
|
|
|
|
async function run() {
|
|
const result = await log10.feedback.upload({
|
|
taskId: "<value>",
|
|
jsonValues: {},
|
|
matchedCompletionIds: [
|
|
"<value>",
|
|
],
|
|
comment: "The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality",
|
|
completionTagsSelector: [
|
|
"<value>",
|
|
],
|
|
}, "<value>");
|
|
|
|
// Handle the result
|
|
console.log(result)
|
|
}
|
|
|
|
run();
|
|
```
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `requestBody` | *models.UploadRequestBody* | :heavy_check_mark: | N/A |
|
|
| `xLog10Organization` | *string* | :heavy_minus_sign: | N/A |
|
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
|
|
|
|
### Response
|
|
|
|
**Promise\<[models.UploadResponse](../../models/uploadresponse.md)\>**
|
|
### Errors
|
|
|
|
| Error Object | Status Code | Content Type |
|
|
| --------------- | --------------- | --------------- |
|
|
| models.SDKError | 4xx-5xx | */* |
|