Skip to content

Commit a1336be

Browse files
authored
regenerate client with new template files (#8)
1 parent b02edeb commit a1336be

Some content is hidden

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

48 files changed

+736
-896
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,24 @@ on: [push]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98

109
steps:
11-
- uses: actions/checkout@v1
10+
- uses: actions/checkout@v1
1211

13-
- name: Set up Python 3.8
14-
uses: actions/setup-python@v1
15-
with:
16-
python-version: 3.8
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.8
1716

18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install -r requirements.txt
22-
pip install -r test-requirements.txt
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements.txt
21+
pip install -r test-requirements.txt
2322
24-
- name: Test with nosetests
25-
run: |
26-
nosetests
27-
env:
28-
DYSPATCH_API_KEY: ${{ secrets.DYSPATCH_API_KEY }}
23+
- name: Test with nosetests
24+
run: |
25+
pytest
26+
env:
27+
DYSPATCH_API_KEY: ${{ secrets.DYSPATCH_API_KEY }}

README.md

Lines changed: 57 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
# Dyspatch Python Client
1+
# dyspatch-python
22
# Introduction
3-
The Dyspatch API is based on the REST paradigm and features resource based URLs
4-
with standard HTTP response codes to indicate errors.
53

6-
We use standard HTTP authentication and request verbs and all responses are
7-
JSON formatted. See our [Implementation
8-
Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more
9-
details on how to implement Dyspatch.
4+
The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response
5+
codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted.
6+
See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on
7+
how to implement Dyspatch.
108

11-
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
9+
## API Client Libraries
10+
Dyspatch provides API Clients for popular languages and web frameworks.
11+
12+
- [Java](https://github.com/getdyspatch/dyspatch-java)
13+
- [Javascript](https://github.com/getdyspatch/dyspatch-javascript)
14+
- [Python](https://github.com/getdyspatch/dyspatch-python)
15+
- [C#](https://github.com/getdyspatch/dyspatch-dotnet)
16+
- [Go](https://github.com/getdyspatch/dyspatch-golang)
17+
- [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
18+
19+
20+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1221

1322
- API version: 2020.04
14-
- Package version: 5.0.0
15-
- Build package: io.swagger.codegen.languages.PythonClientCodegen
23+
- Package version: 5.0.1
24+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1625
For more information, please visit [https://docs.dyspatch.io](https://docs.dyspatch.io)
1726

1827
## Requirements.
@@ -22,9 +31,12 @@ Python 2.7 and 3.4+
2231
## Installation & Usage
2332
### pip install
2433

34+
If the python package is hosted on a repository, you can install directly using:
35+
2536
```sh
26-
pip install dyspatch-python
37+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
2738
```
39+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
2840

2941
Then import the package:
3042
```python
@@ -51,29 +63,48 @@ Please follow the [installation procedure](#installation--usage) and then run th
5163

5264
```python
5365
from __future__ import print_function
66+
5467
import time
5568
import dyspatch_client
5669
from dyspatch_client.rest import ApiException
5770
from pprint import pprint
5871

72+
# Defining the host is optional and defaults to https://api.dyspatch.io
73+
# See configuration.py for a list of all supported configuration parameters.
74+
configuration = dyspatch_client.Configuration(
75+
host = "https://api.dyspatch.io"
76+
)
77+
78+
# The client must configure the authentication and authorization parameters
79+
# in accordance with the API server security policy.
80+
# Examples for each auth method are provided below, use the example that
81+
# satisfies your auth use case.
82+
5983
# Configure API key authorization: Bearer
60-
configuration = dyspatch_client.Configuration()
61-
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
84+
configuration = dyspatch_client.Configuration(
85+
host = "https://api.dyspatch.io",
86+
api_key = {
87+
'Authorization': 'YOUR_API_KEY'
88+
}
89+
)
6290
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
6391
# configuration.api_key_prefix['Authorization'] = 'Bearer'
6492

65-
# create an instance of the API class
66-
api_instance = dyspatch_client.DraftsApi(dyspatch_client.ApiClient(configuration))
67-
draft_id = 'draft_id_example' # str | A draft ID
68-
target_language = 'target_language_example' # str | The type of templating language to compile as. Should only be used for visual templates.
69-
70-
try:
71-
# Get Draft by ID
72-
api_response = api_instance.drafts_draft_id_get(draft_id, target_language)
73-
pprint(api_response)
74-
except ApiException as e:
75-
print("Exception when calling DraftsApi->drafts_draft_id_get: %s\n" % e)
7693

94+
# Enter a context with an instance of the API client
95+
with dyspatch_client.ApiClient(configuration) as api_client:
96+
# Create an instance of the API class
97+
api_instance = dyspatch_client.DraftsApi(api_client)
98+
draft_id = 'draft_id_example' # str | A draft ID
99+
language_id = 'language_id_example' # str | A language ID (eg: en-US)
100+
accept = 'accept_example' # str | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
101+
102+
try:
103+
# Remove a localization
104+
api_instance.delete_localization(draft_id, language_id, accept)
105+
except ApiException as e:
106+
print("Exception when calling DraftsApi->delete_localization: %s\n" % e)
107+
77108
```
78109

79110
## Documentation for API Endpoints
@@ -125,3 +156,5 @@ Class | Method | HTTP request | Description
125156
## Author
126157

127158
support@dyspatch.io
159+
160+

docs/DraftMetaRead.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Name | Type | Description | Notes
77
**id** | **str** | An opaque, unique identifier for a draft | [optional]
88
**template_id** | **str** | An opaque, unique identifier for a template | [optional]
99
**name** | **str** | The name of a draft | [optional]
10-
**description** | **str** | A description of the draft | [optional]
1110
**url** | **str** | The API url for a specific draft | [optional]
1211
**created_at** | **datetime** | The time of initial creation | [optional]
1312
**updated_at** | **datetime** | The time of last update | [optional]

0 commit comments

Comments
 (0)