def get_collection_api_ids(user):
    """Gets all api_ids from user.colletion"""
    collection_api_ids = []
    if user:
        for game in user.collection:
            collection_api_ids.append(game.api_id)

    return collection_api_ids