class Laspatule::Services::Recipes

Defined in:

laspatule/services/recipes.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(user_id : Int32, repository : Repositories::Recipes) #

[View source]

Instance Method Detail

def create(recipe : Models::CreateRecipe) : Models::Recipe #

Creates a new recipe and returns its id.


[View source]
def get_all(page_size : Int32, next_page previous_page : Int32 | Nil = nil) : Models::Page(Models::Recipe) #

Gets all recipes ordered by name.


[View source]
def get_by_id(id : Int32) : Models::Recipe #

Gets a recipe by id.


[View source]