Package: dyspatch-python
dyspatch-pythonIntroductionThe 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 ourImplementation Guidefor more details on
how to implement Dyspatch.API Client LibrariesDyspatch provides API Clients for popular languages and web frameworks.JavaJavascriptPythonC#GoRubyThis Python package is automatically generated by theOpenAPI Generatorproject:API version: 2020.11Package version: 6.0.0Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visithttps://docs.dyspatch.ioRequirements.Python 2.7 and 3.4+Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/getdyspatch/dyspatch-python.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/getdyspatch/dyspatch-python.git)Then import the package:importdyspatch_clientSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importdyspatch_clientGetting StartedPlease follow theinstallation procedureand then run the following:from__future__importprint_functionimporttimeimportdyspatch_clientfromdyspatch_client.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://api.dyspatch.io# See configuration.py for a list of all supported configuration parameters.configuration=dyspatch_client.Configuration(host="https://api.dyspatch.io")# 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: Bearerconfiguration=dyspatch_client.Configuration(host="https://api.dyspatch.io",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'# Enter a context with an instance of the API clientwithdyspatch_client.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=dyspatch_client.DraftsApi(api_client)draft_id='draft_id_example'# str | A draft IDlanguage_id='language_id_example'# str | A language ID (eg: en-US)accept='accept_example'# str | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"try:# Remove a localizationapi_instance.delete_localization(draft_id,language_id,accept)exceptApiExceptionase:print("Exception when calling DraftsApi->delete_localization:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://api.dyspatch.ioClassMethodHTTP requestDescriptionDraftsApidelete_localizationDELETE/drafts/{draftId}/localizations/{languageId}Remove a localizationDraftsApiget_draft_by_idGET/drafts/{draftId}Get Draft by IDDraftsApiget_draft_localization_keysGET/drafts/{draftId}/localizationKeysGet localization keysDraftsApiget_draftsGET/draftsList DraftsDraftsApiget_localization_for_draftGET/drafts/{draftId}/localizationsGet localizations on a draftDraftsApisave_localizationPUT/drafts/{draftId}/localizations/{languageId}Create or update a localizationDraftsApiset_translationPUT/drafts/{draftId}/localizations/{languageId}/translationsSet translations for languageDraftsApisubmit_draft_for_approvalPOST/drafts/{draftId}/publishRequestSubmit the draft for approvalLocalizationsApiget_draft_localization_by_idGET/localizations/{localizationId}/drafts/{draftId}Get Draft Localization Object by IDLocalizationsApiget_published_localization_by_idGET/localizations/{localizationId}Get Localization Object by IDTemplatesApiget_template_by_idGET/templates/{templateId}Get Template by IDTemplatesApiget_templatesGET/templatesList TemplatesDocumentation For ModelsAPIErrorCompiledReadCursorDraftMetaReadDraftReadDraftsReadInlineObjectLocalizationKeyReadLocalizationMetaReadLocalizationReadTemplateMetaReadTemplateReadTemplatesReadDocumentation For AuthorizationBearerType: API keyAPI key parameter name: AuthorizationLocation: HTTP headerAuthorsupport@dyspatch.io