forked from eatvio/eatvio_app
31 lines
727 B
Dart
31 lines
727 B
Dart
|
|
|
|
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,
|
|
});
|
|
} |