coffeepenbit / bookstack

A Python wrapper for BookStack's API
MIT License
23 stars 8 forks source link

POST didn't work #1

Closed shufps closed 2 years ago

shufps commented 2 years ago

I think, this is wrong:

https://github.com/coffeepenbit/bookstack/blob/ac63b0ef0c67bff39a8abafe1c09f7345a65d616/src/bookstack/models.py#L50

POST didn't work because **kwargs was not passed to the requests function. Therefore, it was not possible to use the data parameter.

            response = self._session.request(
                method_info['method'],
                #method_info['uri'].format(**kwargs)       <- this didn't work for POST
                method_info['uri'],
                **kwargs
            )
shufps commented 2 years ago

Closing the issue because of the PR

coffeepenbit commented 2 years ago

Thanks, I merged it