metercommons_transcribes.post.dart 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * @Author : WuWei
  3. * @LastEditors : WuWei
  4. * @Date : 2021-07-13 09:03:28
  5. * @LastEditTime : 2023-08-16 17:10:11
  6. * @FilePath : /app-boost/api_package/lib/metercommons_transcribes.post.dart
  7. * @Description : Do not edit
  8. */
  9. //*****************************************************************
  10. // Generate by vsc-wisdom-flutter-kit
  11. //*****************************************************************
  12. ///[http://yapi.wisdomcity.com.cn/project/16/interface/api/2915](http://yapi.wisdomcity.com.cn/project/16/interface/api/2915)
  13. ///
  14. ///update 2020-10-9 11:45:0
  15. ///
  16. ///公共仪表抄表
  17. // ignore: library_names
  18. library metercommons_transcribes.post;
  19. import 'response_model.dart';
  20. import 'package:dio/dio.dart';
  21. ///[http://yapi.wisdomcity.com.cn/project/16/interface/api/2915](http://yapi.wisdomcity.com.cn/project/16/interface/api/2915)
  22. ///
  23. ///update 2020-10-9 11:45:0
  24. ///
  25. ///公共仪表抄表
  26. class Interface {
  27. Interface._();
  28. static const String path = '/app/admin/metercommons/transcribes';
  29. static const String method = 'post';
  30. static Future<ResponseModel<String>> request(
  31. Dio dio, {
  32. Options? options,
  33. Map<String, dynamic>? pathParameters,
  34. Map<String, dynamic>? queryParameters,
  35. data,
  36. CancelToken? cancelToken,
  37. ProgressCallback? onSendProgress,
  38. ProgressCallback? onReceiveProgress,
  39. }) async {
  40. // final _options = options != null ? options.copyWith(method: method) : null;
  41. final res = await dio.request(
  42. _path(pathParameters ?? {}),
  43. data: data,
  44. queryParameters: queryParameters,
  45. cancelToken: cancelToken,
  46. options: Options(method: 'post'),
  47. onSendProgress: onSendProgress,
  48. onReceiveProgress: onReceiveProgress,
  49. );
  50. return ResponseModel(
  51. json: res.data,
  52. to: (v) => v,
  53. from: (v) => v,
  54. );
  55. }
  56. static String _path(Map<String, dynamic> pathParameters) {
  57. String back = path;
  58. for (final key in pathParameters.keys) {
  59. back = back.replaceAll('{$key}', pathParameters[key].toString());
  60. }
  61. return back;
  62. }
  63. }