15 KiB
generated.immich.openapi_client.PartnersApi
All URIs are relative to https://github.com/api
| Method | HTTP request | Description |
|---|---|---|
| create_partner | POST /partners | Create a partner |
| create_partner_deprecated | POST /partners/{id} | Create a partner |
| get_partners | GET /partners | Retrieve partners |
| remove_partner | DELETE /partners/{id} | Remove a partner |
| update_partner | PUT /partners/{id} | Update a partner |
create_partner
PartnerResponseDto create_partner(partner_create_dto)
Create a partner
Create a new partner to share assets with.
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.partner_create_dto import PartnerCreateDto
from generated.immich.openapi_client.models.partner_response_dto import PartnerResponseDto
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.PartnersApi(api_client)
partner_create_dto = generated.immich.openapi_client.PartnerCreateDto() # PartnerCreateDto |
try:
# Create a partner
api_response = api_instance.create_partner(partner_create_dto)
print("The response of PartnersApi->create_partner:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PartnersApi->create_partner: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| partner_create_dto | PartnerCreateDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
create_partner_deprecated
PartnerResponseDto create_partner_deprecated(id)
Create a partner
Create a new partner to share assets with.
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.partner_response_dto import PartnerResponseDto
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.PartnersApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
try:
# Create a partner
api_response = api_instance.create_partner_deprecated(id)
print("The response of PartnersApi->create_partner_deprecated:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PartnersApi->create_partner_deprecated: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_partners
List[PartnerResponseDto] get_partners(direction)
Retrieve partners
Retrieve a list of partners with whom assets are shared.
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.partner_direction import PartnerDirection
from generated.immich.openapi_client.models.partner_response_dto import PartnerResponseDto
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.PartnersApi(api_client)
direction = generated.immich.openapi_client.PartnerDirection() # PartnerDirection |
try:
# Retrieve partners
api_response = api_instance.get_partners(direction)
print("The response of PartnersApi->get_partners:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PartnersApi->get_partners: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| direction | PartnerDirection |
Return type
Authorization
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] [Back to Model list] [Back to README]
remove_partner
remove_partner(id)
Remove a partner
Stop sharing assets with a partner.
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
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.PartnersApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
try:
# Remove a partner
api_instance.remove_partner(id)
except Exception as e:
print("Exception when calling PartnersApi->remove_partner: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_partner
PartnerResponseDto update_partner(id, partner_update_dto)
Update a partner
Specify whether a partner's assets should appear in the user's timeline.
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.partner_response_dto import PartnerResponseDto
from generated.immich.openapi_client.models.partner_update_dto import PartnerUpdateDto
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.PartnersApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
partner_update_dto = generated.immich.openapi_client.PartnerUpdateDto() # PartnerUpdateDto |
try:
# Update a partner
api_response = api_instance.update_partner(id, partner_update_dto)
print("The response of PartnersApi->update_partner:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PartnersApi->update_partner: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| partner_update_dto | PartnerUpdateDto |
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]