Skip to content

AthAshino/Python-ListMonk

Repository files navigation

python-listmonk

The API collection for listmonk

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import listmonk

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import listmonk

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import listmonk
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.AdminApi(api_client)
    
    try:
        api_response = api_instance.reload_app()
        print("The response of AdminApi->reload_app:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AdminApi->reload_app: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:9000/api

Class Method HTTP request Description
AdminApi reload_app POST /admin/reload
BouncesApi delete_bounce_by_id DELETE /bounces/{id}
BouncesApi delete_bounces DELETE /bounces
BouncesApi get_bounce_by_id GET /bounces/{id}
BouncesApi get_bounces GET /bounces
CampaignsApi create_campaign POST /campaigns
CampaignsApi create_campaign_content_by_id POST /campaigns/{id}/content
CampaignsApi delete_campaign_by_id DELETE /campaigns/{id}
CampaignsApi get_campaign_analytics GET /campaigns/analytics/{type}
CampaignsApi get_campaign_by_id GET /campaigns/{id}
CampaignsApi get_campaigns GET /campaigns
CampaignsApi get_running_campaign_stats GET /campaigns/running/stats
CampaignsApi preview_campaign_by_id GET /campaigns/{id}/preview
CampaignsApi preview_campaign_text_by_id POST /campaigns/{id}/text
CampaignsApi test_campaign_by_id POST /campaigns/{id}/test
CampaignsApi update_campaign_archive_by_id PUT /campaigns/{id}/archive
CampaignsApi update_campaign_by_id PUT /campaigns/{id}
CampaignsApi update_campaign_status_by_id PUT /campaigns/{id}/status
CampaignsApi update_preview_campaign_by_id POST /campaigns/{id}/preview
ImportApi get_import_subscriber_stats GET /import/subscribers/logs
ImportApi get_import_subscribers GET /import/subscribers
ImportApi import_subscribers POST /import/subscribers
ImportApi stop_import_subscribers DELETE /import/subscribers
ListsApi create_list POST /lists
ListsApi delete_list_by_id DELETE /lists/{list_id}
ListsApi get_list_by_id GET /lists/{list_id}
ListsApi get_lists GET /lists
ListsApi update_list_by_id PUT /lists/{list_id}
LogsApi get_logs GET /logs
MaintenanceApi delete_campaign_analytics_by_type DELETE /maintenance/analytics/{type}
MaintenanceApi delete_gc_subscribers DELETE /maintenance/subscribers/{type}
MaintenanceApi delete_unconfirmed_subscriptions DELETE /maintenance/subscriptions/unconfirmed
MediaApi delete_media_by_id DELETE /media/{id}
MediaApi get_media GET /media
MediaApi get_media_by_id GET /media/{id}
MediaApi upload_media POST /media
MiscellaneousApi get_dashboard_charts GET /dashboard/charts
MiscellaneousApi get_dashboard_counts GET /dashboard/counts
MiscellaneousApi get_health_check GET /health
MiscellaneousApi get_i18n_lang GET /lang/{lang}
MiscellaneousApi get_server_config GET /config
PublicApi get_public_lists GET /public/lists
PublicApi handle_public_subscription POST /public/subscription
SettingsApi get_settings GET /settings
SettingsApi test_smtp_settings POST /settings/smtp/test
SettingsApi update_settings PUT /settings
SubscribersApi blocklist_subscribers_query PUT /subscribers/query/blocklist
SubscribersApi create_subscriber POST /subscribers
SubscribersApi delete_subscriber_bounces_by_id DELETE /subscribers/{id}/bounces
SubscribersApi delete_subscriber_by_id DELETE /subscribers/{id}
SubscribersApi delete_subscriber_by_list DELETE /subscribers
SubscribersApi delete_subscriber_by_query POST /subscribers/query/delete
SubscribersApi export_subscriber_data_by_id GET /subscribers/{id}/export
SubscribersApi get_subscriber_bounces_by_id GET /subscribers/{id}/bounces
SubscribersApi get_subscriber_by_id GET /subscribers/{id}
SubscribersApi get_subscribers GET /subscribers
SubscribersApi manage_blocklist_by_subscriber_list PUT /subscribers/blocklist
SubscribersApi manage_blocklist_subscribers_by_id PUT /subscribers/{id}/blocklist
SubscribersApi manage_subscriber_list_by_id PUT /subscribers/lists/{id}
SubscribersApi manage_subscriber_lists PUT /subscribers/lists
SubscribersApi manage_subscriber_lists_by_query PUT /subscribers/query/lists
SubscribersApi subscriber_send_optin_by_id POST /subscribers/{id}/optin
SubscribersApi update_subscriber_by_id PUT /subscribers/{id}
TemplatesApi delete_template_by_id DELETE /templates/{id}
TemplatesApi get_template_by_id GET /templates/{id}
TemplatesApi get_templates GET /templates
TemplatesApi preview_template POST /templates/preview
TemplatesApi preview_template_by_id GET /templates/{id}/preview
TemplatesApi update_template_by_id PUT /templates/{id}/default
TransactionalApi transact_with_subscriber POST /tx

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published