link0 / bunq

API client in PHP for bunq
MIT License
8 stars 13 forks source link

Feature request: receiving plain JSON Objects / strings as response #17

Closed StephanMeijer closed 7 years ago

StephanMeijer commented 7 years ago

I'd like to be abe to receive plain JSON Objects or strings as response instead of the complex response this client returns (maybe you can build in something).

dennisdegreef commented 7 years ago

Hi @StephanMeijer

I think it would be possible to be able to json_encode these objects, and if not, implement such behaviour. Do you have a usecase for this? Why do you prefer plain JSON objects instead of complex types? The reason the complex types are there, is to assert certain behaviour/structure.

StephanMeijer commented 7 years ago

I prefer JSON for the cases where things like Invoice are not implemented yet.

dennisdegreef commented 7 years ago

Wouldn't it be better to implement Invoice in those case? Instead of having to maintain the JSON views as well?

StephanMeijer commented 7 years ago

You already receive JSON from the API, so you actually don't have to maintain a thing.

dennisdegreef commented 7 years ago

While that is true, why not use the API directly then? Are there some components in this API that might fit better in a separate package? I guess the guzzle middleware might? Please let me know what things you'd like to use from this package while keeping communication JSON based.

dennisdegreef commented 7 years ago

Closed due to inactivity. Please feel free to comment on my previous questions.