@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
165 lines (114 loc) • 4.36 kB
Markdown
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**propertiesList**](PropertiesApi.md
| [**propertiesRetrieve**](PropertiesApi.md
> PaginatedWebsitePropertyList propertiesList(count, limit, offset)
### Example
```ts
import {
Configuration,
PropertiesApi,
} from '';
import type { PropertiesListRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const config = new Configuration({
// To configure HTTP basic authorization: basicAuth
username: "YOUR USERNAME",
password: "YOUR PASSWORD",
// To configure API key authorization: cookieAuth
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: jwtAuth
accessToken: "YOUR BEARER TOKEN",
});
const api = new PropertiesApi(config);
const body = {
// boolean | Set to true to enable count query. If false, count will be omitted. (optional)
count: true,
// number | Number of results to return per page. (optional)
limit: 56,
// number | The initial index from which to return the results. (optional)
offset: 56,
} satisfies PropertiesListRequest;
try {
const data = await api.propertiesList(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **count** | `boolean` | Set to true to enable count query. If false, count will be omitted. | [Optional] [Defaults to `false`] |
| **limit** | `number` | Number of results to return per page. | [Optional] [Defaults to `undefined`] |
| **offset** | `number` | The initial index from which to return the results. | [Optional] [Defaults to `undefined`] |
[**PaginatedWebsitePropertyList**](PaginatedWebsitePropertyList.md)
[](../README.md
- **Content-Type**: Not defined
- **Accept**: `application/json`
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
[[Back to top]](
> WebsiteProperty propertiesRetrieve(key)
### Example
```ts
import {
Configuration,
PropertiesApi,
} from '';
import type { PropertiesRetrieveRequest } from '';
async function example() {
console.log("🚀 Testing SDK...");
const config = new Configuration({
// To configure HTTP basic authorization: basicAuth
username: "YOUR USERNAME",
password: "YOUR PASSWORD",
// To configure API key authorization: cookieAuth
apiKey: "YOUR API KEY",
// Configure HTTP bearer authorization: jwtAuth
accessToken: "YOUR BEARER TOKEN",
});
const api = new PropertiesApi(config);
const body = {
// string | A unique value identifying this Website Property.
key: key_example,
} satisfies PropertiesRetrieveRequest;
try {
const data = await api.propertiesRetrieve(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
```
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **key** | `string` | A unique value identifying this Website Property. | [Defaults to `undefined`] |
[**WebsiteProperty**](WebsiteProperty.md)
[](../README.md
- **Content-Type**: Not defined
- **Accept**: `application/json`
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
[[Back to top]](