memos-script/docs/WorkspaceSettingServiceApi.md
2024-04-30 10:31:09 +08:00

147 lines
5.1 KiB
Markdown

# memos.WorkspaceSettingServiceApi
All URIs are relative to */*
Method | HTTP request | Description
------------- | ------------- | -------------
[**workspace_setting_service_get_workspace_setting**](WorkspaceSettingServiceApi.md#workspace_setting_service_get_workspace_setting) | **GET** /api/v1/workspace/{name} | GetWorkspaceSetting returns the setting by name.
[**workspace_setting_service_list_workspace_settings**](WorkspaceSettingServiceApi.md#workspace_setting_service_list_workspace_settings) | **GET** /api/v1/workspace/settings | ListWorkspaceSetting returns the list of settings.
[**workspace_setting_service_set_workspace_setting**](WorkspaceSettingServiceApi.md#workspace_setting_service_set_workspace_setting) | **PATCH** /api/v1/workspace/{setting.name} | SetWorkspaceSetting updates the setting.
# **workspace_setting_service_get_workspace_setting**
> Apiv1WorkspaceSetting workspace_setting_service_get_workspace_setting(name)
GetWorkspaceSetting returns the setting by name.
### Example
```python
from __future__ import print_function
import time
import memos
from memos.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = memos.WorkspaceSettingServiceApi()
name = 'name_example' # str | The resource name of the workspace setting. Format: settings/{setting}
try:
# GetWorkspaceSetting returns the setting by name.
api_response = api_instance.workspace_setting_service_get_workspace_setting(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspaceSettingServiceApi->workspace_setting_service_get_workspace_setting: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **str**| The resource name of the workspace setting. Format: settings/{setting} |
### Return type
[**Apiv1WorkspaceSetting**](Apiv1WorkspaceSetting.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **workspace_setting_service_list_workspace_settings**
> V1ListWorkspaceSettingsResponse workspace_setting_service_list_workspace_settings()
ListWorkspaceSetting returns the list of settings.
### Example
```python
from __future__ import print_function
import time
import memos
from memos.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = memos.WorkspaceSettingServiceApi()
try:
# ListWorkspaceSetting returns the list of settings.
api_response = api_instance.workspace_setting_service_list_workspace_settings()
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspaceSettingServiceApi->workspace_setting_service_list_workspace_settings: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**V1ListWorkspaceSettingsResponse**](V1ListWorkspaceSettingsResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **workspace_setting_service_set_workspace_setting**
> Apiv1WorkspaceSetting workspace_setting_service_set_workspace_setting(body, setting_name)
SetWorkspaceSetting updates the setting.
### Example
```python
from __future__ import print_function
import time
import memos
from memos.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = memos.WorkspaceSettingServiceApi()
body = memos.SettingIsTheSettingToUpdate_() # SettingIsTheSettingToUpdate_ | setting is the setting to update.
setting_name = 'setting_name_example' # str | name is the name of the setting. Format: settings/{setting}
try:
# SetWorkspaceSetting updates the setting.
api_response = api_instance.workspace_setting_service_set_workspace_setting(body, setting_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkspaceSettingServiceApi->workspace_setting_service_set_workspace_setting: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SettingIsTheSettingToUpdate_**](SettingIsTheSettingToUpdate_.md)| setting is the setting to update. |
**setting_name** | **str**| name is the name of the setting. Format: settings/{setting} |
### Return type
[**Apiv1WorkspaceSetting**](Apiv1WorkspaceSetting.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)