Skip to main content

Dyspatch API

Project description

Dyspatch Python Client

Introduction

The Dyspatch API is based on the REST paradigm and features resource based URLs with standard HTTP response codes to indicate errors.

We use standard HTTP authentication and request verbs and all responses are JSON formatted. See our Implementation Guide for more details on how to implement Dyspatch.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 2020.04
  • Package version: 5.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen For more information, please visit https://docs.dyspatch.io

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

pip install dyspatch-python

Then import the package:

import dyspatch_client

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 dyspatch_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import dyspatch_client
from dyspatch_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
configuration = dyspatch_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = dyspatch_client.DraftsApi(dyspatch_client.ApiClient(configuration))
draft_id = 'draft_id_example' # str | A draft ID
target_language = 'target_language_example' # str | The type of templating language to compile as. Should only be used for visual templates.

try:
    # Get Draft by ID
    api_response = api_instance.drafts_draft_id_get(draft_id, target_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DraftsApi->drafts_draft_id_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.dyspatch.io

Class Method HTTP request Description
DraftsApi delete_localization DELETE /drafts/{draftId}/localizations/{languageId} Remove a localization
DraftsApi get_draft_by_id GET /drafts/{draftId} Get Draft by ID
DraftsApi get_draft_localization_keys GET /drafts/{draftId}/localizationKeys Get localization keys
DraftsApi get_drafts GET /drafts List Drafts
DraftsApi get_localization_for_draft GET /drafts/{draftId}/localizations Get localizations on a draft
DraftsApi save_localization PUT /drafts/{draftId}/localizations/{languageId} Create or update a localization
DraftsApi set_translation PUT /drafts/{draftId}/localizations/{languageId}/translations Set translations for language
DraftsApi submit_draft_for_approval POST /drafts/{draftId}/publishRequest Submit the draft for approval
LocalizationsApi get_localization_by_id GET /localizations/{localizationId} Get Localization Object by ID
TemplatesApi get_template_by_id GET /templates/{templateId} Get Template by ID
TemplatesApi get_templates GET /templates List Templates

Documentation For Models

Documentation For Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

support@dyspatch.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dyspatch-python-5.0.0.tar.gz (28.7 kB view hashes)

Uploaded Source

Built Distribution

dyspatch_python-5.0.0-py3-none-any.whl (57.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page