memos-script/docs/WorkspaceSettingServiceApi.md

104 lines
3.7 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/v2/workspace/{name} | GetWorkspaceSetting returns the setting by name.
[**workspace_setting_service_set_workspace_setting**](WorkspaceSettingServiceApi.md#workspace_setting_service_set_workspace_setting) | **PATCH** /api/v2/workspace/{setting.name} | SetWorkspaceSetting updates the setting.
# **workspace_setting_service_get_workspace_setting**
> V2GetWorkspaceSettingResponse 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
[**V2GetWorkspaceSettingResponse**](V2GetWorkspaceSettingResponse.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**
> V2SetWorkspaceSettingResponse 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
[**V2SetWorkspaceSettingResponse**](V2SetWorkspaceSettingResponse.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)