forked from eatvio/eatvio_app
29 lines
741 B
Dart
29 lines
741 B
Dart
import 'package:dio/dio.dart';
|
|
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
|
import 'package:retrofit/retrofit.dart';
|
|
|
|
part 'about_recipe_service.g.dart';
|
|
|
|
@RestApi()
|
|
abstract class AboutRecipeService {
|
|
factory AboutRecipeService(Dio dio, {String baseUrl}) = _AboutRecipeService;
|
|
|
|
@POST('/api/recipes/{slug}/like')
|
|
Future<void> likeRecipe({
|
|
@Path() required String slug,
|
|
});
|
|
|
|
@POST('/api/recipes/{slug}/add_to_favorite')
|
|
Future<void> addToFavorite({
|
|
@Path() required String slug,
|
|
});
|
|
|
|
@POST('/api/recipes/{slug}/remove_from_favorite')
|
|
Future<void> removeFromFavorite({
|
|
@Path() required String slug,
|
|
});
|
|
|
|
@GET('/api/recipes/show/{id}')
|
|
Future<Recipe> getRecipe(@Path() String id);
|
|
}
|