exactonline icon indicating copy to clipboard operation
exactonline copied to clipboard

Single entry request

Open MichelledeGroot opened this issue 10 months ago • 2 comments

the _rest_to_result_data_and_next in unwrap.py expects multiple results, and so this function does not work (valueerror) when only one entry/result is returned. This is because the "results" (and "__next") key is omitted in such a case. Would it be possible to modify this function so it can also handle request with only one result? Many thanks in advance!

MichelledeGroot avatar Apr 30 '24 14:04 MichelledeGroot

Could you provide an example call that returns one result only? I.e. both an URL/endpoint and (redacted) json output.

wdoekes avatar Apr 30 '24 15:04 wdoekes

This is the endpoint: "https://start.exactonline.nl/api/v1/{{division}}/project/TimeTransactions(guid'{{guid}}')" Which returns a single result: d={'__metadata': {'uri': "https://start.exactonline.nl/api/v1/.../project/TimeTransactions(guid'...')", 'type': 'Exact.Web.Api.Models.TimeTransaction'}, etc}, results=None

MichelledeGroot avatar May 01 '24 09:05 MichelledeGroot