8000 Adjusted args to support posting arrays. And updated readme · coffeepenbit/bookstack@48bc3ce · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.

Commit 48bc3ce

Browse files
committed
Adjusted args to support posting arrays. And updated readme
1 parent 3c999ef commit 48bc3ce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ The above are then the methods available to you, for example:
4343
>>> books_list['data'][0]['name']
4444
'Mathematics'
4545
```
46+
47+
And to POST you can follow this example:
48+
49+
```python
50+
>>> api.post_books_create({'name', 'Sample Book', 'description': 'Sample Description', 'tags': [{ 'name': 'Sample-Name', 'value': 'Sample-Value' }] })
51+
```

src/bookstack/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def request_method(*args):
5151
) if method_info['method'] != "POST" else self._session.request(
5252
method_info['method'],
5353
method_info['uri'],
54-
*args
54+
json=args[0]
5555
)
5656

5757
return self._get_response_content(response)

0 commit comments

Comments
 (0)
0