forked from eatvio/eatvio_app
diet creation scrren is done
This commit is contained in:
31
lib/features/plans/services/plan_service.dart
Normal file
31
lib/features/plans/services/plan_service.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:eatvio_app/features/feed/models/plan_pagination_model.dart';
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
|
||||
part 'plan_service.g.dart';
|
||||
|
||||
@RestApi()
|
||||
abstract class PlanService {
|
||||
|
||||
factory PlanService(Dio dio, {String baseUrl}) = _PlanService;
|
||||
|
||||
@GET('/api/plans/show/{slug}')
|
||||
Future<PlanModel> getPlan(@Path('slug') String slug);
|
||||
|
||||
@POST('/api/plans/{slug}/like')
|
||||
Future<void> likePlan({
|
||||
@Path() required String slug,
|
||||
});
|
||||
|
||||
@POST('/api/plans/{slug}/add_to_favorite')
|
||||
Future<void> addToFavorite({
|
||||
@Path() required String slug,
|
||||
});
|
||||
|
||||
@POST('/api/plans/{slug}/remove_from_favorite')
|
||||
Future<void> removeFromFavorite({
|
||||
@Path() required String slug,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user