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

151 lines
4.3 KiB
Markdown

# memos.InboxServiceApi
All URIs are relative to */*
Method | HTTP request | Description
------------- | ------------- | -------------
[**inbox_service_delete_inbox**](InboxServiceApi.md#inbox_service_delete_inbox) | **DELETE** /api/v1/{name_2} | DeleteInbox deletes an inbox.
[**inbox_service_list_inboxes**](InboxServiceApi.md#inbox_service_list_inboxes) | **GET** /api/v1/inboxes | ListInboxes lists inboxes for a user.
[**inbox_service_update_inbox**](InboxServiceApi.md#inbox_service_update_inbox) | **PATCH** /api/v1/{inbox.name} | UpdateInbox updates an inbox.
# **inbox_service_delete_inbox**
> object inbox_service_delete_inbox(name_2)
DeleteInbox deletes an inbox.
### 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.InboxServiceApi()
name_2 = 'name_2_example' # str | The name of the inbox to delete. Format: inboxes/{id}
try:
# DeleteInbox deletes an inbox.
api_response = api_instance.inbox_service_delete_inbox(name_2)
pprint(api_response)
except ApiException as e:
print("Exception when calling InboxServiceApi->inbox_service_delete_inbox: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name_2** | **str**| The name of the inbox to delete. Format: inboxes/{id} |
### Return type
**object**
### 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)
# **inbox_service_list_inboxes**
> V1ListInboxesResponse inbox_service_list_inboxes(user=user)
ListInboxes lists inboxes for a user.
### 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.InboxServiceApi()
user = 'user_example' # str | Format: users/{id} (optional)
try:
# ListInboxes lists inboxes for a user.
api_response = api_instance.inbox_service_list_inboxes(user=user)
pprint(api_response)
except ApiException as e:
print("Exception when calling InboxServiceApi->inbox_service_list_inboxes: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | **str**| Format: users/{id} | [optional]
### Return type
[**V1ListInboxesResponse**](V1ListInboxesResponse.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)
# **inbox_service_update_inbox**
> V1Inbox inbox_service_update_inbox(body, inbox_name)
UpdateInbox updates an inbox.
### 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.InboxServiceApi()
body = memos.V1InboxNameBody() # V1InboxNameBody |
inbox_name = 'inbox_name_example' # str | The name of the inbox. Format: inboxes/{id}
try:
# UpdateInbox updates an inbox.
api_response = api_instance.inbox_service_update_inbox(body, inbox_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling InboxServiceApi->inbox_service_update_inbox: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**V1InboxNameBody**](V1InboxNameBody.md)| |
**inbox_name** | **str**| The name of the inbox. Format: inboxes/{id} |
### Return type
[**V1Inbox**](V1Inbox.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)