@space-cow-media/spellbook-client
Version:
An Open Api generated client for the Commander Spellbook backend REST API.
162 lines (111 loc) • 4.11 kB
Markdown
# PropertiesApi
All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**propertiesList**](PropertiesApi.md#propertieslist) | **GET** /properties/ | |
| [**propertiesRetrieve**](PropertiesApi.md#propertiesretrieve) | **GET** /properties/{key}/ | |
## propertiesList
> PaginatedWebsitePropertyList propertiesList(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 = {
// 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);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **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`] |
### Return type
[**PaginatedWebsitePropertyList**](PaginatedWebsitePropertyList.md)
### Authorization
[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [jwtAuth](../README.md#jwtAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
## propertiesRetrieve
> 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);
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **key** | `string` | A unique value identifying this Website Property. | [Defaults to `undefined`] |
### Return type
[**WebsiteProperty**](WebsiteProperty.md)
### Authorization
[basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [jwtAuth](../README.md#jwtAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)