Skip to content

Commit a87ce89

Browse files
authored
Merge pull request #2 from getdyspatch/V2
V2 Update to 2019.03 of the Dyspatch API
2 parents 235b6c9 + 8a4cd6b commit a87ce89

102 files changed

Lines changed: 624 additions & 4611 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
sudo: false
1+
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "2.7"
5-
- "3.6"
6-
- "3.7"
7-
install: pip install tox-travis
8-
script: tox
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
#- "3.5-dev" # 3.5 development branch
10+
#- "nightly" # points to the latest development branch e.g. 3.6-dev
11+
# command to install dependencies
12+
install: "pip install -r requirements.txt"
13+
# command to run tests
14+
script: nosetests

Pipfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 205 deletions
This file was deleted.

README.md

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
# Introduction
2-
The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors.
3-
We use standard HTTP authentication and request verbs, and all responses are JSON formatted.
4-
See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch.
1+
# Dyspatch Python Client
2+
# Introduction
3+
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.
4+
## API Client Libraries
5+
Dyspatch provides API Clients for popular languages and web frameworks.
6+
- [Java](https://github.com/getdyspatch/dyspatch-java)
7+
- [Javascript](https://github.com/getdyspatch/dyspatch-javascript)
8+
- [Python](https://github.com/getdyspatch/dyspatch-python)
9+
- [C#](https://github.com/getdyspatch/dyspatch-dotnet)
10+
- [Go](https://github.com/getdyspatch/dyspatch-golang)
11+
- [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
512

613
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
714

8-
- API version: 2018.02
9-
- Package version: 1.0.0
10-
- Build package: io.swagger.codegen.languages.PythonClientCodegen
11-
15+
- API version: 2019.03
16+
- Package version: 2.0.0
17+
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
1218
For more information, please visit [https://docs.dyspatch.io](https://docs.dyspatch.io)
1319

1420
## Requirements.
1521

16-
Python 2.7 and 3.6+
22+
Python 2.7 and 3.4+
1723

1824
## Installation & Usage
1925
### pip install
@@ -27,7 +33,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
2733

2834
Then import the package:
2935
```python
30-
import swagger_client
36+
import dyspatch_client
3137
```
3238

3339
### Setuptools
@@ -41,81 +47,57 @@ python setup.py install --user
4147

4248
Then import the package:
4349
```python
44-
import swagger_client
50+
import dyspatch_client
4551
```
4652

4753
## Getting Started
4854

49-
Please follow the [installation procedure](#installation-usage) and then run the following:
55+
Please follow the [installation procedure](#installation--usage) and then run the following:
5056

5157
```python
5258
from __future__ import print_function
5359
import time
54-
import swagger_client
55-
from swagger_client.rest import ApiException
60+
import dyspatch_client
61+
from dyspatch_client.rest import ApiException
5662
from pprint import pprint
5763

5864
# Configure API key authorization: Bearer
59-
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
60-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
61-
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
65+
configuration = dyspatch_client.Configuration()
66+
configuration.api_key['Authorization'] = 'Dyspatch_API_key'
67+
configuration.api_key_prefix['Authorization'] = 'Bearer'
68+
6269
# create an instance of the API class
63-
api_instance = swagger_client.LocalizationsApi()
64-
template_draft_id = 'template_draft_id_example' # str | A draft ID
65-
localization_id = 'localization_id_example' # str | A localization ID
70+
api_instance = dyspatch_client.TemplatesApi(dyspatch_client.ApiClient(configuration))
71+
cursor = 'example_cursor' # str | A cursor value used to retrieve a specific page from a paginated result set. (optional)
6672

6773
try:
68-
# Gets a Localized Draft
69-
api_response = api_instance.localizations_localization_id_drafts_template_draft_id_get(template_draft_id, localization_id)
74+
# List Templates
75+
api_response = api_instance.templates_get(cursor=cursor)
7076
pprint(api_response)
7177
except ApiException as e:
72-
print("Exception when calling LocalizationsApi->localizations_localization_id_drafts_template_draft_id_get: %s\n" % e)
73-
78+
print("Exception when calling TemplatesApi->templates_get: %s\n" % e)
7479
```
7580

7681
## Documentation for API Endpoints
7782

78-
All URIs are relative to *https://api.dyspatch.io*
83+
All URIs are relative to *https://api.dyspatch.io/*
7984

8085
Class | Method | HTTP request | Description
8186
------------ | ------------- | ------------- | -------------
82-
*LocalizationsApi* | [**localizations_localization_id_drafts_template_draft_id_get**](docs/LocalizationsApi.md#localizations_localization_id_drafts_template_draft_id_get) | **GET** /localizations/{localizationId}/drafts/{templateDraftId} | Gets a Localized Draft
8387
*LocalizationsApi* | [**localizations_localization_id_get**](docs/LocalizationsApi.md#localizations_localization_id_get) | **GET** /localizations/{localizationId} | Get Localization Object by ID
8488
*TemplatesApi* | [**templates_get**](docs/TemplatesApi.md#templates_get) | **GET** /templates | List Templates
85-
*TemplatesApi* | [**templates_template_id_drafts_get**](docs/TemplatesApi.md#templates_template_id_drafts_get) | **GET** /templates/{templateId}/drafts | List Template Drafts
86-
*TemplatesApi* | [**templates_template_id_drafts_template_draft_id_get**](docs/TemplatesApi.md#templates_template_id_drafts_template_draft_id_get) | **GET** /templates/{templateId}/drafts/{templateDraftId} | Get a Draft
8789
*TemplatesApi* | [**templates_template_id_get**](docs/TemplatesApi.md#templates_template_id_get) | **GET** /templates/{templateId} | Get Template by ID
8890

89-
9091
## Documentation For Models
9192

9293
- [APIError](docs/APIError.md)
9394
- [CompiledRead](docs/CompiledRead.md)
94-
- [CreatedAt](docs/CreatedAt.md)
9595
- [Cursor](docs/Cursor.md)
96-
- [LanguageId](docs/LanguageId.md)
97-
- [LocalizationDraftMetaRead](docs/LocalizationDraftMetaRead.md)
98-
- [LocalizationDraftRead](docs/LocalizationDraftRead.md)
99-
- [LocalizationDraftUrl](docs/LocalizationDraftUrl.md)
100-
- [LocalizationId](docs/LocalizationId.md)
10196
- [LocalizationMetaRead](docs/LocalizationMetaRead.md)
102-
- [LocalizationName](docs/LocalizationName.md)
10397
- [LocalizationRead](docs/LocalizationRead.md)
104-
- [LocalizationUrl](docs/LocalizationUrl.md)
105-
- [TemplateDescription](docs/TemplateDescription.md)
106-
- [TemplateDraftId](docs/TemplateDraftId.md)
107-
- [TemplateDraftMetaRead](docs/TemplateDraftMetaRead.md)
108-
- [TemplateDraftRead](docs/TemplateDraftRead.md)
109-
- [TemplateDraftUrl](docs/TemplateDraftUrl.md)
110-
- [TemplateDraftsRead](docs/TemplateDraftsRead.md)
111-
- [TemplateId](docs/TemplateId.md)
11298
- [TemplateMetaRead](docs/TemplateMetaRead.md)
113-
- [TemplateName](docs/TemplateName.md)
11499
- [TemplateRead](docs/TemplateRead.md)
115-
- [TemplateUrl](docs/TemplateUrl.md)
116100
- [TemplatesRead](docs/TemplatesRead.md)
117-
- [UpdatedAt](docs/UpdatedAt.md)
118-
119101

120102
## Documentation For Authorization
121103

@@ -125,3 +107,8 @@ Class | Method | HTTP request | Description
125107
- **Type**: API key
126108
- **API key parameter name**: Authorization
127109
- **Location**: HTTP header
110+
111+
112+
## Author
113+
114+
support@dyspatch.io

0 commit comments

Comments
 (0)