rest_client.g.dart 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. part of 'rest_client.dart';
  3. // **************************************************************************
  4. // RetrofitGenerator
  5. // **************************************************************************
  6. // ignore_for_file: unnecessary_brace_in_string_interps
  7. class _RestClient implements RestClient {
  8. _RestClient(this._dio, {this.baseUrl});
  9. final Dio _dio;
  10. String? baseUrl;
  11. @override
  12. Future<RespData<UpdateInfo>> checkUpdate(version) async {
  13. const _extra = <String, dynamic>{};
  14. final queryParameters = <String, dynamic>{r'version': version};
  15. final _headers = <String, dynamic>{};
  16. final _data = <String, dynamic>{};
  17. final _result = await _dio.fetch<Map<String, dynamic>>(
  18. _setStreamType<RespData<UpdateInfo>>(
  19. Options(method: 'GET', headers: _headers, extra: _extra)
  20. .compose(_dio.options, '/app/checkUpdate',
  21. queryParameters: queryParameters, data: _data)
  22. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  23. final value = RespData<UpdateInfo>.fromJson(_result.data!);
  24. return value;
  25. }
  26. @override
  27. Future<RespData<Hardware>> checkHardwareUpdate(ver, appVer) async {
  28. const _extra = <String, dynamic>{};
  29. final queryParameters = <String, dynamic>{
  30. r'hardware_ver': ver,
  31. r'app_ver': appVer
  32. };
  33. final _headers = <String, dynamic>{};
  34. final _data = <String, dynamic>{};
  35. final _result = await _dio.fetch<Map<String, dynamic>>(
  36. _setStreamType<RespData<Hardware>>(
  37. Options(method: 'GET', headers: _headers, extra: _extra)
  38. .compose(_dio.options, '/app/hardwareLastVer',
  39. queryParameters: queryParameters, data: _data)
  40. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  41. final value = RespData<Hardware>.fromJson(_result.data!);
  42. return value;
  43. }
  44. @override
  45. Future<RespData<String>> onConnBt(shoes_mac, firmware_ver, hardware_ver,
  46. app_ver, os_name, os_ver, lang, phone_brand, phone_model) async {
  47. const _extra = <String, dynamic>{};
  48. final queryParameters = <String, dynamic>{
  49. r'shoes_mac': shoes_mac,
  50. r'firmware_ver': firmware_ver,
  51. r'hardware_ver': hardware_ver,
  52. r'app_ver': app_ver,
  53. r'os_name': os_name,
  54. r'os_ver': os_ver,
  55. r'lang': lang,
  56. r'phone_brand': phone_brand,
  57. r'phone_model': phone_model
  58. };
  59. final _headers = <String, dynamic>{};
  60. final _data = <String, dynamic>{};
  61. final _result = await _dio.fetch<Map<String, dynamic>>(
  62. _setStreamType<RespData<String>>(
  63. Options(method: 'POST', headers: _headers, extra: _extra)
  64. .compose(_dio.options, '/app/onConnBt',
  65. queryParameters: queryParameters, data: _data)
  66. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  67. final value = RespData<String>.fromJson(_result.data!);
  68. return value;
  69. }
  70. @override
  71. Future<RespData<String>> logHardwareErr(shoes_mac, firmware_ver, hardware_ver,
  72. app_ver, err_code, err_msg, err_detail) async {
  73. const _extra = <String, dynamic>{};
  74. final queryParameters = <String, dynamic>{
  75. r'shoes_mac': shoes_mac,
  76. r'firmware_ver': firmware_ver,
  77. r'hardware_ver': hardware_ver,
  78. r'app_ver': app_ver,
  79. r'err_code': err_code,
  80. r'err_msg': err_msg,
  81. r'err_detail': err_detail
  82. };
  83. final _headers = <String, dynamic>{};
  84. final _data = <String, dynamic>{};
  85. final _result = await _dio.fetch<Map<String, dynamic>>(
  86. _setStreamType<RespData<String>>(
  87. Options(method: 'POST', headers: _headers, extra: _extra)
  88. .compose(_dio.options, '/app/logHardwareErr',
  89. queryParameters: queryParameters, data: _data)
  90. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  91. final value = RespData<String>.fromJson(_result.data!);
  92. return value;
  93. }
  94. @override
  95. Future<RespData<UserInfo>> getUserInfo(uid, {options}) async {
  96. const _extra = <String, dynamic>{};
  97. final queryParameters = <String, dynamic>{r'id': uid};
  98. queryParameters.removeWhere((k, v) => v == null);
  99. final _headers = <String, dynamic>{};
  100. final _data = <String, dynamic>{};
  101. final newOptions = newRequestOptions(options);
  102. newOptions.extra.addAll(_extra);
  103. newOptions.headers.addAll(_dio.options.headers);
  104. newOptions.headers.addAll(_headers);
  105. final _result = await _dio.fetch<Map<String, dynamic>>(newOptions.copyWith(
  106. method: 'GET',
  107. baseUrl: baseUrl ?? _dio.options.baseUrl,
  108. queryParameters: queryParameters,
  109. path: '/user/info')
  110. ..data = _data);
  111. final value = RespData<UserInfo>.fromJson(_result.data!);
  112. return value;
  113. }
  114. @override
  115. Future<RespData<UserInfo>> getUserInfoSelf() async {
  116. const _extra = <String, dynamic>{};
  117. final queryParameters = <String, dynamic>{};
  118. final _headers = <String, dynamic>{};
  119. final _data = <String, dynamic>{};
  120. final _result = await _dio.fetch<Map<String, dynamic>>(
  121. _setStreamType<RespData<UserInfo>>(
  122. Options(method: 'GET', headers: _headers, extra: _extra)
  123. .compose(_dio.options, '/user/info',
  124. queryParameters: queryParameters, data: _data)
  125. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  126. final value = RespData<UserInfo>.fromJson(_result.data!);
  127. return value;
  128. }
  129. @override
  130. Future<RespData<int>> getCountNameCard() async {
  131. const _extra = <String, dynamic>{};
  132. final queryParameters = <String, dynamic>{};
  133. final _headers = <String, dynamic>{};
  134. final _data = <String, dynamic>{};
  135. final _result = await _dio.fetch<Map<String, dynamic>>(
  136. _setStreamType<RespData<int>>(
  137. Options(method: 'GET', headers: _headers, extra: _extra)
  138. .compose(_dio.options, '/user/countNameCard',
  139. queryParameters: queryParameters, data: _data)
  140. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  141. final value = RespData<int>.fromJson(_result.data!);
  142. return value;
  143. }
  144. @override
  145. Future<RespData<SportIndex>> getSportIndex() async {
  146. const _extra = <String, dynamic>{};
  147. final queryParameters = <String, dynamic>{};
  148. final _headers = <String, dynamic>{};
  149. final _data = <String, dynamic>{};
  150. final _result = await _dio.fetch<Map<String, dynamic>>(
  151. _setStreamType<RespData<SportIndex>>(
  152. Options(method: 'GET', headers: _headers, extra: _extra)
  153. .compose(_dio.options, '/sport/index',
  154. queryParameters: queryParameters, data: _data)
  155. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  156. final value = RespData<SportIndex>.fromJson(_result.data!);
  157. return value;
  158. }
  159. @override
  160. Future<RespData<ExerIndex>> getExerIndex() async {
  161. const _extra = <String, dynamic>{};
  162. final queryParameters = <String, dynamic>{};
  163. final _headers = <String, dynamic>{};
  164. final _data = <String, dynamic>{};
  165. final _result = await _dio.fetch<Map<String, dynamic>>(
  166. _setStreamType<RespData<ExerIndex>>(
  167. Options(method: 'GET', headers: _headers, extra: _extra)
  168. .compose(_dio.options, '/exer/index',
  169. queryParameters: queryParameters, data: _data)
  170. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  171. final value = RespData<ExerIndex>.fromJson(_result.data!);
  172. return value;
  173. }
  174. @override
  175. Future<RespData<SportDetail>> getSportDetail() async {
  176. const _extra = <String, dynamic>{};
  177. final queryParameters = <String, dynamic>{};
  178. final _headers = <String, dynamic>{};
  179. final _data = <String, dynamic>{};
  180. final _result = await _dio.fetch<Map<String, dynamic>>(
  181. _setStreamType<RespData<SportDetail>>(
  182. Options(method: 'GET', headers: _headers, extra: _extra)
  183. .compose(_dio.options, '/sport/detail',
  184. queryParameters: queryParameters, data: _data)
  185. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  186. final value = RespData<SportDetail>.fromJson(_result.data!);
  187. return value;
  188. }
  189. @override
  190. Future<RespData<GameAddEntity>> postAddGame(
  191. gameId,
  192. score,
  193. level,
  194. record,
  195. mode,
  196. duration,
  197. consume,
  198. screen,
  199. jumpCount,
  200. crouchCount,
  201. stepCount,
  202. distance,
  203. opponent_id,
  204. is_cancel,
  205. play_group,
  206. movements,
  207. time) async {
  208. const _extra = <String, dynamic>{};
  209. final queryParameters = <String, dynamic>{
  210. r'game_id': gameId,
  211. r'score': score,
  212. r'level': level,
  213. r'record': record,
  214. r'mode': mode,
  215. r'duration': duration,
  216. r'consume': consume,
  217. r'screen': screen,
  218. r'jump': jumpCount,
  219. r'crouch': crouchCount,
  220. r'step': stepCount,
  221. r'distance': distance,
  222. r'opponent_id': opponent_id,
  223. r'is_cancel': is_cancel,
  224. r'play_group': play_group,
  225. r'movements': movements,
  226. r'time': time
  227. };
  228. final _headers = <String, dynamic>{};
  229. final _data = <String, dynamic>{};
  230. final _result = await _dio.fetch<Map<String, dynamic>>(
  231. _setStreamType<RespData<GameAddEntity>>(
  232. Options(method: 'POST', headers: _headers, extra: _extra)
  233. .compose(_dio.options, '/gameRecord/addGame',
  234. queryParameters: queryParameters, data: _data)
  235. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  236. final value = RespData<GameAddEntity>.fromJson(_result.data!);
  237. return value;
  238. }
  239. @override
  240. Future<RespList<SportTarget>> getSportTargetAll() async {
  241. const _extra = <String, dynamic>{};
  242. final queryParameters = <String, dynamic>{};
  243. final _headers = <String, dynamic>{};
  244. final _data = <String, dynamic>{};
  245. final _result = await _dio.fetch<Map<String, dynamic>>(
  246. _setStreamType<RespList<SportTarget>>(
  247. Options(method: 'GET', headers: _headers, extra: _extra)
  248. .compose(_dio.options, '/sportTarget/all',
  249. queryParameters: queryParameters, data: _data)
  250. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  251. final value = RespList<SportTarget>.fromJson(_result.data!);
  252. return value;
  253. }
  254. @override
  255. Future<RespData<SportTargetToday>> setSportTarget(id) async {
  256. const _extra = <String, dynamic>{};
  257. final queryParameters = <String, dynamic>{r'id': id};
  258. final _headers = <String, dynamic>{};
  259. final _data = <String, dynamic>{};
  260. final _result = await _dio.fetch<Map<String, dynamic>>(
  261. _setStreamType<RespData<SportTargetToday>>(
  262. Options(method: 'GET', headers: _headers, extra: _extra)
  263. .compose(_dio.options, '/sportTarget/setold',
  264. queryParameters: queryParameters, data: _data)
  265. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  266. final value = RespData<SportTargetToday>.fromJson(_result.data!);
  267. return value;
  268. }
  269. @override
  270. Future<RespData<SportTargetToday>> setSportTargetToday(type,
  271. {consume, durationMinute}) async {
  272. const _extra = <String, dynamic>{};
  273. final queryParameters = <String, dynamic>{
  274. r'type': type,
  275. r'consume': consume,
  276. r'duration_minute': durationMinute
  277. };
  278. queryParameters.removeWhere((k, v) => v == null);
  279. final _headers = <String, dynamic>{};
  280. final _data = <String, dynamic>{};
  281. final _result = await _dio.fetch<Map<String, dynamic>>(
  282. _setStreamType<RespData<SportTargetToday>>(
  283. Options(method: 'GET', headers: _headers, extra: _extra)
  284. .compose(_dio.options, '/sportTarget/set',
  285. queryParameters: queryParameters, data: _data)
  286. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  287. final value = RespData<SportTargetToday>.fromJson(_result.data!);
  288. return value;
  289. }
  290. @override
  291. Future<RespData<SportTargetToday>> setSportTargetCustom(
  292. duration, consume) async {
  293. const _extra = <String, dynamic>{};
  294. final queryParameters = <String, dynamic>{
  295. r'duration': duration,
  296. r'consume': consume
  297. };
  298. final _headers = <String, dynamic>{};
  299. final _data = <String, dynamic>{};
  300. final _result = await _dio.fetch<Map<String, dynamic>>(
  301. _setStreamType<RespData<SportTargetToday>>(
  302. Options(method: 'GET', headers: _headers, extra: _extra)
  303. .compose(_dio.options, '/sportTarget/setCustom',
  304. queryParameters: queryParameters, data: _data)
  305. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  306. final value = RespData<SportTargetToday>.fromJson(_result.data!);
  307. return value;
  308. }
  309. @override
  310. Future<Resp> delSportTarget() async {
  311. const _extra = <String, dynamic>{};
  312. final queryParameters = <String, dynamic>{};
  313. final _headers = <String, dynamic>{};
  314. final _data = <String, dynamic>{};
  315. final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType<Resp>(
  316. Options(method: 'GET', headers: _headers, extra: _extra)
  317. .compose(_dio.options, '/sportTarget/del',
  318. queryParameters: queryParameters, data: _data)
  319. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  320. final value = Resp.fromJson(_result.data!);
  321. return value;
  322. }
  323. @override
  324. Future<RespData<SportTargetToday>> getSportTargetMy() async {
  325. const _extra = <String, dynamic>{};
  326. final queryParameters = <String, dynamic>{};
  327. final _headers = <String, dynamic>{};
  328. final _data = <String, dynamic>{};
  329. final _result = await _dio.fetch<Map<String, dynamic>>(
  330. _setStreamType<RespData<SportTargetToday>>(
  331. Options(method: 'GET', headers: _headers, extra: _extra)
  332. .compose(_dio.options, '/sportTarget/my',
  333. queryParameters: queryParameters, data: _data)
  334. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  335. final value = RespData<SportTargetToday>.fromJson(_result.data!);
  336. return value;
  337. }
  338. @override
  339. Future<RespData<SportTargetIndex>> getSportTargetIndex() async {
  340. const _extra = <String, dynamic>{};
  341. final queryParameters = <String, dynamic>{};
  342. final _headers = <String, dynamic>{};
  343. final _data = <String, dynamic>{};
  344. final _result = await _dio.fetch<Map<String, dynamic>>(
  345. _setStreamType<RespData<SportTargetIndex>>(
  346. Options(method: 'GET', headers: _headers, extra: _extra)
  347. .compose(_dio.options, '/sportTarget/index',
  348. queryParameters: queryParameters, data: _data)
  349. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  350. final value = RespData<SportTargetIndex>.fromJson(_result.data!);
  351. return value;
  352. }
  353. @override
  354. Future<RespList<SportTargetRecord>> getSportTargetRecord(year, month) async {
  355. const _extra = <String, dynamic>{};
  356. final queryParameters = <String, dynamic>{r'year': year, r'month': month};
  357. final _headers = <String, dynamic>{};
  358. final _data = <String, dynamic>{};
  359. final _result = await _dio.fetch<Map<String, dynamic>>(
  360. _setStreamType<RespList<SportTargetRecord>>(
  361. Options(method: 'GET', headers: _headers, extra: _extra)
  362. .compose(_dio.options, '/sportTarget/records',
  363. queryParameters: queryParameters, data: _data)
  364. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  365. final value = RespList<SportTargetRecord>.fromJson(_result.data!);
  366. return value;
  367. }
  368. @override
  369. Future<RespData<String>> sportTargetReward(id) async {
  370. const _extra = <String, dynamic>{};
  371. final queryParameters = <String, dynamic>{r'id': id};
  372. final _headers = <String, dynamic>{};
  373. final _data = <String, dynamic>{};
  374. final _result = await _dio.fetch<Map<String, dynamic>>(
  375. _setStreamType<RespData<String>>(Options(
  376. method: 'POST',
  377. headers: _headers,
  378. extra: _extra,
  379. contentType: 'application/x-www-form-urlencoded')
  380. .compose(_dio.options, '/sportTarget/reward',
  381. queryParameters: queryParameters, data: _data)
  382. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  383. final value = RespData<String>.fromJson(_result.data!);
  384. return value;
  385. }
  386. @override
  387. Future<RespData<SportDetailSimple>> getSportRecordListOneDay(date,
  388. {exceptDaily}) async {
  389. const _extra = <String, dynamic>{};
  390. final queryParameters = <String, dynamic>{
  391. r'date': date,
  392. r'except_daily': exceptDaily
  393. };
  394. queryParameters.removeWhere((k, v) => v == null);
  395. final _headers = <String, dynamic>{};
  396. final _data = <String, dynamic>{};
  397. final _result = await _dio.fetch<Map<String, dynamic>>(
  398. _setStreamType<RespData<SportDetailSimple>>(
  399. Options(method: 'GET', headers: _headers, extra: _extra)
  400. .compose(_dio.options, '/exerRecord/listOneDay',
  401. queryParameters: queryParameters, data: _data)
  402. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  403. final value = RespData<SportDetailSimple>.fromJson(_result.data!);
  404. return value;
  405. }
  406. @override
  407. Future<RespData<SportDetailSimple>> getSportRecordListByDay(begin, end,
  408. {exceptDaily}) async {
  409. const _extra = <String, dynamic>{};
  410. final queryParameters = <String, dynamic>{
  411. r'begin': begin,
  412. r'end': end,
  413. r'except_daily': exceptDaily
  414. };
  415. queryParameters.removeWhere((k, v) => v == null);
  416. final _headers = <String, dynamic>{};
  417. final _data = <String, dynamic>{};
  418. final _result = await _dio.fetch<Map<String, dynamic>>(
  419. _setStreamType<RespData<SportDetailSimple>>(
  420. Options(method: 'GET', headers: _headers, extra: _extra)
  421. .compose(_dio.options, '/exerRecord/listByDay',
  422. queryParameters: queryParameters, data: _data)
  423. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  424. final value = RespData<SportDetailSimple>.fromJson(_result.data!);
  425. return value;
  426. }
  427. @override
  428. Future<RespData<SportDetailSimple>> getSportRecordListByMonth(year,
  429. {exceptDaily}) async {
  430. const _extra = <String, dynamic>{};
  431. final queryParameters = <String, dynamic>{
  432. r'year': year,
  433. r'except_daily': exceptDaily
  434. };
  435. queryParameters.removeWhere((k, v) => v == null);
  436. final _headers = <String, dynamic>{};
  437. final _data = <String, dynamic>{};
  438. final _result = await _dio.fetch<Map<String, dynamic>>(
  439. _setStreamType<RespData<SportDetailSimple>>(
  440. Options(method: 'GET', headers: _headers, extra: _extra)
  441. .compose(_dio.options, '/exerRecord/listByMonth',
  442. queryParameters: queryParameters, data: _data)
  443. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  444. final value = RespData<SportDetailSimple>.fromJson(_result.data!);
  445. return value;
  446. }
  447. @override
  448. Future<RespData<SportDetailSimple>> getSportRecordListByYear(
  449. {exceptDaily}) async {
  450. const _extra = <String, dynamic>{};
  451. final queryParameters = <String, dynamic>{r'except_daily': exceptDaily};
  452. queryParameters.removeWhere((k, v) => v == null);
  453. final _headers = <String, dynamic>{};
  454. final _data = <String, dynamic>{};
  455. final _result = await _dio.fetch<Map<String, dynamic>>(
  456. _setStreamType<RespData<SportDetailSimple>>(
  457. Options(method: 'GET', headers: _headers, extra: _extra)
  458. .compose(_dio.options, '/exerRecord/listByYear',
  459. queryParameters: queryParameters, data: _data)
  460. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  461. final value = RespData<SportDetailSimple>.fromJson(_result.data!);
  462. return value;
  463. }
  464. @override
  465. Future<RespList<SportHistory>> getSportRecordHistory(year) async {
  466. const _extra = <String, dynamic>{};
  467. final queryParameters = <String, dynamic>{r'year': year};
  468. final _headers = <String, dynamic>{};
  469. final _data = <String, dynamic>{};
  470. final _result = await _dio.fetch<Map<String, dynamic>>(
  471. _setStreamType<RespList<SportHistory>>(
  472. Options(method: 'GET', headers: _headers, extra: _extra)
  473. .compose(_dio.options, '/exerRecord/history',
  474. queryParameters: queryParameters, data: _data)
  475. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  476. final value = RespList<SportHistory>.fromJson(_result.data!);
  477. return value;
  478. }
  479. @override
  480. Future<RespPage<RecordsTodaySum>> getSportRecordList(gameId, {page}) async {
  481. const _extra = <String, dynamic>{};
  482. final queryParameters = <String, dynamic>{
  483. r'game_id': gameId,
  484. r'page': page
  485. };
  486. queryParameters.removeWhere((k, v) => v == null);
  487. final _headers = <String, dynamic>{};
  488. final _data = <String, dynamic>{};
  489. final _result = await _dio.fetch<Map<String, dynamic>>(
  490. _setStreamType<RespPage<RecordsTodaySum>>(
  491. Options(method: 'GET', headers: _headers, extra: _extra)
  492. .compose(_dio.options, '/gameRecord/list',
  493. queryParameters: queryParameters, data: _data)
  494. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  495. final value = RespPage<RecordsTodaySum>.fromJson(_result.data!);
  496. return value;
  497. }
  498. @override
  499. Future<RespData<SportStep>> addDaily({step, distance, time, data}) async {
  500. const _extra = <String, dynamic>{};
  501. final queryParameters = <String, dynamic>{
  502. r'step': step,
  503. r'distance': distance,
  504. r'time': time
  505. };
  506. queryParameters.removeWhere((k, v) => v == null);
  507. final _headers = <String, dynamic>{};
  508. final _data = {'data': data};
  509. _data.removeWhere((k, v) => v == null);
  510. final _result = await _dio.fetch<Map<String, dynamic>>(
  511. _setStreamType<RespData<SportStep>>(Options(
  512. method: 'POST',
  513. headers: _headers,
  514. extra: _extra,
  515. contentType: 'application/x-www-form-urlencoded')
  516. .compose(_dio.options, '/stepRecord/addDaily',
  517. queryParameters: queryParameters, data: _data)
  518. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  519. final value = RespData<SportStep>.fromJson(_result.data!);
  520. return value;
  521. }
  522. @override
  523. Future<RespData<SportStep>> getStepRecordListOneDay(date) async {
  524. const _extra = <String, dynamic>{};
  525. final queryParameters = <String, dynamic>{r'date': date};
  526. final _headers = <String, dynamic>{};
  527. final _data = <String, dynamic>{};
  528. final _result = await _dio.fetch<Map<String, dynamic>>(
  529. _setStreamType<RespData<SportStep>>(
  530. Options(method: 'GET', headers: _headers, extra: _extra)
  531. .compose(_dio.options, '/stepRecord/listOneDay',
  532. queryParameters: queryParameters, data: _data)
  533. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  534. final value = RespData<SportStep>.fromJson(_result.data!);
  535. return value;
  536. }
  537. @override
  538. Future<RespData<SportStep>> getStepRecordListByDay(begin, end) async {
  539. const _extra = <String, dynamic>{};
  540. final queryParameters = <String, dynamic>{r'begin': begin, r'end': end};
  541. final _headers = <String, dynamic>{};
  542. final _data = <String, dynamic>{};
  543. final _result = await _dio.fetch<Map<String, dynamic>>(
  544. _setStreamType<RespData<SportStep>>(
  545. Options(method: 'GET', headers: _headers, extra: _extra)
  546. .compose(_dio.options, '/stepRecord/listByDay',
  547. queryParameters: queryParameters, data: _data)
  548. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  549. final value = RespData<SportStep>.fromJson(_result.data!);
  550. return value;
  551. }
  552. @override
  553. Future<RespData<SportStep>> getStepRecordListByMonth(year) async {
  554. const _extra = <String, dynamic>{};
  555. final queryParameters = <String, dynamic>{r'year': year};
  556. final _headers = <String, dynamic>{};
  557. final _data = <String, dynamic>{};
  558. final _result = await _dio.fetch<Map<String, dynamic>>(
  559. _setStreamType<RespData<SportStep>>(
  560. Options(method: 'GET', headers: _headers, extra: _extra)
  561. .compose(_dio.options, '/stepRecord/listByMonth',
  562. queryParameters: queryParameters, data: _data)
  563. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  564. final value = RespData<SportStep>.fromJson(_result.data!);
  565. return value;
  566. }
  567. @override
  568. Future<RespData<SportStep>> getStepRecordListByYear() async {
  569. const _extra = <String, dynamic>{};
  570. final queryParameters = <String, dynamic>{};
  571. final _headers = <String, dynamic>{};
  572. final _data = <String, dynamic>{};
  573. final _result = await _dio.fetch<Map<String, dynamic>>(
  574. _setStreamType<RespData<SportStep>>(
  575. Options(method: 'GET', headers: _headers, extra: _extra)
  576. .compose(_dio.options, '/stepRecord/listByYear',
  577. queryParameters: queryParameters, data: _data)
  578. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  579. final value = RespData<SportStep>.fromJson(_result.data!);
  580. return value;
  581. }
  582. @override
  583. Future<RespData<GameRecordHistory>> getGameRecordSum() async {
  584. const _extra = <String, dynamic>{};
  585. final queryParameters = <String, dynamic>{};
  586. final _headers = <String, dynamic>{};
  587. final _data = <String, dynamic>{};
  588. final _result = await _dio.fetch<Map<String, dynamic>>(
  589. _setStreamType<RespData<GameRecordHistory>>(
  590. Options(method: 'GET', headers: _headers, extra: _extra)
  591. .compose(_dio.options, '/gameRecord/sum',
  592. queryParameters: queryParameters, data: _data)
  593. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  594. final value = RespData<GameRecordHistory>.fromJson(_result.data!);
  595. return value;
  596. }
  597. @override
  598. Future<RespData<GameRecord>> getGameRecord(gameId) async {
  599. const _extra = <String, dynamic>{};
  600. final queryParameters = <String, dynamic>{r'id': gameId};
  601. final _headers = <String, dynamic>{};
  602. final _data = <String, dynamic>{};
  603. final _result = await _dio.fetch<Map<String, dynamic>>(
  604. _setStreamType<RespData<GameRecord>>(
  605. Options(method: 'GET', headers: _headers, extra: _extra)
  606. .compose(_dio.options, '/gameRecord/game',
  607. queryParameters: queryParameters, data: _data)
  608. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  609. final value = RespData<GameRecord>.fromJson(_result.data!);
  610. return value;
  611. }
  612. @override
  613. Future<RespData<RankInfo>> getRankInfo(gameId,
  614. {provinceId, cityId, districtId, scope}) async {
  615. const _extra = <String, dynamic>{};
  616. final queryParameters = <String, dynamic>{
  617. r'game_id': gameId,
  618. r'province_id': provinceId,
  619. r'city_id': cityId,
  620. r'district_id': districtId,
  621. r'scope': scope
  622. };
  623. queryParameters.removeWhere((k, v) => v == null);
  624. final _headers = <String, dynamic>{};
  625. final _data = <String, dynamic>{};
  626. final _result = await _dio.fetch<Map<String, dynamic>>(
  627. _setStreamType<RespData<RankInfo>>(
  628. Options(method: 'GET', headers: _headers, extra: _extra)
  629. .compose(_dio.options, '/rank/game',
  630. queryParameters: queryParameters, data: _data)
  631. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  632. final value = RespData<RankInfo>.fromJson(_result.data!);
  633. return value;
  634. }
  635. @override
  636. Future<RespList<Forum>> getForumIndex() async {
  637. const _extra = <String, dynamic>{};
  638. final queryParameters = <String, dynamic>{};
  639. final _headers = <String, dynamic>{};
  640. final _data = <String, dynamic>{};
  641. final _result = await _dio.fetch<Map<String, dynamic>>(
  642. _setStreamType<RespList<Forum>>(
  643. Options(method: 'GET', headers: _headers, extra: _extra)
  644. .compose(_dio.options, '/forum/index',
  645. queryParameters: queryParameters, data: _data)
  646. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  647. final value = RespList<Forum>.fromJson(_result.data!);
  648. return value;
  649. }
  650. @override
  651. Future<RespList<Forum>> getForumIndex2() async {
  652. const _extra = <String, dynamic>{};
  653. final queryParameters = <String, dynamic>{};
  654. final _headers = <String, dynamic>{};
  655. final _data = <String, dynamic>{};
  656. final _result = await _dio.fetch<Map<String, dynamic>>(
  657. _setStreamType<RespList<Forum>>(
  658. Options(method: 'GET', headers: _headers, extra: _extra)
  659. .compose(_dio.options, '/forum/index2',
  660. queryParameters: queryParameters, data: _data)
  661. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  662. final value = RespList<Forum>.fromJson(_result.data!);
  663. return value;
  664. }
  665. @override
  666. Future<RespPage<Post>> getPostList(
  667. {forumId, page, isGood, kw, isOfficial}) async {
  668. const _extra = <String, dynamic>{};
  669. final queryParameters = <String, dynamic>{
  670. r'forumId': forumId,
  671. r'p': page,
  672. r'isGood': isGood,
  673. r'kw': kw,
  674. r'isOfficial': isOfficial
  675. };
  676. queryParameters.removeWhere((k, v) => v == null);
  677. final _headers = <String, dynamic>{};
  678. final _data = <String, dynamic>{};
  679. final _result = await _dio.fetch<Map<String, dynamic>>(
  680. _setStreamType<RespPage<Post>>(
  681. Options(method: 'GET', headers: _headers, extra: _extra)
  682. .compose(_dio.options, '/forum/list',
  683. queryParameters: queryParameters, data: _data)
  684. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  685. final value = RespPage<Post>.fromJson(_result.data!);
  686. return value;
  687. }
  688. @override
  689. Future<RespPage<Post>> getPostListByOfficial(
  690. {forumId, page, limit, sortBy, isOfficial}) async {
  691. const _extra = <String, dynamic>{};
  692. final queryParameters = <String, dynamic>{
  693. r'forumId': forumId,
  694. r'p': page,
  695. r'limit': limit,
  696. r'sortBy': sortBy,
  697. r'isOfficial': isOfficial
  698. };
  699. queryParameters.removeWhere((k, v) => v == null);
  700. final _headers = <String, dynamic>{};
  701. final _data = <String, dynamic>{};
  702. final _result = await _dio.fetch<Map<String, dynamic>>(
  703. _setStreamType<RespPage<Post>>(
  704. Options(method: 'GET', headers: _headers, extra: _extra)
  705. .compose(_dio.options, '/forum/listByOfficial',
  706. queryParameters: queryParameters, data: _data)
  707. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  708. final value = RespPage<Post>.fromJson(_result.data!);
  709. return value;
  710. }
  711. @override
  712. Future<RespPage<Post>> getPostListByHot(
  713. {forumId, page, isOfficial, options}) async {
  714. const _extra = <String, dynamic>{};
  715. final queryParameters = <String, dynamic>{
  716. r'forumId': forumId,
  717. r'p': page,
  718. r'isOfficial': isOfficial
  719. };
  720. queryParameters.removeWhere((k, v) => v == null);
  721. final _headers = <String, dynamic>{};
  722. final _data = <String, dynamic>{};
  723. final newOptions = newRequestOptions(options);
  724. newOptions.extra.addAll(_extra);
  725. newOptions.headers.addAll(_dio.options.headers);
  726. newOptions.headers.addAll(_headers);
  727. final _result = await _dio.fetch<Map<String, dynamic>>(newOptions.copyWith(
  728. method: 'GET',
  729. baseUrl: baseUrl ?? _dio.options.baseUrl,
  730. queryParameters: queryParameters,
  731. path: '/forum/listByHot')
  732. ..data = _data);
  733. final value = RespPage<Post>.fromJson(_result.data!);
  734. return value;
  735. }
  736. @override
  737. Future<RespPage<Post>> getPostListByUser(uid,
  738. {forumId, page, sortBy, removeTop, isOfficial}) async {
  739. const _extra = <String, dynamic>{};
  740. final queryParameters = <String, dynamic>{
  741. r'uid': uid,
  742. r'forumId': forumId,
  743. r'p': page,
  744. r'sortBy': sortBy,
  745. r'removeTop': removeTop,
  746. r'isOfficial': isOfficial
  747. };
  748. queryParameters.removeWhere((k, v) => v == null);
  749. final _headers = <String, dynamic>{};
  750. final _data = <String, dynamic>{};
  751. final _result = await _dio.fetch<Map<String, dynamic>>(
  752. _setStreamType<RespPage<Post>>(
  753. Options(method: 'GET', headers: _headers, extra: _extra)
  754. .compose(_dio.options, '/forum/listByUser',
  755. queryParameters: queryParameters, data: _data)
  756. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  757. final value = RespPage<Post>.fromJson(_result.data!);
  758. return value;
  759. }
  760. @override
  761. Future<RespPage<Post>> getPostListByFollow(uid,
  762. {forumId, page, limit, testuid, sortBy, isOfficial, options}) async {
  763. const _extra = <String, dynamic>{};
  764. final queryParameters = <String, dynamic>{
  765. r'uid': uid,
  766. r'forumId': forumId,
  767. r'p': page,
  768. r'limit': limit,
  769. r'testuid': testuid,
  770. r'sortBy': sortBy,
  771. r'isOfficial': isOfficial
  772. };
  773. queryParameters.removeWhere((k, v) => v == null);
  774. final _headers = <String, dynamic>{};
  775. final _data = <String, dynamic>{};
  776. final newOptions = newRequestOptions(options);
  777. newOptions.extra.addAll(_extra);
  778. newOptions.headers.addAll(_dio.options.headers);
  779. newOptions.headers.addAll(_headers);
  780. final _result = await _dio.fetch<Map<String, dynamic>>(newOptions.copyWith(
  781. method: 'GET',
  782. baseUrl: baseUrl ?? _dio.options.baseUrl,
  783. queryParameters: queryParameters,
  784. path: '/forum/listByFollow')
  785. ..data = _data);
  786. final value = RespPage<Post>.fromJson(_result.data!);
  787. return value;
  788. }
  789. @override
  790. Future<RespData<Post>> getPostDetail(subjectId) async {
  791. const _extra = <String, dynamic>{};
  792. final queryParameters = <String, dynamic>{r'subjectId': subjectId};
  793. final _headers = <String, dynamic>{};
  794. final _data = <String, dynamic>{};
  795. final _result = await _dio.fetch<Map<String, dynamic>>(
  796. _setStreamType<RespData<Post>>(
  797. Options(method: 'GET', headers: _headers, extra: _extra)
  798. .compose(_dio.options, '/forum/subjectDetail',
  799. queryParameters: queryParameters, data: _data)
  800. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  801. final value = RespData<Post>.fromJson(_result.data!);
  802. return value;
  803. }
  804. @override
  805. Future<RespPage<Comment>> getPostComments(subjectId, {page, sortBy}) async {
  806. const _extra = <String, dynamic>{};
  807. final queryParameters = <String, dynamic>{
  808. r'subjectId': subjectId,
  809. r'p': page,
  810. r'sortBy': sortBy
  811. };
  812. queryParameters.removeWhere((k, v) => v == null);
  813. final _headers = <String, dynamic>{};
  814. final _data = <String, dynamic>{};
  815. final _result = await _dio.fetch<Map<String, dynamic>>(
  816. _setStreamType<RespPage<Comment>>(
  817. Options(method: 'GET', headers: _headers, extra: _extra)
  818. .compose(_dio.options, '/forum/comments',
  819. queryParameters: queryParameters, data: _data)
  820. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  821. final value = RespPage<Comment>.fromJson(_result.data!);
  822. return value;
  823. }
  824. @override
  825. Future<RespPage<Comment>> getPostCommentSubs(parentCommentId,
  826. {page, sortBy}) async {
  827. const _extra = <String, dynamic>{};
  828. final queryParameters = <String, dynamic>{
  829. r'parentCommentId': parentCommentId,
  830. r'p': page,
  831. r'sortBy': sortBy
  832. };
  833. queryParameters.removeWhere((k, v) => v == null);
  834. final _headers = <String, dynamic>{};
  835. final _data = <String, dynamic>{};
  836. final _result = await _dio.fetch<Map<String, dynamic>>(
  837. _setStreamType<RespPage<Comment>>(
  838. Options(method: 'GET', headers: _headers, extra: _extra)
  839. .compose(_dio.options, '/forum/subComments',
  840. queryParameters: queryParameters, data: _data)
  841. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  842. final value = RespPage<Comment>.fromJson(_result.data!);
  843. return value;
  844. }
  845. @override
  846. Future<RespList<Comment>> getPostCommentsFromId(commentId,
  847. {limit, sortBy}) async {
  848. const _extra = <String, dynamic>{};
  849. final queryParameters = <String, dynamic>{
  850. r'commentId': commentId,
  851. r'limit': limit,
  852. r'sortBy': sortBy
  853. };
  854. queryParameters.removeWhere((k, v) => v == null);
  855. final _headers = <String, dynamic>{};
  856. final _data = <String, dynamic>{};
  857. final _result = await _dio.fetch<Map<String, dynamic>>(
  858. _setStreamType<RespList<Comment>>(
  859. Options(method: 'GET', headers: _headers, extra: _extra)
  860. .compose(_dio.options, '/forum/commentsFromId',
  861. queryParameters: queryParameters, data: _data)
  862. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  863. final value = RespList<Comment>.fromJson(_result.data!);
  864. return value;
  865. }
  866. @override
  867. Future<RespList<String>> getSearchWords() async {
  868. const _extra = <String, dynamic>{};
  869. final queryParameters = <String, dynamic>{};
  870. final _headers = <String, dynamic>{};
  871. final _data = <String, dynamic>{};
  872. final _result = await _dio.fetch<Map<String, dynamic>>(
  873. _setStreamType<RespList<String>>(
  874. Options(method: 'GET', headers: _headers, extra: _extra)
  875. .compose(_dio.options, '/forum/hotSearchWords',
  876. queryParameters: queryParameters, data: _data)
  877. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  878. final value = RespList<String>.fromJson(_result.data!);
  879. return value;
  880. }
  881. @override
  882. Future<RespData<String>> postForumLike(objectId, fieldName) async {
  883. const _extra = <String, dynamic>{};
  884. final queryParameters = <String, dynamic>{
  885. r'objectId': objectId,
  886. r'fieldName': fieldName
  887. };
  888. final _headers = <String, dynamic>{};
  889. final _data = <String, dynamic>{};
  890. final _result = await _dio.fetch<Map<String, dynamic>>(
  891. _setStreamType<RespData<String>>(
  892. Options(method: 'POST', headers: _headers, extra: _extra)
  893. .compose(_dio.options, '/forum/like',
  894. queryParameters: queryParameters, data: _data)
  895. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  896. final value = RespData<String>.fromJson(_result.data!);
  897. return value;
  898. }
  899. @override
  900. Future<RespData<String>> postForumUnLike(objectId, fieldName) async {
  901. const _extra = <String, dynamic>{};
  902. final queryParameters = <String, dynamic>{
  903. r'objectId': objectId,
  904. r'fieldName': fieldName
  905. };
  906. final _headers = <String, dynamic>{};
  907. final _data = <String, dynamic>{};
  908. final _result = await _dio.fetch<Map<String, dynamic>>(
  909. _setStreamType<RespData<String>>(
  910. Options(method: 'POST', headers: _headers, extra: _extra)
  911. .compose(_dio.options, '/forum/unlike',
  912. queryParameters: queryParameters, data: _data)
  913. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  914. final value = RespData<String>.fromJson(_result.data!);
  915. return value;
  916. }
  917. @override
  918. Future<RespData<String>> postDelSubject(subjectId) async {
  919. const _extra = <String, dynamic>{};
  920. final queryParameters = <String, dynamic>{r'subjectId': subjectId};
  921. final _headers = <String, dynamic>{};
  922. final _data = <String, dynamic>{};
  923. final _result = await _dio.fetch<Map<String, dynamic>>(
  924. _setStreamType<RespData<String>>(
  925. Options(method: 'POST', headers: _headers, extra: _extra)
  926. .compose(_dio.options, '/forum/delSubject',
  927. queryParameters: queryParameters, data: _data)
  928. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  929. final value = RespData<String>.fromJson(_result.data!);
  930. return value;
  931. }
  932. @override
  933. Future<RespData<String>> postDelComment(commentId) async {
  934. const _extra = <String, dynamic>{};
  935. final queryParameters = <String, dynamic>{r'commentId': commentId};
  936. final _headers = <String, dynamic>{};
  937. final _data = <String, dynamic>{};
  938. final _result = await _dio.fetch<Map<String, dynamic>>(
  939. _setStreamType<RespData<String>>(
  940. Options(method: 'POST', headers: _headers, extra: _extra)
  941. .compose(_dio.options, '/forum/delComment',
  942. queryParameters: queryParameters, data: _data)
  943. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  944. final value = RespData<String>.fromJson(_result.data!);
  945. return value;
  946. }
  947. @override
  948. Future<RespData<String>> postForumReport(
  949. {subjectId, commentId, content, userId}) async {
  950. const _extra = <String, dynamic>{};
  951. final queryParameters = <String, dynamic>{
  952. r'subjectId': subjectId,
  953. r'commentId': commentId,
  954. r'content': content,
  955. r'userId': userId
  956. };
  957. queryParameters.removeWhere((k, v) => v == null);
  958. final _headers = <String, dynamic>{};
  959. final _data = <String, dynamic>{};
  960. final _result = await _dio.fetch<Map<String, dynamic>>(
  961. _setStreamType<RespData<String>>(
  962. Options(method: 'POST', headers: _headers, extra: _extra)
  963. .compose(_dio.options, '/forum/report',
  964. queryParameters: queryParameters, data: _data)
  965. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  966. final value = RespData<String>.fromJson(_result.data!);
  967. return value;
  968. }
  969. @override
  970. Future<RespList<int>> postForumBlockUser(uid) async {
  971. const _extra = <String, dynamic>{};
  972. final queryParameters = <String, dynamic>{r'uid': uid};
  973. final _headers = <String, dynamic>{};
  974. final _data = <String, dynamic>{};
  975. final _result = await _dio.fetch<Map<String, dynamic>>(
  976. _setStreamType<RespList<int>>(
  977. Options(method: 'POST', headers: _headers, extra: _extra)
  978. .compose(_dio.options, '/forum/blockUser',
  979. queryParameters: queryParameters, data: _data)
  980. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  981. final value = RespList<int>.fromJson(_result.data!);
  982. return value;
  983. }
  984. @override
  985. Future<RespList<int>> postForumUnBlockUser(uid) async {
  986. const _extra = <String, dynamic>{};
  987. final queryParameters = <String, dynamic>{r'uid': uid};
  988. final _headers = <String, dynamic>{};
  989. final _data = <String, dynamic>{};
  990. final _result = await _dio.fetch<Map<String, dynamic>>(
  991. _setStreamType<RespList<int>>(
  992. Options(method: 'POST', headers: _headers, extra: _extra)
  993. .compose(_dio.options, '/forum/unblockUser',
  994. queryParameters: queryParameters, data: _data)
  995. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  996. final value = RespList<int>.fromJson(_result.data!);
  997. return value;
  998. }
  999. @override
  1000. Future<RespList<UserInfo>> getMyBlockUsers() async {
  1001. const _extra = <String, dynamic>{};
  1002. final queryParameters = <String, dynamic>{};
  1003. final _headers = <String, dynamic>{};
  1004. final _data = <String, dynamic>{};
  1005. final _result = await _dio.fetch<Map<String, dynamic>>(
  1006. _setStreamType<RespList<UserInfo>>(
  1007. Options(method: 'GET', headers: _headers, extra: _extra)
  1008. .compose(_dio.options, '/forum/myBlockUsers',
  1009. queryParameters: queryParameters, data: _data)
  1010. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1011. final value = RespList<UserInfo>.fromJson(_result.data!);
  1012. return value;
  1013. }
  1014. @override
  1015. Future<RespData<String>> postForumBlockObject(objectId, forName) async {
  1016. const _extra = <String, dynamic>{};
  1017. final queryParameters = <String, dynamic>{
  1018. r'objectId': objectId,
  1019. r'for': forName
  1020. };
  1021. final _headers = <String, dynamic>{};
  1022. final _data = <String, dynamic>{};
  1023. final _result = await _dio.fetch<Map<String, dynamic>>(
  1024. _setStreamType<RespData<String>>(
  1025. Options(method: 'POST', headers: _headers, extra: _extra)
  1026. .compose(_dio.options, '/forum/blockObject',
  1027. queryParameters: queryParameters, data: _data)
  1028. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1029. final value = RespData<String>.fromJson(_result.data!);
  1030. return value;
  1031. }
  1032. @override
  1033. Future<RespData<CommentPost>> postForumComment(subjectId, content,
  1034. {parentCommentId, toCommentId}) async {
  1035. const _extra = <String, dynamic>{};
  1036. final queryParameters = <String, dynamic>{
  1037. r'subjectId': subjectId,
  1038. r'content': content,
  1039. r'parentCommentId': parentCommentId,
  1040. r'toCommentId': toCommentId
  1041. };
  1042. queryParameters.removeWhere((k, v) => v == null);
  1043. final _headers = <String, dynamic>{};
  1044. final _data = <String, dynamic>{};
  1045. final _result = await _dio.fetch<Map<String, dynamic>>(
  1046. _setStreamType<RespData<CommentPost>>(
  1047. Options(method: 'POST', headers: _headers, extra: _extra)
  1048. .compose(_dio.options, '/forum/postComment',
  1049. queryParameters: queryParameters, data: _data)
  1050. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1051. final value = RespData<CommentPost>.fromJson(_result.data!);
  1052. return value;
  1053. }
  1054. @override
  1055. Future<RespData<Map<String, dynamic>>> postForum(forumId, content,
  1056. {images, quoteSubjectId, quoteCommentId, quoteData, cancelToken}) async {
  1057. const _extra = <String, dynamic>{};
  1058. final queryParameters = <String, dynamic>{
  1059. r'forumId': forumId,
  1060. r'content': content,
  1061. r'images': images,
  1062. r'quoteSubjectId': quoteSubjectId,
  1063. r'quoteCommentId': quoteCommentId,
  1064. r'quoteData': quoteData
  1065. };
  1066. queryParameters.removeWhere((k, v) => v == null);
  1067. final _headers = <String, dynamic>{};
  1068. final _data = <String, dynamic>{};
  1069. final _result = await _dio.fetch<Map<String, dynamic>>(
  1070. _setStreamType<RespData<Map<String, dynamic>>>(
  1071. Options(method: 'POST', headers: _headers, extra: _extra)
  1072. .compose(_dio.options, '/forum/post',
  1073. queryParameters: queryParameters, data: _data)
  1074. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1075. final value = RespData<Map<String, dynamic>>.fromJson(_result.data!);
  1076. return value;
  1077. }
  1078. @override
  1079. Future<RespData<String>> setUserTopSubjects(subjectIdList) async {
  1080. const _extra = <String, dynamic>{};
  1081. final queryParameters = <String, dynamic>{r'subjectIdList': subjectIdList};
  1082. final _headers = <String, dynamic>{};
  1083. final _data = <String, dynamic>{};
  1084. final _result = await _dio.fetch<Map<String, dynamic>>(
  1085. _setStreamType<RespData<String>>(
  1086. Options(method: 'POST', headers: _headers, extra: _extra)
  1087. .compose(_dio.options, '/forum/setUserTopSubjects',
  1088. queryParameters: queryParameters, data: _data)
  1089. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1090. final value = RespData<String>.fromJson(_result.data!);
  1091. return value;
  1092. }
  1093. @override
  1094. Future<RespData<String>> unsetUserTopSubjects(subjectIdList) async {
  1095. const _extra = <String, dynamic>{};
  1096. final queryParameters = <String, dynamic>{r'subjectIdList': subjectIdList};
  1097. final _headers = <String, dynamic>{};
  1098. final _data = <String, dynamic>{};
  1099. final _result = await _dio.fetch<Map<String, dynamic>>(
  1100. _setStreamType<RespData<String>>(
  1101. Options(method: 'POST', headers: _headers, extra: _extra)
  1102. .compose(_dio.options, '/forum/unsetUserTopSubjects',
  1103. queryParameters: queryParameters, data: _data)
  1104. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1105. final value = RespData<String>.fromJson(_result.data!);
  1106. return value;
  1107. }
  1108. @override
  1109. Future<RespList<Post>> getPostUserTopSubjects(uid,
  1110. {forumId, page, sortBy}) async {
  1111. const _extra = <String, dynamic>{};
  1112. final queryParameters = <String, dynamic>{
  1113. r'uid': uid,
  1114. r'forumId': forumId,
  1115. r'p': page,
  1116. r'sortBy': sortBy
  1117. };
  1118. queryParameters.removeWhere((k, v) => v == null);
  1119. final _headers = <String, dynamic>{};
  1120. final _data = <String, dynamic>{};
  1121. final _result = await _dio.fetch<Map<String, dynamic>>(
  1122. _setStreamType<RespList<Post>>(
  1123. Options(method: 'GET', headers: _headers, extra: _extra)
  1124. .compose(_dio.options, '/forum/userTopSubjects',
  1125. queryParameters: queryParameters, data: _data)
  1126. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1127. final value = RespList<Post>.fromJson(_result.data!);
  1128. return value;
  1129. }
  1130. @override
  1131. Future<RespData<String>> userFollow({uid, groupId, groupName}) async {
  1132. const _extra = <String, dynamic>{};
  1133. final queryParameters = <String, dynamic>{
  1134. r'uid': uid,
  1135. r'groupId': groupId,
  1136. r'groupName': groupName
  1137. };
  1138. queryParameters.removeWhere((k, v) => v == null);
  1139. final _headers = <String, dynamic>{};
  1140. final _data = <String, dynamic>{};
  1141. final _result = await _dio.fetch<Map<String, dynamic>>(
  1142. _setStreamType<RespData<String>>(
  1143. Options(method: 'POST', headers: _headers, extra: _extra)
  1144. .compose(_dio.options, '/forum/follow',
  1145. queryParameters: queryParameters, data: _data)
  1146. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1147. final value = RespData<String>.fromJson(_result.data!);
  1148. return value;
  1149. }
  1150. @override
  1151. Future<RespData<String>> userUnFollow({uid}) async {
  1152. const _extra = <String, dynamic>{};
  1153. final queryParameters = <String, dynamic>{r'uid': uid};
  1154. queryParameters.removeWhere((k, v) => v == null);
  1155. final _headers = <String, dynamic>{};
  1156. final _data = <String, dynamic>{};
  1157. final _result = await _dio.fetch<Map<String, dynamic>>(
  1158. _setStreamType<RespData<String>>(
  1159. Options(method: 'POST', headers: _headers, extra: _extra)
  1160. .compose(_dio.options, '/forum/unfollow',
  1161. queryParameters: queryParameters, data: _data)
  1162. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1163. final value = RespData<String>.fromJson(_result.data!);
  1164. return value;
  1165. }
  1166. @override
  1167. Future<RespData<bool>> userIgnoreFollow({uid}) async {
  1168. const _extra = <String, dynamic>{};
  1169. final queryParameters = <String, dynamic>{r'uid': uid};
  1170. queryParameters.removeWhere((k, v) => v == null);
  1171. final _headers = <String, dynamic>{};
  1172. final _data = <String, dynamic>{};
  1173. final _result = await _dio.fetch<Map<String, dynamic>>(
  1174. _setStreamType<RespData<bool>>(
  1175. Options(method: 'POST', headers: _headers, extra: _extra)
  1176. .compose(_dio.options, '/forum/ignoreFollow',
  1177. queryParameters: queryParameters, data: _data)
  1178. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1179. final value = RespData<bool>.fromJson(_result.data!);
  1180. return value;
  1181. }
  1182. @override
  1183. Future<RespData<FriendRelation>> userRelation({uid}) async {
  1184. const _extra = <String, dynamic>{};
  1185. final queryParameters = <String, dynamic>{r'uid': uid};
  1186. queryParameters.removeWhere((k, v) => v == null);
  1187. final _headers = <String, dynamic>{};
  1188. final _data = <String, dynamic>{};
  1189. final _result = await _dio.fetch<Map<String, dynamic>>(
  1190. _setStreamType<RespData<FriendRelation>>(
  1191. Options(method: 'POST', headers: _headers, extra: _extra)
  1192. .compose(_dio.options, '/forum/UserRelation',
  1193. queryParameters: queryParameters, data: _data)
  1194. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1195. final value = RespData<FriendRelation>.fromJson(_result.data!);
  1196. return value;
  1197. }
  1198. @override
  1199. Future<RespData<FriendList>> userFollowList(
  1200. {groupId, kw, page, limit = 50}) async {
  1201. const _extra = <String, dynamic>{};
  1202. final queryParameters = <String, dynamic>{
  1203. r'groupId': groupId,
  1204. r'kw': kw,
  1205. r'p': page,
  1206. r'limit': limit
  1207. };
  1208. queryParameters.removeWhere((k, v) => v == null);
  1209. final _headers = <String, dynamic>{};
  1210. final _data = <String, dynamic>{};
  1211. final _result = await _dio.fetch<Map<String, dynamic>>(
  1212. _setStreamType<RespData<FriendList>>(
  1213. Options(method: 'GET', headers: _headers, extra: _extra)
  1214. .compose(_dio.options, '/forum/followList',
  1215. queryParameters: queryParameters, data: _data)
  1216. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1217. final value = RespData<FriendList>.fromJson(_result.data!);
  1218. return value;
  1219. }
  1220. @override
  1221. Future<RespData<FriendList>> userFansList(
  1222. {groupId, kw, page, limit = 50}) async {
  1223. const _extra = <String, dynamic>{};
  1224. final queryParameters = <String, dynamic>{
  1225. r'groupId': groupId,
  1226. r'kw': kw,
  1227. r'p': page,
  1228. r'limit': limit
  1229. };
  1230. queryParameters.removeWhere((k, v) => v == null);
  1231. final _headers = <String, dynamic>{};
  1232. final _data = <String, dynamic>{};
  1233. final _result = await _dio.fetch<Map<String, dynamic>>(
  1234. _setStreamType<RespData<FriendList>>(
  1235. Options(method: 'GET', headers: _headers, extra: _extra)
  1236. .compose(_dio.options, '/forum/fansList',
  1237. queryParameters: queryParameters, data: _data)
  1238. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1239. final value = RespData<FriendList>.fromJson(_result.data!);
  1240. return value;
  1241. }
  1242. @override
  1243. Future<RespList<UserFriend>> userFriends(
  1244. {groupId, kw, page, limit = 50, test}) async {
  1245. const _extra = <String, dynamic>{};
  1246. final queryParameters = <String, dynamic>{
  1247. r'groupId': groupId,
  1248. r'kw': kw,
  1249. r'p': page,
  1250. r'limit': limit,
  1251. r'test': test
  1252. };
  1253. queryParameters.removeWhere((k, v) => v == null);
  1254. final _headers = <String, dynamic>{};
  1255. final _data = <String, dynamic>{};
  1256. final _result = await _dio.fetch<Map<String, dynamic>>(
  1257. _setStreamType<RespList<UserFriend>>(
  1258. Options(method: 'GET', headers: _headers, extra: _extra)
  1259. .compose(_dio.options, '/forum/friends',
  1260. queryParameters: queryParameters, data: _data)
  1261. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1262. final value = RespList<UserFriend>.fromJson(_result.data!);
  1263. return value;
  1264. }
  1265. @override
  1266. Future<RespData<FriendList>> userFriendsTest(
  1267. {groupId, kw, page, limit = 50, test}) async {
  1268. const _extra = <String, dynamic>{};
  1269. final queryParameters = <String, dynamic>{
  1270. r'groupId': groupId,
  1271. r'kw': kw,
  1272. r'p': page,
  1273. r'limit': limit,
  1274. r'test': test
  1275. };
  1276. queryParameters.removeWhere((k, v) => v == null);
  1277. final _headers = <String, dynamic>{};
  1278. final _data = <String, dynamic>{};
  1279. final _result = await _dio.fetch<Map<String, dynamic>>(
  1280. _setStreamType<RespData<FriendList>>(
  1281. Options(method: 'GET', headers: _headers, extra: _extra)
  1282. .compose(_dio.options, '/forum/friends',
  1283. queryParameters: queryParameters, data: _data)
  1284. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1285. final value = RespData<FriendList>.fromJson(_result.data!);
  1286. return value;
  1287. }
  1288. @override
  1289. Future<RespPage<UserInfo>> userSearch({kw, page, limit = 20}) async {
  1290. const _extra = <String, dynamic>{};
  1291. final queryParameters = <String, dynamic>{
  1292. r'kw': kw,
  1293. r'p': page,
  1294. r'limit': limit
  1295. };
  1296. queryParameters.removeWhere((k, v) => v == null);
  1297. final _headers = <String, dynamic>{};
  1298. final _data = <String, dynamic>{};
  1299. final _result = await _dio.fetch<Map<String, dynamic>>(
  1300. _setStreamType<RespPage<UserInfo>>(
  1301. Options(method: 'GET', headers: _headers, extra: _extra)
  1302. .compose(_dio.options, '/user/search',
  1303. queryParameters: queryParameters, data: _data)
  1304. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1305. final value = RespPage<UserInfo>.fromJson(_result.data!);
  1306. return value;
  1307. }
  1308. @override
  1309. Future<RespData<dynamic>> getNewFriendCode({forever, forceUpdate}) async {
  1310. const _extra = <String, dynamic>{};
  1311. final queryParameters = <String, dynamic>{
  1312. r'forever': forever,
  1313. r'forceUpate': forceUpdate
  1314. };
  1315. queryParameters.removeWhere((k, v) => v == null);
  1316. final _headers = <String, dynamic>{};
  1317. final _data = <String, dynamic>{};
  1318. final _result = await _dio.fetch<Map<String, dynamic>>(
  1319. _setStreamType<RespData<dynamic>>(
  1320. Options(method: 'POST', headers: _headers, extra: _extra)
  1321. .compose(_dio.options, '/user/newFriendCode',
  1322. queryParameters: queryParameters, data: _data)
  1323. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1324. final value = RespData<dynamic>.fromJson(_result.data!);
  1325. return value;
  1326. }
  1327. @override
  1328. Future<RespData<NewFriend>> getNewFriend(code) async {
  1329. const _extra = <String, dynamic>{};
  1330. final queryParameters = <String, dynamic>{r'code': code};
  1331. final _headers = <String, dynamic>{};
  1332. final _data = <String, dynamic>{};
  1333. final _result = await _dio.fetch<Map<String, dynamic>>(
  1334. _setStreamType<RespData<NewFriend>>(
  1335. Options(method: 'POST', headers: _headers, extra: _extra)
  1336. .compose(_dio.options, '/user/newFriend',
  1337. queryParameters: queryParameters, data: _data)
  1338. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1339. final value = RespData<NewFriend>.fromJson(_result.data!);
  1340. return value;
  1341. }
  1342. @override
  1343. Future<RespData<MessageInstance>> shareForwardSubject(
  1344. subjectId, userId) async {
  1345. const _extra = <String, dynamic>{};
  1346. final queryParameters = <String, dynamic>{
  1347. r'subject_id': subjectId,
  1348. r'user_id': userId
  1349. };
  1350. final _headers = <String, dynamic>{};
  1351. final _data = <String, dynamic>{};
  1352. final _result = await _dio.fetch<Map<String, dynamic>>(
  1353. _setStreamType<RespData<MessageInstance>>(
  1354. Options(method: 'POST', headers: _headers, extra: _extra)
  1355. .compose(_dio.options, '/share/forwardSubject',
  1356. queryParameters: queryParameters, data: _data)
  1357. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1358. final value = RespData<MessageInstance>.fromJson(_result.data!);
  1359. return value;
  1360. }
  1361. @override
  1362. Future<RespData<Message>> getMessageForPoll({curId}) async {
  1363. const _extra = <String, dynamic>{};
  1364. final queryParameters = <String, dynamic>{r'cur_id': curId};
  1365. queryParameters.removeWhere((k, v) => v == null);
  1366. final _headers = <String, dynamic>{};
  1367. final _data = <String, dynamic>{};
  1368. final _result = await _dio.fetch<Map<String, dynamic>>(
  1369. _setStreamType<RespData<Message>>(
  1370. Options(method: 'POST', headers: _headers, extra: _extra)
  1371. .compose(_dio.options, '/message/receive',
  1372. queryParameters: queryParameters, data: _data)
  1373. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1374. final value = RespData<Message>.fromJson(_result.data!);
  1375. return value;
  1376. }
  1377. @override
  1378. Future<RespList<UserFriend>> getFriendRequest() async {
  1379. const _extra = <String, dynamic>{};
  1380. final queryParameters = <String, dynamic>{};
  1381. final _headers = <String, dynamic>{};
  1382. final _data = <String, dynamic>{};
  1383. final _result = await _dio.fetch<Map<String, dynamic>>(
  1384. _setStreamType<RespList<UserFriend>>(
  1385. Options(method: 'POST', headers: _headers, extra: _extra)
  1386. .compose(_dio.options, '/user/FetchFriendsRequest',
  1387. queryParameters: queryParameters, data: _data)
  1388. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1389. final value = RespList<UserFriend>.fromJson(_result.data!);
  1390. return value;
  1391. }
  1392. @override
  1393. Future<RespData<bool>> postRejectFriend(uid) async {
  1394. const _extra = <String, dynamic>{};
  1395. final queryParameters = <String, dynamic>{r'uid': uid};
  1396. final _headers = <String, dynamic>{};
  1397. final _data = <String, dynamic>{};
  1398. final _result = await _dio.fetch<Map<String, dynamic>>(
  1399. _setStreamType<RespData<bool>>(
  1400. Options(method: 'POST', headers: _headers, extra: _extra)
  1401. .compose(_dio.options, '/user/RejectFriend',
  1402. queryParameters: queryParameters, data: _data)
  1403. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1404. final value = RespData<bool>.fromJson(_result.data!);
  1405. return value;
  1406. }
  1407. @override
  1408. Future<RespData<dynamic>> postAcceptFriend(uid) async {
  1409. const _extra = <String, dynamic>{};
  1410. final queryParameters = <String, dynamic>{r'uid': uid};
  1411. final _headers = <String, dynamic>{};
  1412. final _data = <String, dynamic>{};
  1413. final _result = await _dio.fetch<Map<String, dynamic>>(
  1414. _setStreamType<RespData<dynamic>>(
  1415. Options(method: 'POST', headers: _headers, extra: _extra)
  1416. .compose(_dio.options, '/user/AcceptFriend',
  1417. queryParameters: queryParameters, data: _data)
  1418. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1419. final value = RespData<dynamic>.fromJson(_result.data!);
  1420. return value;
  1421. }
  1422. @override
  1423. Future<RespData<bool>> postIsFriend(uid) async {
  1424. const _extra = <String, dynamic>{};
  1425. final queryParameters = <String, dynamic>{r'uid': uid};
  1426. final _headers = <String, dynamic>{};
  1427. final _data = <String, dynamic>{};
  1428. final _result = await _dio.fetch<Map<String, dynamic>>(
  1429. _setStreamType<RespData<bool>>(
  1430. Options(method: 'POST', headers: _headers, extra: _extra)
  1431. .compose(_dio.options, '/user/isFriend',
  1432. queryParameters: queryParameters, data: _data)
  1433. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1434. final value = RespData<bool>.fromJson(_result.data!);
  1435. return value;
  1436. }
  1437. @override
  1438. Future<RespList<ChatMessageInstance>> getChatIndex() async {
  1439. const _extra = <String, dynamic>{};
  1440. final queryParameters = <String, dynamic>{};
  1441. final _headers = <String, dynamic>{};
  1442. final _data = <String, dynamic>{};
  1443. final _result = await _dio.fetch<Map<String, dynamic>>(
  1444. _setStreamType<RespList<ChatMessageInstance>>(
  1445. Options(method: 'POST', headers: _headers, extra: _extra)
  1446. .compose(_dio.options, '/chat/index',
  1447. queryParameters: queryParameters, data: _data)
  1448. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1449. final value = RespList<ChatMessageInstance>.fromJson(_result.data!);
  1450. return value;
  1451. }
  1452. @override
  1453. Future<RespData<ChatMessage>> getChatUser(userId, {beginId}) async {
  1454. const _extra = <String, dynamic>{};
  1455. final queryParameters = <String, dynamic>{
  1456. r'user_id': userId,
  1457. r'begin_id': beginId
  1458. };
  1459. queryParameters.removeWhere((k, v) => v == null);
  1460. final _headers = <String, dynamic>{};
  1461. final _data = <String, dynamic>{};
  1462. final _result = await _dio.fetch<Map<String, dynamic>>(
  1463. _setStreamType<RespData<ChatMessage>>(
  1464. Options(method: 'POST', headers: _headers, extra: _extra)
  1465. .compose(_dio.options, '/chat/user',
  1466. queryParameters: queryParameters, data: _data)
  1467. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1468. final value = RespData<ChatMessage>.fromJson(_result.data!);
  1469. return value;
  1470. }
  1471. @override
  1472. Future<RespData<MessageInstance>> postChatSend(userId, type, data) async {
  1473. const _extra = <String, dynamic>{};
  1474. final queryParameters = <String, dynamic>{
  1475. r'user_id': userId,
  1476. r'type': type,
  1477. r'data': data
  1478. };
  1479. final _headers = <String, dynamic>{};
  1480. final _data = <String, dynamic>{};
  1481. final _result = await _dio.fetch<Map<String, dynamic>>(
  1482. _setStreamType<RespData<MessageInstance>>(
  1483. Options(method: 'POST', headers: _headers, extra: _extra)
  1484. .compose(_dio.options, '/chat/send',
  1485. queryParameters: queryParameters, data: _data)
  1486. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1487. final value = RespData<MessageInstance>.fromJson(_result.data!);
  1488. return value;
  1489. }
  1490. @override
  1491. Future<RespData<dynamic>> postChatUpload(file) async {
  1492. const _extra = <String, dynamic>{};
  1493. final queryParameters = <String, dynamic>{};
  1494. final _headers = <String, dynamic>{r'content-type': 'multipart/form-data'};
  1495. _headers.removeWhere((k, v) => v == null);
  1496. final _data = FormData();
  1497. _data.files.add(MapEntry(
  1498. 'file',
  1499. MultipartFile.fromFileSync(file.path,
  1500. filename: file.path.split(Platform.pathSeparator).last)));
  1501. final _result = await _dio.fetch<Map<String, dynamic>>(
  1502. _setStreamType<RespData<dynamic>>(Options(
  1503. method: 'POST',
  1504. headers: _headers,
  1505. extra: _extra,
  1506. contentType: 'multipart/form-data')
  1507. .compose(_dio.options, '/chat/upload',
  1508. queryParameters: queryParameters, data: _data)
  1509. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1510. final value = RespData<dynamic>.fromJson(_result.data!);
  1511. return value;
  1512. }
  1513. @override
  1514. Future<RespList<ChatOnlineInfo>> getChatUserInfo(userIds) async {
  1515. const _extra = <String, dynamic>{};
  1516. final queryParameters = <String, dynamic>{};
  1517. final _headers = <String, dynamic>{};
  1518. final _data = {'user_ids': userIds};
  1519. final _result = await _dio.fetch<Map<String, dynamic>>(
  1520. _setStreamType<RespList<ChatOnlineInfo>>(Options(
  1521. method: 'POST',
  1522. headers: _headers,
  1523. extra: _extra,
  1524. contentType: 'application/x-www-form-urlencoded')
  1525. .compose(_dio.options, '/chat/info',
  1526. queryParameters: queryParameters, data: _data)
  1527. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1528. final value = RespList<ChatOnlineInfo>.fromJson(_result.data!);
  1529. return value;
  1530. }
  1531. @override
  1532. Future<RespData<ShareInfo>> getshareCreateSport(period, weight) async {
  1533. const _extra = <String, dynamic>{};
  1534. final queryParameters = <String, dynamic>{
  1535. r'period': period,
  1536. r'weight': weight
  1537. };
  1538. final _headers = <String, dynamic>{};
  1539. final _data = <String, dynamic>{};
  1540. final _result = await _dio.fetch<Map<String, dynamic>>(
  1541. _setStreamType<RespData<ShareInfo>>(
  1542. Options(method: 'POST', headers: _headers, extra: _extra)
  1543. .compose(_dio.options, '/share/createSport',
  1544. queryParameters: queryParameters, data: _data)
  1545. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1546. final value = RespData<ShareInfo>.fromJson(_result.data!);
  1547. return value;
  1548. }
  1549. @override
  1550. Future<RespData<MessageInstance>> getshareForwardSport(hash, userId) async {
  1551. const _extra = <String, dynamic>{};
  1552. final queryParameters = <String, dynamic>{r'h': hash, r'user_id': userId};
  1553. final _headers = <String, dynamic>{};
  1554. final _data = <String, dynamic>{};
  1555. final _result = await _dio.fetch<Map<String, dynamic>>(
  1556. _setStreamType<RespData<MessageInstance>>(
  1557. Options(method: 'POST', headers: _headers, extra: _extra)
  1558. .compose(_dio.options, '/share/forwardSport',
  1559. queryParameters: queryParameters, data: _data)
  1560. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1561. final value = RespData<MessageInstance>.fromJson(_result.data!);
  1562. return value;
  1563. }
  1564. @override
  1565. Future<RespPage<Notice>> getInformList({page}) async {
  1566. const _extra = <String, dynamic>{};
  1567. final queryParameters = <String, dynamic>{r'p': page};
  1568. queryParameters.removeWhere((k, v) => v == null);
  1569. final _headers = <String, dynamic>{};
  1570. final _data = <String, dynamic>{};
  1571. final _result = await _dio.fetch<Map<String, dynamic>>(
  1572. _setStreamType<RespPage<Notice>>(
  1573. Options(method: 'GET', headers: _headers, extra: _extra)
  1574. .compose(_dio.options, '/inform/list',
  1575. queryParameters: queryParameters, data: _data)
  1576. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1577. final value = RespPage<Notice>.fromJson(_result.data!);
  1578. return value;
  1579. }
  1580. @override
  1581. Future<RespData<dynamic>> postInformRead(informId) async {
  1582. const _extra = <String, dynamic>{};
  1583. final queryParameters = <String, dynamic>{r'informId': informId};
  1584. final _headers = <String, dynamic>{};
  1585. final _data = <String, dynamic>{};
  1586. final _result = await _dio.fetch<Map<String, dynamic>>(
  1587. _setStreamType<RespData<dynamic>>(
  1588. Options(method: 'POST', headers: _headers, extra: _extra)
  1589. .compose(_dio.options, '/inform/read',
  1590. queryParameters: queryParameters, data: _data)
  1591. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1592. final value = RespData<dynamic>.fromJson(_result.data!);
  1593. return value;
  1594. }
  1595. @override
  1596. Future<RespPage<Notice>> getNoticeList(
  1597. {type, markread = "currpage", page, read, isMsg = "1"}) async {
  1598. const _extra = <String, dynamic>{};
  1599. final queryParameters = <String, dynamic>{
  1600. r'type': type,
  1601. r'markread': markread,
  1602. r'p': page,
  1603. r'read': read,
  1604. r'isMsg': isMsg
  1605. };
  1606. queryParameters.removeWhere((k, v) => v == null);
  1607. final _headers = <String, dynamic>{};
  1608. final _data = <String, dynamic>{};
  1609. final _result = await _dio.fetch<Map<String, dynamic>>(
  1610. _setStreamType<RespPage<Notice>>(
  1611. Options(method: 'GET', headers: _headers, extra: _extra)
  1612. .compose(_dio.options, '/notice/list',
  1613. queryParameters: queryParameters, data: _data)
  1614. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1615. final value = RespPage<Notice>.fromJson(_result.data!);
  1616. return value;
  1617. }
  1618. @override
  1619. Future<RespData<int>> getNoticeCount(type, read, {isMsg = "1"}) async {
  1620. const _extra = <String, dynamic>{};
  1621. final queryParameters = <String, dynamic>{
  1622. r'type': type,
  1623. r'read': read,
  1624. r'isMsg': isMsg
  1625. };
  1626. final _headers = <String, dynamic>{};
  1627. final _data = <String, dynamic>{};
  1628. final _result = await _dio.fetch<Map<String, dynamic>>(
  1629. _setStreamType<RespData<int>>(
  1630. Options(method: 'GET', headers: _headers, extra: _extra)
  1631. .compose(_dio.options, '/notice/count',
  1632. queryParameters: queryParameters, data: _data)
  1633. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1634. final value = RespData<int>.fromJson(_result.data!);
  1635. return value;
  1636. }
  1637. @override
  1638. Future<RespData<Notice>> postNoticeRead(noticeId) async {
  1639. const _extra = <String, dynamic>{};
  1640. final queryParameters = <String, dynamic>{r'noticeId': noticeId};
  1641. final _headers = <String, dynamic>{};
  1642. final _data = <String, dynamic>{};
  1643. final _result = await _dio.fetch<Map<String, dynamic>>(
  1644. _setStreamType<RespData<Notice>>(
  1645. Options(method: 'POST', headers: _headers, extra: _extra)
  1646. .compose(_dio.options, '/notice/read',
  1647. queryParameters: queryParameters, data: _data)
  1648. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1649. final value = RespData<Notice>.fromJson(_result.data!);
  1650. return value;
  1651. }
  1652. @override
  1653. Future<RespList<FeedbackCategory>> getFeedbackTypes() async {
  1654. const _extra = <String, dynamic>{};
  1655. final queryParameters = <String, dynamic>{};
  1656. final _headers = <String, dynamic>{};
  1657. final _data = <String, dynamic>{};
  1658. final _result = await _dio.fetch<Map<String, dynamic>>(
  1659. _setStreamType<RespList<FeedbackCategory>>(
  1660. Options(method: 'GET', headers: _headers, extra: _extra)
  1661. .compose(_dio.options, '/feedback/types',
  1662. queryParameters: queryParameters, data: _data)
  1663. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1664. final value = RespList<FeedbackCategory>.fromJson(_result.data!);
  1665. return value;
  1666. }
  1667. @override
  1668. Future<RespList<FeedbackCategory>> getFeedbackChat({groupId, typeId}) async {
  1669. const _extra = <String, dynamic>{};
  1670. final queryParameters = <String, dynamic>{
  1671. r'groupId': groupId,
  1672. r'typeId': typeId
  1673. };
  1674. queryParameters.removeWhere((k, v) => v == null);
  1675. final _headers = <String, dynamic>{};
  1676. final _data = <String, dynamic>{};
  1677. final _result = await _dio.fetch<Map<String, dynamic>>(
  1678. _setStreamType<RespList<FeedbackCategory>>(
  1679. Options(method: 'GET', headers: _headers, extra: _extra)
  1680. .compose(_dio.options, '/feedback/myChats',
  1681. queryParameters: queryParameters, data: _data)
  1682. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1683. final value = RespList<FeedbackCategory>.fromJson(_result.data!);
  1684. return value;
  1685. }
  1686. @override
  1687. Future<RespData<String>> postFeedback(typeId, content,
  1688. {images, extra}) async {
  1689. const _extra = <String, dynamic>{};
  1690. final queryParameters = <String, dynamic>{
  1691. r'typeId': typeId,
  1692. r'content': content,
  1693. r'images': images,
  1694. r'extra': extra
  1695. };
  1696. queryParameters.removeWhere((k, v) => v == null);
  1697. final _headers = <String, dynamic>{};
  1698. final _data = <String, dynamic>{};
  1699. final _result = await _dio.fetch<Map<String, dynamic>>(
  1700. _setStreamType<RespData<String>>(
  1701. Options(method: 'POST', headers: _headers, extra: _extra)
  1702. .compose(_dio.options, '/feedback/post',
  1703. queryParameters: queryParameters, data: _data)
  1704. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1705. final value = RespData<String>.fromJson(_result.data!);
  1706. return value;
  1707. }
  1708. @override
  1709. Future<RespData<String>> mediaUp4Feedback(file) async {
  1710. const _extra = <String, dynamic>{};
  1711. final queryParameters = <String, dynamic>{};
  1712. final _headers = <String, dynamic>{r'content-type': 'multipart/form-data'};
  1713. _headers.removeWhere((k, v) => v == null);
  1714. final _data = FormData();
  1715. _data.files.add(MapEntry(
  1716. 'media',
  1717. MultipartFile.fromFileSync(file.path,
  1718. filename: file.path.split(Platform.pathSeparator).last)));
  1719. final _result = await _dio.fetch<Map<String, dynamic>>(
  1720. _setStreamType<RespData<String>>(Options(
  1721. method: 'POST',
  1722. headers: _headers,
  1723. extra: _extra,
  1724. contentType: 'multipart/form-data')
  1725. .compose(_dio.options, '/media/Up4Feedback',
  1726. queryParameters: queryParameters, data: _data)
  1727. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1728. final value = RespData<String>.fromJson(_result.data!);
  1729. return value;
  1730. }
  1731. @override
  1732. Future<RespData<Image>> mediaUp4Subject(file,
  1733. {srcType, subjectId, cancelToken}) async {
  1734. const _extra = <String, dynamic>{};
  1735. final queryParameters = <String, dynamic>{
  1736. r'srcType': srcType,
  1737. r'subjectId': subjectId
  1738. };
  1739. queryParameters.removeWhere((k, v) => v == null);
  1740. final _headers = <String, dynamic>{r'content-type': 'multipart/form-data'};
  1741. _headers.removeWhere((k, v) => v == null);
  1742. final _data = FormData();
  1743. _data.files.add(MapEntry(
  1744. 'media',
  1745. MultipartFile.fromFileSync(file.path,
  1746. filename: file.path.split(Platform.pathSeparator).last)));
  1747. final _result = await _dio.fetch<Map<String, dynamic>>(
  1748. _setStreamType<RespData<Image>>(Options(
  1749. method: 'POST',
  1750. headers: _headers,
  1751. extra: _extra,
  1752. contentType: 'multipart/form-data')
  1753. .compose(_dio.options, '/media/Up4Subject',
  1754. queryParameters: queryParameters, data: _data)
  1755. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1756. final value = RespData<Image>.fromJson(_result.data!);
  1757. return value;
  1758. }
  1759. @override
  1760. Future<RespList<GameInfoData>> getGameAll() async {
  1761. const _extra = <String, dynamic>{};
  1762. final queryParameters = <String, dynamic>{};
  1763. final _headers = <String, dynamic>{};
  1764. final _data = <String, dynamic>{};
  1765. final _result = await _dio.fetch<Map<String, dynamic>>(
  1766. _setStreamType<RespList<GameInfoData>>(
  1767. Options(method: 'GET', headers: _headers, extra: _extra)
  1768. .compose(_dio.options, '/game/all',
  1769. queryParameters: queryParameters, data: _data)
  1770. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1771. final value = RespList<GameInfoData>.fromJson(_result.data!);
  1772. return value;
  1773. }
  1774. @override
  1775. Future<dynamic> getGameById(id) async {
  1776. const _extra = <String, dynamic>{};
  1777. final queryParameters = <String, dynamic>{r'id': id};
  1778. final _headers = <String, dynamic>{};
  1779. final _data = <String, dynamic>{};
  1780. final _result = await _dio.fetch(_setStreamType<dynamic>(
  1781. Options(method: 'GET', headers: _headers, extra: _extra)
  1782. .compose(_dio.options, '/game/all',
  1783. queryParameters: queryParameters, data: _data)
  1784. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1785. final value = _result.data;
  1786. return value;
  1787. }
  1788. @override
  1789. Future<RespList<RankInfoData>> getRankInfoAll() async {
  1790. const _extra = <String, dynamic>{};
  1791. final queryParameters = <String, dynamic>{};
  1792. final _headers = <String, dynamic>{};
  1793. final _data = <String, dynamic>{};
  1794. final _result = await _dio.fetch<Map<String, dynamic>>(
  1795. _setStreamType<RespList<RankInfoData>>(
  1796. Options(method: 'GET', headers: _headers, extra: _extra)
  1797. .compose(_dio.options, '/rank/all',
  1798. queryParameters: queryParameters, data: _data)
  1799. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1800. final value = RespList<RankInfoData>.fromJson(_result.data!);
  1801. return value;
  1802. }
  1803. @override
  1804. Future<RespData<RankGameInfoData>> getRankGameInfo(id, {scope}) async {
  1805. const _extra = <String, dynamic>{};
  1806. final queryParameters = <String, dynamic>{r'game_id': id, r'scope': scope};
  1807. queryParameters.removeWhere((k, v) => v == null);
  1808. final _headers = <String, dynamic>{};
  1809. final _data = <String, dynamic>{};
  1810. final _result = await _dio.fetch<Map<String, dynamic>>(
  1811. _setStreamType<RespData<RankGameInfoData>>(
  1812. Options(method: 'GET', headers: _headers, extra: _extra)
  1813. .compose(_dio.options, '/rank/game',
  1814. queryParameters: queryParameters, data: _data)
  1815. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1816. final value = RespData<RankGameInfoData>.fromJson(_result.data!);
  1817. return value;
  1818. }
  1819. @override
  1820. Future<RespData<RankGameInfoData>> getRankSportInfo(id, {scope}) async {
  1821. const _extra = <String, dynamic>{};
  1822. final queryParameters = <String, dynamic>{r'rank_id': id, r'scope': scope};
  1823. queryParameters.removeWhere((k, v) => v == null);
  1824. final _headers = <String, dynamic>{};
  1825. final _data = <String, dynamic>{};
  1826. final _result = await _dio.fetch<Map<String, dynamic>>(
  1827. _setStreamType<RespData<RankGameInfoData>>(
  1828. Options(method: 'GET', headers: _headers, extra: _extra)
  1829. .compose(_dio.options, '/rank/sport',
  1830. queryParameters: queryParameters, data: _data)
  1831. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1832. final value = RespData<RankGameInfoData>.fromJson(_result.data!);
  1833. return value;
  1834. }
  1835. @override
  1836. Future<RespData<ShopIndex>> getShopIndex() async {
  1837. const _extra = <String, dynamic>{};
  1838. final queryParameters = <String, dynamic>{};
  1839. final _headers = <String, dynamic>{};
  1840. final _data = <String, dynamic>{};
  1841. final _result = await _dio.fetch<Map<String, dynamic>>(
  1842. _setStreamType<RespData<ShopIndex>>(
  1843. Options(method: 'GET', headers: _headers, extra: _extra)
  1844. .compose(_dio.options, '/shop/item',
  1845. queryParameters: queryParameters, data: _data)
  1846. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1847. final value = RespData<ShopIndex>.fromJson(_result.data!);
  1848. return value;
  1849. }
  1850. @override
  1851. Future<RespData<ScoreList>> getScoreIndex() async {
  1852. const _extra = <String, dynamic>{};
  1853. final queryParameters = <String, dynamic>{};
  1854. final _headers = <String, dynamic>{};
  1855. final _data = <String, dynamic>{};
  1856. final _result = await _dio.fetch<Map<String, dynamic>>(
  1857. _setStreamType<RespData<ScoreList>>(
  1858. Options(method: 'GET', headers: _headers, extra: _extra)
  1859. .compose(_dio.options, '/score/record',
  1860. queryParameters: queryParameters, data: _data)
  1861. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1862. final value = RespData<ScoreList>.fromJson(_result.data!);
  1863. return value;
  1864. }
  1865. @override
  1866. Future<RespData<Map<String, dynamic>>> buyItem(id) async {
  1867. const _extra = <String, dynamic>{};
  1868. final queryParameters = <String, dynamic>{r'item_id': id};
  1869. final _headers = <String, dynamic>{};
  1870. final _data = <String, dynamic>{};
  1871. final _result = await _dio.fetch<Map<String, dynamic>>(
  1872. _setStreamType<RespData<Map<String, dynamic>>>(
  1873. Options(method: 'POST', headers: _headers, extra: _extra)
  1874. .compose(_dio.options, '/shop/buy',
  1875. queryParameters: queryParameters, data: _data)
  1876. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1877. final value = RespData<Map<String, dynamic>>.fromJson(_result.data!);
  1878. return value;
  1879. }
  1880. @override
  1881. Future<RespData<Map<String, dynamic>>> jogAddRecord(
  1882. begin,
  1883. end,
  1884. distance,
  1885. step,
  1886. consume,
  1887. track,
  1888. stepInfo,
  1889. altitudeInfo,
  1890. kmDurationInfo,
  1891. thumb,
  1892. media) async {
  1893. const _extra = <String, dynamic>{};
  1894. final queryParameters = <String, dynamic>{};
  1895. final _headers = <String, dynamic>{r'content-type': 'multipart/form-data'};
  1896. _headers.removeWhere((k, v) => v == null);
  1897. final _data = FormData();
  1898. _data.fields.add(MapEntry('begin', begin.toString()));
  1899. _data.fields.add(MapEntry('end', end.toString()));
  1900. _data.fields.add(MapEntry('distance', distance.toString()));
  1901. _data.fields.add(MapEntry('step', step.toString()));
  1902. _data.fields.add(MapEntry('consume', consume.toString()));
  1903. _data.fields.add(MapEntry('track', track));
  1904. _data.fields.add(MapEntry('step_info', stepInfo));
  1905. _data.fields.add(MapEntry('altitude_info', altitudeInfo));
  1906. _data.fields.add(MapEntry('km_duration_info', kmDurationInfo));
  1907. _data.fields.add(MapEntry('track_thumb', thumb));
  1908. _data.files.add(MapEntry(
  1909. 'media',
  1910. MultipartFile.fromFileSync(media.path,
  1911. filename: media.path.split(Platform.pathSeparator).last)));
  1912. final _result = await _dio.fetch<Map<String, dynamic>>(
  1913. _setStreamType<RespData<Map<String, dynamic>>>(Options(
  1914. method: 'POST',
  1915. headers: _headers,
  1916. extra: _extra,
  1917. contentType: 'multipart/form-data')
  1918. .compose(_dio.options, '/jog/addRecord',
  1919. queryParameters: queryParameters, data: _data)
  1920. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1921. final value = RespData<Map<String, dynamic>>.fromJson(_result.data!);
  1922. return value;
  1923. }
  1924. @override
  1925. Future<RespData<String>> jogDelRecord(id) async {
  1926. const _extra = <String, dynamic>{};
  1927. final queryParameters = <String, dynamic>{r'id': id};
  1928. final _headers = <String, dynamic>{};
  1929. final _data = <String, dynamic>{};
  1930. final _result = await _dio.fetch<Map<String, dynamic>>(
  1931. _setStreamType<RespData<String>>(
  1932. Options(method: 'POST', headers: _headers, extra: _extra)
  1933. .compose(_dio.options, '/jog/delRecord',
  1934. queryParameters: queryParameters, data: _data)
  1935. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1936. final value = RespData<String>.fromJson(_result.data!);
  1937. return value;
  1938. }
  1939. @override
  1940. Future<RespData<String>> jogCopyRecord(id) async {
  1941. const _extra = <String, dynamic>{};
  1942. final queryParameters = <String, dynamic>{r'id': id};
  1943. final _headers = <String, dynamic>{};
  1944. final _data = <String, dynamic>{};
  1945. final _result = await _dio.fetch<Map<String, dynamic>>(
  1946. _setStreamType<RespData<String>>(
  1947. Options(method: 'POST', headers: _headers, extra: _extra)
  1948. .compose(_dio.options, '/jog/copyRecord',
  1949. queryParameters: queryParameters, data: _data)
  1950. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1951. final value = RespData<String>.fromJson(_result.data!);
  1952. return value;
  1953. }
  1954. @override
  1955. Future<RespData<JogDetail>> jogShowRecord(id) async {
  1956. const _extra = <String, dynamic>{};
  1957. final queryParameters = <String, dynamic>{r'id': id};
  1958. final _headers = <String, dynamic>{};
  1959. final _data = <String, dynamic>{};
  1960. final _result = await _dio.fetch<Map<String, dynamic>>(
  1961. _setStreamType<RespData<JogDetail>>(
  1962. Options(method: 'GET', headers: _headers, extra: _extra)
  1963. .compose(_dio.options, '/jog/show',
  1964. queryParameters: queryParameters, data: _data)
  1965. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1966. final value = RespData<JogDetail>.fromJson(_result.data!);
  1967. return value;
  1968. }
  1969. @override
  1970. Future<RespData<JogSum>> jogListOneYear(year) async {
  1971. const _extra = <String, dynamic>{};
  1972. final queryParameters = <String, dynamic>{r'year': year};
  1973. final _headers = <String, dynamic>{};
  1974. final _data = <String, dynamic>{};
  1975. final _result = await _dio.fetch<Map<String, dynamic>>(
  1976. _setStreamType<RespData<JogSum>>(
  1977. Options(method: 'GET', headers: _headers, extra: _extra)
  1978. .compose(_dio.options, '/jog/listOneYear',
  1979. queryParameters: queryParameters, data: _data)
  1980. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1981. final value = RespData<JogSum>.fromJson(_result.data!);
  1982. return value;
  1983. }
  1984. @override
  1985. Future<RespData<JogRecord>> jogListByDay(begin, end) async {
  1986. const _extra = <String, dynamic>{};
  1987. final queryParameters = <String, dynamic>{r'begin': begin, r'end': end};
  1988. final _headers = <String, dynamic>{};
  1989. final _data = <String, dynamic>{};
  1990. final _result = await _dio.fetch<Map<String, dynamic>>(
  1991. _setStreamType<RespData<JogRecord>>(
  1992. Options(method: 'GET', headers: _headers, extra: _extra)
  1993. .compose(_dio.options, '/jog/listByDay',
  1994. queryParameters: queryParameters, data: _data)
  1995. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  1996. final value = RespData<JogRecord>.fromJson(_result.data!);
  1997. return value;
  1998. }
  1999. @override
  2000. Future<RespData<JogRecord>> jogListByMonth(year) async {
  2001. const _extra = <String, dynamic>{};
  2002. final queryParameters = <String, dynamic>{r'year': year};
  2003. final _headers = <String, dynamic>{};
  2004. final _data = <String, dynamic>{};
  2005. final _result = await _dio.fetch<Map<String, dynamic>>(
  2006. _setStreamType<RespData<JogRecord>>(
  2007. Options(method: 'GET', headers: _headers, extra: _extra)
  2008. .compose(_dio.options, '/jog/listByMonth',
  2009. queryParameters: queryParameters, data: _data)
  2010. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  2011. final value = RespData<JogRecord>.fromJson(_result.data!);
  2012. return value;
  2013. }
  2014. @override
  2015. Future<RespData<JogRecord>> jogListByYear() async {
  2016. const _extra = <String, dynamic>{};
  2017. final queryParameters = <String, dynamic>{};
  2018. final _headers = <String, dynamic>{};
  2019. final _data = <String, dynamic>{};
  2020. final _result = await _dio.fetch<Map<String, dynamic>>(
  2021. _setStreamType<RespData<JogRecord>>(
  2022. Options(method: 'GET', headers: _headers, extra: _extra)
  2023. .compose(_dio.options, '/jog/listByYear',
  2024. queryParameters: queryParameters, data: _data)
  2025. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  2026. final value = RespData<JogRecord>.fromJson(_result.data!);
  2027. return value;
  2028. }
  2029. @override
  2030. Future<RespData<Map<String, dynamic>>> jogSetting({setting}) async {
  2031. const _extra = <String, dynamic>{};
  2032. final queryParameters = <String, dynamic>{};
  2033. queryParameters.removeWhere((k, v) => v == null);
  2034. final _headers = <String, dynamic>{};
  2035. final _data = {'setting': setting};
  2036. _data.removeWhere((k, v) => v == null);
  2037. final _result = await _dio.fetch<Map<String, dynamic>>(
  2038. _setStreamType<RespData<Map<String, dynamic>>>(Options(
  2039. method: 'POST',
  2040. headers: _headers,
  2041. extra: _extra,
  2042. contentType: 'application/x-www-form-urlencoded')
  2043. .compose(_dio.options, '/jog/setting',
  2044. queryParameters: queryParameters, data: _data)
  2045. .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
  2046. final value = RespData<Map<String, dynamic>>.fromJson(_result.data!);
  2047. return value;
  2048. }
  2049. RequestOptions newRequestOptions(Object? options) {
  2050. if (options is RequestOptions) {
  2051. return options as RequestOptions;
  2052. }
  2053. if (options is Options) {
  2054. return RequestOptions(
  2055. method: options.method,
  2056. sendTimeout: options.sendTimeout,
  2057. receiveTimeout: options.receiveTimeout,
  2058. extra: options.extra,
  2059. headers: options.headers,
  2060. responseType: options.responseType,
  2061. contentType: options.contentType.toString(),
  2062. validateStatus: options.validateStatus,
  2063. receiveDataWhenStatusError: options.receiveDataWhenStatusError,
  2064. followRedirects: options.followRedirects,
  2065. maxRedirects: options.maxRedirects,
  2066. requestEncoder: options.requestEncoder,
  2067. responseDecoder: options.responseDecoder,
  2068. path: '',
  2069. );
  2070. }
  2071. return RequestOptions(path: '');
  2072. }
  2073. RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
  2074. if (T != dynamic &&
  2075. !(requestOptions.responseType == ResponseType.bytes ||
  2076. requestOptions.responseType == ResponseType.stream)) {
  2077. if (T == String) {
  2078. requestOptions.responseType = ResponseType.plain;
  2079. } else {
  2080. requestOptions.responseType = ResponseType.json;
  2081. }
  2082. }
  2083. return requestOptions;
  2084. }
  2085. }