Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Menteshashvili committed Aug 20, 2021
1 parent a1d531b commit d6d5691
Showing 1 changed file with 1 addition and 57 deletions.
58 changes: 1 addition & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,41 +37,7 @@ templates = client.get_templates()
usage = client.get_usage()
```

### Executing merge with template id

```python
client = BlazingClient('API-KEY')
parameters = MergeParameters()

with open('templates/PO-Template.json', 'r', encoding='utf-8') as f:
data = f.read()

operation = client.merge_with_id(
data=data,
filename='output.pdf',
parameters=parameters,
template=uuid.UUID('TEMPLATE-ID')
)
```

### Executing merge with relative path

```python
client = BlazingClient('API-KEY')
parameters = MergeParameters()

with open('templates/PO-Template.json', 'r', encoding='utf-8') as f:
data = f.read()

operation = client.merge_with_relative_path(
data=data,
filename='output.pdf',
parameters=parameters,
template='RELATIVE-PATH' # e.g. 'folder/nested_folder/Template.docx'
)
```

### Executing merge with form file
### Executing merge

```python
client = BlazingClient('API-KEY')
Expand All @@ -92,28 +58,6 @@ operation = client.merge_with_form_file(
)
```

### Executing merge with array

```python
client = BlazingClient('API-KEY')
parameters = MergeParameters()
parameters.sequence = True # data is array

with open('templates/PO-Template-Array.json', 'r', encoding='utf-8') as f:
data = f.read()

with open('templates/PO-Template-Array.docx', 'rb') as f:
file = FormFile('PO-Template-Array.docx')
file.content = f.read()

operation = client.merge_with_form_file(
data=data,
filename='output.pdf',
parameters=parameters,
template=file
)
```

## Documentation

See more details here https://docs.blazingdocs.com

0 comments on commit d6d5691

Please sign in to comment.