All URIs are relative to http://localhost:9000/api
Method | HTTP request | Description |
---|---|---|
get_public_lists | GET /public/lists | |
handle_public_subscription | POST /public/subscription |
List[GetPublicLists200ResponseInner] get_public_lists()
returns the list of public lists with minimal fields
- Basic Authentication (basicAuth):
import time
import os
import listmonk
from listmonk.models.get_public_lists200_response_inner import GetPublicLists200ResponseInner
from listmonk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:9000/api
# See configuration.py for a list of all supported configuration parameters.
configuration = listmonk.Configuration(
host="http://localhost:9000/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 HTTP basic authorization: basicAuth
configuration = listmonk.Configuration(
username=os.environ["USERNAME"],
password=os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with listmonk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = listmonk.PublicApi(api_client)
try:
api_response = api_instance.get_public_lists()
print("The response of PublicApi->get_public_lists:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PublicApi->get_public_lists: %s\n" % e)
This endpoint does not need any parameter.
List[GetPublicLists200ResponseInner]
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HandlePublicSubscription200Response handle_public_subscription(handle_public_subscription_request=handle_public_subscription_request)
handles subscription requests coming from public API calls.
- Basic Authentication (basicAuth):
import time
import os
import listmonk
from listmonk.models.handle_public_subscription200_response import HandlePublicSubscription200Response
from listmonk.models.handle_public_subscription_request import HandlePublicSubscriptionRequest
from listmonk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:9000/api
# See configuration.py for a list of all supported configuration parameters.
configuration = listmonk.Configuration(
host="http://localhost:9000/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 HTTP basic authorization: basicAuth
configuration = listmonk.Configuration(
username=os.environ["USERNAME"],
password=os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with listmonk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = listmonk.PublicApi(api_client)
handle_public_subscription_request = listmonk.HandlePublicSubscriptionRequest() # HandlePublicSubscriptionRequest | subscription request parameters (optional)
try:
api_response = api_instance.handle_public_subscription(
handle_public_subscription_request=handle_public_subscription_request)
print("The response of PublicApi->handle_public_subscription:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PublicApi->handle_public_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
handle_public_subscription_request | HandlePublicSubscriptionRequest | subscription request parameters | [optional] |
HandlePublicSubscription200Response
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]