mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Update
This commit is contained in:
19
lib/api/client.dart
Normal file
19
lib/api/client.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
import 'api_result.dart';
|
||||
import 'user.dart';
|
||||
|
||||
part 'client.g.dart';
|
||||
|
||||
@RestApi(parser: Parser.FlutterCompute)
|
||||
abstract class EHApi {
|
||||
factory EHApi(Dio dio, {String baseUrl}) = _EHApi;
|
||||
|
||||
@GET('/user')
|
||||
Future<ApiResult<BUser>> getUser();
|
||||
@GET('/user')
|
||||
Future<ApiResult<BUser>> getUserById(@Query("id") int id);
|
||||
@GET('/user')
|
||||
Future<ApiResult<BUser>> getUserByUsername(
|
||||
@Query("username") String username);
|
||||
}
|
||||
Reference in New Issue
Block a user