ApiRecipe

@Serializable
data class ApiRecipe(val id: String? = null, val slug: String, val title: String, val ingredients: List<String>, val optionalIngredients: List<String>, val herbs: List<String>, val steps: List<String>, val image: String?, val authorId: String)

Data class representing a Recipe item from the API.

Constructors

Link copied to clipboard
constructor(id: String? = null, slug: String, title: String, ingredients: List<String>, optionalIngredients: List<String>, herbs: List<String>, steps: List<String>, image: String?, authorId: String)

Properties

Link copied to clipboard

The ID of the author of the Recipe item.

Link copied to clipboard

The list of herbs for the Recipe item.

Link copied to clipboard
val id: String? = null

The server ID of the Recipe item.

Link copied to clipboard

The image URL of the Recipe item.

Link copied to clipboard

The list of ingredients for the Recipe item.

Link copied to clipboard

The list of optional ingredients for the Recipe item.

Link copied to clipboard

The slug of the Recipe item.

Link copied to clipboard

The list of steps for the Recipe item.

Link copied to clipboard

The title of the Recipe item.

Functions

Link copied to clipboard

Extension function to convert an ApiRecipe item to a Recipe item.