mirror of
https://github.com/LukeHagar/discoursejs.git
synced 2025-12-06 04:19:37 +00:00
ci: regenerated with OpenAPI Doc latest, Speakeasy CLI 1.358.0
This commit is contained in:
@@ -15,14 +15,13 @@ Get the notifications that belong to the current user
|
||||
```typescript
|
||||
import { SDK } from "@lukehagar/discoursejs";
|
||||
|
||||
const sdk = new SDK();
|
||||
|
||||
async function run() {
|
||||
const sdk = new SDK();
|
||||
const result = await sdk.notifications.getNotifications();
|
||||
|
||||
const res = await sdk.notifications.getNotifications();
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
// handle response
|
||||
}
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -30,14 +29,16 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `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. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.GetNotificationsResponse](../../sdk/models/operations/getnotificationsresponse.md)>**
|
||||
**Promise\<[operations.GetNotificationsResponseBody](../../sdk/models/operations/getnotificationsresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
@@ -53,14 +54,13 @@ Mark notifications as read
|
||||
```typescript
|
||||
import { SDK } from "@lukehagar/discoursejs";
|
||||
|
||||
const sdk = new SDK();
|
||||
|
||||
async function run() {
|
||||
const sdk = new SDK();
|
||||
const result = await sdk.notifications.markNotificationsAsRead();
|
||||
|
||||
const res = await sdk.notifications.markNotificationsAsRead({});
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
// handle response
|
||||
}
|
||||
// Handle the result
|
||||
console.log(result)
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -68,15 +68,17 @@ run();
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.MarkNotificationsAsReadRequestBody](../../sdk/models/operations/marknotificationsasreadrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.MarkNotificationsAsReadRequestBody](../../sdk/models/operations/marknotificationsasreadrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| `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. |
|
||||
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**Promise<[operations.MarkNotificationsAsReadResponse](../../sdk/models/operations/marknotificationsasreadresponse.md)>**
|
||||
**Promise\<[operations.MarkNotificationsAsReadResponseBody](../../sdk/models/operations/marknotificationsasreadresponsebody.md)\>**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
|
||||
Reference in New Issue
Block a user