# ApiMapper for mapping

**URL:** <https://forums.kodeco.com/t/apimapper-for-mapping/181176>\
**Category:** Real-World Android by Tutorials\
**Created:** [November 25, 2022, 10:43am UTC](https://forums.kodeco.com/t/apimapper-for-mapping/181176 "2022-11-25T10:43:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/doer/32/105896_2.png) [@doer](https://forums.kodeco.com/u/doer)\
**Post date:** [November 25, 2022, 10:43am UTC](https://forums.kodeco.com/t/apimapper-for-mapping/181176/1 "2022-11-25T10:43:55Z")

</div>

So regarding Real World Android. an ApiMapper interface was created.This is use to map the api to our domain model. I have a question regarding this approach.What if the api holds a list of photos for example and you want to return the list of photos.That is in petsave we get to see only one image of a pet even though the api does allow you to return multiple images. I want to know how you would do such mapping.My guess is the ApiMapper should have a condition for list. However I doubt interface can hold conditional statement.If it can please how?  
Any help will be highly appreciated.
