This function reads the text representation of a model from the database and converts it to a model object. If no model_id is given, all available models for the given user and bathing spot are returned in a list. The metadata about the models (ids, creation dates, comments) are then returned in the attribute "model_info".
api_get_model(user_id, spot_id, model_id = -1L)
user_id | user ID |
---|---|
spot_id | bathing spot ID |
model_id | model ID. A value of -1 will return all available models in a list |
a model object (if model_id
is given and exists in the
database) or a list of model objects if model_id = -1
.