rest_client.g.dart 66 KB

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