6.5 KiB
6.5 KiB
generated.immich.openapi_client.NotificationsApi
All URIs are relative to https://github.com/api
| Method | HTTP request | Description |
|---|---|---|
| get_notification_template | POST /notifications/templates/{name} | |
| send_test_email | POST /notifications/test-email |
get_notification_template
TemplateResponseDto get_notification_template(name, template_dto)
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
from generated.immich.openapi_client.models.template_dto import TemplateDto
from generated.immich.openapi_client.models.template_response_dto import TemplateResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.NotificationsApi(api_client)
name = 'name_example' # str |
template_dto = generated.immich.openapi_client.TemplateDto() # TemplateDto |
try:
api_response = api_instance.get_notification_template(name, template_dto)
print("The response of NotificationsApi->get_notification_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NotificationsApi->get_notification_template: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | ||
| template_dto | TemplateDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_test_email
TestEmailResponseDto send_test_email(system_config_smtp_dto)
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
from generated.immich.openapi_client.models.system_config_smtp_dto import SystemConfigSmtpDto
from generated.immich.openapi_client.models.test_email_response_dto import TestEmailResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.NotificationsApi(api_client)
system_config_smtp_dto = generated.immich.openapi_client.SystemConfigSmtpDto() # SystemConfigSmtpDto |
try:
api_response = api_instance.send_test_email(system_config_smtp_dto)
print("The response of NotificationsApi->send_test_email:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NotificationsApi->send_test_email: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| system_config_smtp_dto | SystemConfigSmtpDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]