Unfortunately I have to work with REST APIs that output data in a different way quite often. Some APIs add some additional metadata and therefore store the main result list in a specific property. Classic example:
I made quick changes on my fork of Dayron that support this kind of data structure, those are tested in the model_test.ex file. I have also adressed this topic a bit in the README.MD file, as I feel it would have saved me a bit of time to have this specified in the readme.
Would you be interested in a pull request?
Note that some of our services also use the JSONApi.org specification, which is even more complex. Full support of JSONApi would probably be a big work (though if you are looking to build nested data mapping, you should check out how they handle it, it's quite interesting). However, I have also written small changes that allow Dayron to extract data from a JSONApi response. It's still quite early, it feels too unsure to push this publicly, but tell me if you're interested on this topic as well, as I will probably investigate it further.
Hey there,
Currently, it seems that Dayron only supports data retrieval of endpoints that look like this:
Unfortunately I have to work with REST APIs that output data in a different way quite often. Some APIs add some additional metadata and therefore store the main result list in a specific property. Classic example:
I made quick changes on my fork of Dayron that support this kind of data structure, those are tested in the model_test.ex file. I have also adressed this topic a bit in the README.MD file, as I feel it would have saved me a bit of time to have this specified in the readme.
Would you be interested in a pull request?
Note that some of our services also use the JSONApi.org specification, which is even more complex. Full support of JSONApi would probably be a big work (though if you are looking to build nested data mapping, you should check out how they handle it, it's quite interesting). However, I have also written small changes that allow Dayron to extract data from a JSONApi response. It's still quite early, it feels too unsure to push this publicly, but tell me if you're interested on this topic as well, as I will probably investigate it further.
Thanks