api_calls.dart 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465
  1. import 'dart:convert';
  2. import 'dart:typed_data';
  3. import '../schema/structs/index.dart';
  4. import 'package:flutter/foundation.dart';
  5. import '/flutter_flow/flutter_flow_util.dart';
  6. import 'api_manager.dart';
  7. export 'api_manager.dart' show ApiCallResponse;
  8. const _kPrivateApiFunctionName = 'ffPrivateApiCall';
  9. class LoginCall {
  10. static Future<ApiCallResponse> call({
  11. String? username = '',
  12. String? password = '',
  13. }) async {
  14. final ffApiRequestBody = '''
  15. {
  16. "username": "${escapeStringForJson(username)}",
  17. "password": "${escapeStringForJson(password)}"
  18. }''';
  19. return ApiManager.instance.makeApiCall(
  20. callName: 'login',
  21. apiUrl: 'https://uitgaanskrant.com/en/flutterdrup/user/login.json',
  22. callType: ApiCallType.POST,
  23. headers: {
  24. 'Content-Type': 'application/json',
  25. },
  26. params: {},
  27. body: ffApiRequestBody,
  28. bodyType: BodyType.JSON,
  29. returnBody: true,
  30. encodeBodyUtf8: false,
  31. decodeUtf8: false,
  32. cache: false,
  33. isStreamingApi: false,
  34. alwaysAllowBody: false,
  35. );
  36. }
  37. static String? loginSessionid(dynamic response) =>
  38. castToType<String>(getJsonField(
  39. response,
  40. r'''$.sessid''',
  41. ));
  42. static String? loginSessionsname(dynamic response) =>
  43. castToType<String>(getJsonField(
  44. response,
  45. r'''$.session_name''',
  46. ));
  47. static String? loginToken(dynamic response) =>
  48. castToType<String>(getJsonField(
  49. response,
  50. r'''$.token''',
  51. ));
  52. static String? loginUseruid(dynamic response) =>
  53. castToType<String>(getJsonField(
  54. response,
  55. r'''$.user.uid''',
  56. ));
  57. static String? loginUsername(dynamic response) =>
  58. castToType<String>(getJsonField(
  59. response,
  60. r'''$.user.name''',
  61. ));
  62. static String? loginEmail(dynamic response) =>
  63. castToType<String>(getJsonField(
  64. response,
  65. r'''$.user.mail''',
  66. ));
  67. }
  68. class ZZUserEstablishmentsTESTCall {
  69. static Future<ApiCallResponse> call({
  70. String? sessionname = '',
  71. String? sessionid = '',
  72. String? token = '',
  73. }) async {
  74. return ApiManager.instance.makeApiCall(
  75. callName: 'ZZ userEstablishments TEST',
  76. apiUrl:
  77. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflow_user_establishment.json?display_id=services_1',
  78. callType: ApiCallType.GET,
  79. headers: {
  80. 'Content-Type': 'application/json',
  81. 'Cookie': '${sessionname}=${sessionid}',
  82. },
  83. params: {},
  84. returnBody: true,
  85. encodeBodyUtf8: false,
  86. decodeUtf8: false,
  87. cache: false,
  88. isStreamingApi: false,
  89. alwaysAllowBody: false,
  90. );
  91. }
  92. static String? sessionid(dynamic response) => castToType<String>(getJsonField(
  93. response,
  94. r'''$.sessid''',
  95. ));
  96. static String? sessionname(dynamic response) =>
  97. castToType<String>(getJsonField(
  98. response,
  99. r'''$.session_name''',
  100. ));
  101. static String? token(dynamic response) => castToType<String>(getJsonField(
  102. response,
  103. r'''$.token''',
  104. ));
  105. static String? drupaluserid(dynamic response) =>
  106. castToType<String>(getJsonField(
  107. response,
  108. r'''$.user.uid''',
  109. ));
  110. static List<String>? establishmentTitle(dynamic response) => (getJsonField(
  111. response,
  112. r'''$[:].node_title''',
  113. true,
  114. ) as List?)
  115. ?.withoutNulls
  116. .map((x) => castToType<String>(x))
  117. .withoutNulls
  118. .toList();
  119. static List<String>? establishmentLogo(dynamic response) => (getJsonField(
  120. response,
  121. r'''$[:].logohoreca''',
  122. true,
  123. ) as List?)
  124. ?.withoutNulls
  125. .map((x) => castToType<String>(x))
  126. .withoutNulls
  127. .toList();
  128. static List<String>? establishmentNid(dynamic response) => (getJsonField(
  129. response,
  130. r'''$[:].nid''',
  131. true,
  132. ) as List?)
  133. ?.withoutNulls
  134. .map((x) => castToType<String>(x))
  135. .withoutNulls
  136. .toList();
  137. }
  138. class GetcsrfCall {
  139. static Future<ApiCallResponse> call() async {
  140. return ApiManager.instance.makeApiCall(
  141. callName: 'getcsrf',
  142. apiUrl: 'https://uitgaanskrant.com/en/flutterdrup/user/token.json',
  143. callType: ApiCallType.POST,
  144. headers: {},
  145. params: {},
  146. bodyType: BodyType.JSON,
  147. returnBody: true,
  148. encodeBodyUtf8: false,
  149. decodeUtf8: false,
  150. cache: false,
  151. isStreamingApi: false,
  152. alwaysAllowBody: false,
  153. );
  154. }
  155. static String? getCsrfToken(dynamic response) =>
  156. castToType<String>(getJsonField(
  157. response,
  158. r'''$.token''',
  159. ));
  160. }
  161. class ZZZhomeSliderCall {
  162. static Future<ApiCallResponse> call({
  163. String? displayId = 'services_1',
  164. }) async {
  165. return ApiManager.instance.makeApiCall(
  166. callName: 'ZZZhomeSlider',
  167. apiUrl:
  168. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json',
  169. callType: ApiCallType.GET,
  170. headers: {
  171. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  172. },
  173. params: {
  174. 'display_id': displayId,
  175. },
  176. returnBody: true,
  177. encodeBodyUtf8: false,
  178. decodeUtf8: false,
  179. cache: false,
  180. isStreamingApi: false,
  181. alwaysAllowBody: false,
  182. );
  183. }
  184. static String? homesNid(dynamic response) => castToType<String>(getJsonField(
  185. response,
  186. r'''$[:].nid''',
  187. ));
  188. static String? homesAdres(dynamic response) =>
  189. castToType<String>(getJsonField(
  190. response,
  191. r'''$[:].adres''',
  192. ));
  193. static String? homesHoreca(dynamic response) =>
  194. castToType<String>(getJsonField(
  195. response,
  196. r'''$[:].horecagelegenheid''',
  197. ));
  198. static String? homesTown(dynamic response) => castToType<String>(getJsonField(
  199. response,
  200. r'''$[:].plaats''',
  201. ));
  202. static String? homesDatum(dynamic response) =>
  203. castToType<String>(getJsonField(
  204. response,
  205. r'''$[:].datum''',
  206. ));
  207. static List<String>? homesCategorie(dynamic response) => (getJsonField(
  208. response,
  209. r'''$[:].categorie''',
  210. true,
  211. ) as List?)
  212. ?.withoutNulls
  213. .map((x) => castToType<String>(x))
  214. .withoutNulls
  215. .toList();
  216. static String? homesTitel(dynamic response) =>
  217. castToType<String>(getJsonField(
  218. response,
  219. r'''$[:].titel''',
  220. ));
  221. static String? homesLogo(dynamic response) => castToType<String>(getJsonField(
  222. response,
  223. r'''$[:].logo''',
  224. ));
  225. static String? homesInhoud(dynamic response) =>
  226. castToType<String>(getJsonField(
  227. response,
  228. r'''$[:].inhoud''',
  229. ));
  230. static String? homesUrl(dynamic response) => castToType<String>(getJsonField(
  231. response,
  232. r'''$[:].url''',
  233. ));
  234. static String? homesHorecaID(dynamic response) =>
  235. castToType<String>(getJsonField(
  236. response,
  237. r'''$[:].horecagelegenheidid''',
  238. ));
  239. }
  240. class HomeSlidershortDateCall {
  241. static Future<ApiCallResponse> call() async {
  242. return ApiManager.instance.makeApiCall(
  243. callName: 'homeSlidershortDate',
  244. apiUrl:
  245. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_1',
  246. callType: ApiCallType.GET,
  247. headers: {
  248. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  249. },
  250. params: {},
  251. returnBody: true,
  252. encodeBodyUtf8: false,
  253. decodeUtf8: false,
  254. cache: false,
  255. isStreamingApi: false,
  256. alwaysAllowBody: false,
  257. );
  258. }
  259. static String? homesNid(dynamic response) => castToType<String>(getJsonField(
  260. response,
  261. r'''$[:].nid''',
  262. ));
  263. static String? homesAdres(dynamic response) =>
  264. castToType<String>(getJsonField(
  265. response,
  266. r'''$[:].adres''',
  267. ));
  268. static String? homesEstablishment(dynamic response) =>
  269. castToType<String>(getJsonField(
  270. response,
  271. r'''$[:].horecagelegenheid''',
  272. ));
  273. static String? homesTown(dynamic response) => castToType<String>(getJsonField(
  274. response,
  275. r'''$[:].plaats''',
  276. ));
  277. static String? homesDatum(dynamic response) =>
  278. castToType<String>(getJsonField(
  279. response,
  280. r'''$[:].datum''',
  281. ));
  282. static List<String>? homesCategorie(dynamic response) => (getJsonField(
  283. response,
  284. r'''$[:].categorie''',
  285. true,
  286. ) as List?)
  287. ?.withoutNulls
  288. .map((x) => castToType<String>(x))
  289. .withoutNulls
  290. .toList();
  291. static String? homesTitel(dynamic response) =>
  292. castToType<String>(getJsonField(
  293. response,
  294. r'''$[:].titel''',
  295. ));
  296. static String? homesLogo(dynamic response) => castToType<String>(getJsonField(
  297. response,
  298. r'''$[:].logo''',
  299. ));
  300. static String? homesInhoud(dynamic response) =>
  301. castToType<String>(getJsonField(
  302. response,
  303. r'''$[:].inhoud''',
  304. ));
  305. static String? homesUrl(dynamic response) => castToType<String>(getJsonField(
  306. response,
  307. r'''$[:].url''',
  308. ));
  309. }
  310. class HomeTabelCall {
  311. static Future<ApiCallResponse> call({
  312. int? page = 0,
  313. }) async {
  314. return ApiManager.instance.makeApiCall(
  315. callName: 'homeTabel',
  316. apiUrl:
  317. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_2',
  318. callType: ApiCallType.GET,
  319. headers: {
  320. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  321. },
  322. params: {
  323. 'page': page,
  324. },
  325. returnBody: true,
  326. encodeBodyUtf8: false,
  327. decodeUtf8: false,
  328. cache: false,
  329. isStreamingApi: false,
  330. alwaysAllowBody: false,
  331. );
  332. }
  333. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  334. response,
  335. r'''$[:].nid''',
  336. ));
  337. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  338. response,
  339. r'''$[:].adres''',
  340. ));
  341. static String? homeEstablishment(dynamic response) =>
  342. castToType<String>(getJsonField(
  343. response,
  344. r'''$[:].horecagelegenheid''',
  345. ));
  346. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  347. response,
  348. r'''$[:].datum''',
  349. ));
  350. static String? homePlaats(dynamic response) =>
  351. castToType<String>(getJsonField(
  352. response,
  353. r'''$[:].plaats''',
  354. ));
  355. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  356. response,
  357. r'''$[:].categorie''',
  358. true,
  359. ) as List?)
  360. ?.withoutNulls
  361. .map((x) => castToType<String>(x))
  362. .withoutNulls
  363. .toList();
  364. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  365. response,
  366. r'''$[:].titel''',
  367. ));
  368. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  369. response,
  370. r'''$[:].logo''',
  371. ));
  372. static String? homeInhoud(dynamic response) =>
  373. castToType<String>(getJsonField(
  374. response,
  375. r'''$[:].inhoud''',
  376. ));
  377. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  378. response,
  379. r'''$[:].url''',
  380. ));
  381. }
  382. class ZZhomeUitgaanCall {
  383. static Future<ApiCallResponse> call({
  384. int? page = 0,
  385. }) async {
  386. return ApiManager.instance.makeApiCall(
  387. callName: 'ZZhome uitgaan',
  388. apiUrl:
  389. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  390. callType: ApiCallType.GET,
  391. headers: {
  392. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  393. },
  394. params: {
  395. 'page': page,
  396. },
  397. returnBody: true,
  398. encodeBodyUtf8: false,
  399. decodeUtf8: false,
  400. cache: false,
  401. isStreamingApi: false,
  402. alwaysAllowBody: false,
  403. );
  404. }
  405. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  406. response,
  407. r'''$[:].nid''',
  408. ));
  409. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  410. response,
  411. r'''$[:].adres''',
  412. ));
  413. static String? homeEstablishment(dynamic response) =>
  414. castToType<String>(getJsonField(
  415. response,
  416. r'''$[:].horecagelegenheid''',
  417. ));
  418. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  419. response,
  420. r'''$[:].datum''',
  421. ));
  422. static String? homePlaats(dynamic response) =>
  423. castToType<String>(getJsonField(
  424. response,
  425. r'''$[:].plaats''',
  426. ));
  427. static String? homeCategorie(dynamic response) =>
  428. castToType<String>(getJsonField(
  429. response,
  430. r'''$[:].categorie''',
  431. ));
  432. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  433. response,
  434. r'''$[:].titel''',
  435. ));
  436. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  437. response,
  438. r'''$[:].logo''',
  439. ));
  440. static String? homeInhoud(dynamic response) =>
  441. castToType<String>(getJsonField(
  442. response,
  443. r'''$[:].inhoud''',
  444. ));
  445. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  446. response,
  447. r'''$[:].url''',
  448. ));
  449. }
  450. class HomeSliderCall {
  451. static Future<ApiCallResponse> call({
  452. int? page = 0,
  453. String? displayId = 'services_1',
  454. }) async {
  455. return ApiManager.instance.makeApiCall(
  456. callName: 'HomeSlider',
  457. apiUrl:
  458. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_1',
  459. callType: ApiCallType.GET,
  460. headers: {
  461. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  462. },
  463. params: {
  464. 'display_id': displayId,
  465. },
  466. returnBody: true,
  467. encodeBodyUtf8: false,
  468. decodeUtf8: false,
  469. cache: false,
  470. isStreamingApi: false,
  471. alwaysAllowBody: false,
  472. );
  473. }
  474. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  475. response,
  476. r'''$[:].nid''',
  477. ));
  478. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  479. response,
  480. r'''$[:].adres''',
  481. ));
  482. static String? tabelHorecagelegenheid(dynamic response) =>
  483. castToType<String>(getJsonField(
  484. response,
  485. r'''$[:].horecagelegenheid''',
  486. ));
  487. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  488. response,
  489. r'''$[:].datum''',
  490. ));
  491. static String? homePlaats(dynamic response) =>
  492. castToType<String>(getJsonField(
  493. response,
  494. r'''$[:].plaats''',
  495. ));
  496. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  497. response,
  498. r'''$[:].categorie''',
  499. true,
  500. ) as List?)
  501. ?.withoutNulls
  502. .map((x) => castToType<String>(x))
  503. .withoutNulls
  504. .toList();
  505. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  506. response,
  507. r'''$[:].titel''',
  508. ));
  509. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  510. response,
  511. r'''$[:].logo''',
  512. ));
  513. static String? homeInhoud(dynamic response) =>
  514. castToType<String>(getJsonField(
  515. response,
  516. r'''$[:].inhoud''',
  517. ));
  518. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  519. response,
  520. r'''$[:].url''',
  521. ));
  522. static String? tabelHorecagelegenheidID(dynamic response) =>
  523. castToType<String>(getJsonField(
  524. response,
  525. r'''$[:].horecagelegenheidid''',
  526. ));
  527. }
  528. class UitgaanstabelCall {
  529. static Future<ApiCallResponse> call({
  530. int? page = 0,
  531. String? townid = '0',
  532. String? displayId,
  533. }) async {
  534. displayId ??= '';
  535. return ApiManager.instance.makeApiCall(
  536. callName: 'Uitgaanstabel',
  537. apiUrl:
  538. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  539. callType: ApiCallType.GET,
  540. headers: {
  541. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  542. },
  543. params: {
  544. 'page': page,
  545. 'townid': townid,
  546. 'display_id': displayId,
  547. },
  548. returnBody: true,
  549. encodeBodyUtf8: false,
  550. decodeUtf8: false,
  551. cache: false,
  552. isStreamingApi: false,
  553. alwaysAllowBody: false,
  554. );
  555. }
  556. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  557. response,
  558. r'''$[:].nid''',
  559. ));
  560. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  561. response,
  562. r'''$[:].adres''',
  563. ));
  564. static String? tabelHorecagelegenheid(dynamic response) =>
  565. castToType<String>(getJsonField(
  566. response,
  567. r'''$[:].horecagelegenheid''',
  568. ));
  569. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  570. response,
  571. r'''$[:].datum''',
  572. ));
  573. static String? homePlaats(dynamic response) =>
  574. castToType<String>(getJsonField(
  575. response,
  576. r'''$[:].plaats''',
  577. ));
  578. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  579. response,
  580. r'''$[:].categorie''',
  581. true,
  582. ) as List?)
  583. ?.withoutNulls
  584. .map((x) => castToType<String>(x))
  585. .withoutNulls
  586. .toList();
  587. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  588. response,
  589. r'''$[:].titel''',
  590. ));
  591. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  592. response,
  593. r'''$[:].logo''',
  594. ));
  595. static String? homeInhoud(dynamic response) =>
  596. castToType<String>(getJsonField(
  597. response,
  598. r'''$[:].inhoud''',
  599. ));
  600. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  601. response,
  602. r'''$[:].url''',
  603. ));
  604. static String? tabelHorecagelegenheidID(dynamic response) =>
  605. castToType<String>(getJsonField(
  606. response,
  607. r'''$[:].horecagelegenheidid''',
  608. ));
  609. }
  610. class UitgaanSliderCall {
  611. static Future<ApiCallResponse> call({
  612. int? page = 0,
  613. String? townid = '0',
  614. String? displayId,
  615. }) async {
  616. displayId ??= '';
  617. return ApiManager.instance.makeApiCall(
  618. callName: 'UitgaanSlider',
  619. apiUrl:
  620. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  621. callType: ApiCallType.GET,
  622. headers: {
  623. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  624. },
  625. params: {
  626. 'page': page,
  627. 'townid': townid,
  628. 'display_id': displayId,
  629. },
  630. returnBody: true,
  631. encodeBodyUtf8: false,
  632. decodeUtf8: false,
  633. cache: false,
  634. isStreamingApi: false,
  635. alwaysAllowBody: false,
  636. );
  637. }
  638. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  639. response,
  640. r'''$[:].nid''',
  641. ));
  642. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  643. response,
  644. r'''$[:].adres''',
  645. ));
  646. static String? tabelHorecagelegenheid(dynamic response) =>
  647. castToType<String>(getJsonField(
  648. response,
  649. r'''$[:].horecagelegenheid''',
  650. ));
  651. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  652. response,
  653. r'''$[:].datum''',
  654. ));
  655. static String? homePlaats(dynamic response) =>
  656. castToType<String>(getJsonField(
  657. response,
  658. r'''$[:].plaats''',
  659. ));
  660. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  661. response,
  662. r'''$[:].categorie''',
  663. true,
  664. ) as List?)
  665. ?.withoutNulls
  666. .map((x) => castToType<String>(x))
  667. .withoutNulls
  668. .toList();
  669. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  670. response,
  671. r'''$[:].titel''',
  672. ));
  673. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  674. response,
  675. r'''$[:].logo''',
  676. ));
  677. static String? homeInhoud(dynamic response) =>
  678. castToType<String>(getJsonField(
  679. response,
  680. r'''$[:].inhoud''',
  681. ));
  682. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  683. response,
  684. r'''$[:].url''',
  685. ));
  686. static String? tabelHorecagelegenheidID(dynamic response) =>
  687. castToType<String>(getJsonField(
  688. response,
  689. r'''$[:].horecagelegenheidid''',
  690. ));
  691. }
  692. class EstablishmentsNewCall {
  693. static Future<ApiCallResponse> call({
  694. int? townid = 28695,
  695. }) async {
  696. return ApiManager.instance.makeApiCall(
  697. callName: 'EstablishmentsNew',
  698. apiUrl:
  699. 'https://uitgaanskrant.com/en/flutterdrup/views/_flutterflowmobiel_establishment_new.json?display_id=services_1&townid=28695',
  700. callType: ApiCallType.GET,
  701. headers: {
  702. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  703. },
  704. params: {
  705. 'townid': townid,
  706. },
  707. returnBody: true,
  708. encodeBodyUtf8: false,
  709. decodeUtf8: false,
  710. cache: false,
  711. isStreamingApi: false,
  712. alwaysAllowBody: false,
  713. );
  714. }
  715. static String? establishmentNid(dynamic response) =>
  716. castToType<String>(getJsonField(
  717. response,
  718. r'''$[:].nid''',
  719. ));
  720. static String? establishmentAddress(dynamic response) =>
  721. castToType<String>(getJsonField(
  722. response,
  723. r'''$[:].adres''',
  724. ));
  725. static String? establishmentTitel(dynamic response) =>
  726. castToType<String>(getJsonField(
  727. response,
  728. r'''$[:].titel''',
  729. ));
  730. static String? establishmentPlaats(dynamic response) =>
  731. castToType<String>(getJsonField(
  732. response,
  733. r'''$[:].plaats''',
  734. ));
  735. static String? establishmentLogo(dynamic response) =>
  736. castToType<String>(getJsonField(
  737. response,
  738. r'''$[:].logo''',
  739. ));
  740. static String? establishmentCategorie(dynamic response) =>
  741. castToType<String>(getJsonField(
  742. response,
  743. r'''$[:].categorie''',
  744. ));
  745. }
  746. class EstablishmentInfoCall {
  747. static Future<ApiCallResponse> call({
  748. String? nid = '',
  749. }) async {
  750. return ApiManager.instance.makeApiCall(
  751. callName: 'EstablishmentInfo',
  752. apiUrl:
  753. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_info.json?display_id=services_1',
  754. callType: ApiCallType.GET,
  755. headers: {
  756. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  757. },
  758. params: {
  759. 'nid': nid,
  760. },
  761. returnBody: true,
  762. encodeBodyUtf8: false,
  763. decodeUtf8: false,
  764. cache: true,
  765. isStreamingApi: false,
  766. alwaysAllowBody: false,
  767. );
  768. }
  769. static String? establismentNid(dynamic response) =>
  770. castToType<String>(getJsonField(
  771. response,
  772. r'''$[:].nid''',
  773. ));
  774. static String? establishmentBezorgkosten(dynamic response) =>
  775. castToType<String>(getJsonField(
  776. response,
  777. r'''$[:].bezorgkosten''',
  778. ));
  779. static String? establishmentEmail(dynamic response) =>
  780. castToType<String>(getJsonField(
  781. response,
  782. r'''$[:].email''',
  783. ));
  784. static String? establishmentFacebook(dynamic response) =>
  785. castToType<String>(getJsonField(
  786. response,
  787. r'''$[:].facebook''',
  788. ));
  789. static String? establishmentInstagram(dynamic response) =>
  790. castToType<String>(getJsonField(
  791. response,
  792. r'''$[:].instagram''',
  793. ));
  794. static String? establishmentMenukaart(dynamic response) =>
  795. castToType<String>(getJsonField(
  796. response,
  797. r'''$[:].menukaart''',
  798. ));
  799. static String? establishmentOpeningstijden(dynamic response) =>
  800. castToType<String>(getJsonField(
  801. response,
  802. r'''$[:].openingstijden''',
  803. ));
  804. static String? establishmentTelefoonnummer(dynamic response) =>
  805. castToType<String>(getJsonField(
  806. response,
  807. r'''$[:].telefoonnummer''',
  808. ));
  809. static String? establishmentTwitter(dynamic response) =>
  810. castToType<String>(getJsonField(
  811. response,
  812. r'''$[:].twitter''',
  813. ));
  814. static String? establishmentWebsite(dynamic response) =>
  815. castToType<String>(getJsonField(
  816. response,
  817. r'''$[:].website''',
  818. ));
  819. static List<String>? establishmentbezorgbetaalopties(dynamic response) =>
  820. (getJsonField(
  821. response,
  822. r'''$[:].thuisbezorgtbetaalopties''',
  823. true,
  824. ) as List?)
  825. ?.withoutNulls
  826. .map((x) => castToType<String>(x))
  827. .withoutNulls
  828. .toList();
  829. static String? establishmentAdres(dynamic response) =>
  830. castToType<String>(getJsonField(
  831. response,
  832. r'''$[:].adres''',
  833. ));
  834. static List<String>? establishmentAfhaalopties(dynamic response) =>
  835. (getJsonField(
  836. response,
  837. r'''$[:].afhaalopties''',
  838. true,
  839. ) as List?)
  840. ?.withoutNulls
  841. .map((x) => castToType<String>(x))
  842. .withoutNulls
  843. .toList();
  844. static String? establishmentPlaats(dynamic response) =>
  845. castToType<String>(getJsonField(
  846. response,
  847. r'''$[:].plaats''',
  848. ));
  849. static List<String>? establishmentFotoos(dynamic response) => (getJsonField(
  850. response,
  851. r'''$[:].fotoos''',
  852. true,
  853. ) as List?)
  854. ?.withoutNulls
  855. .map((x) => castToType<String>(x))
  856. .withoutNulls
  857. .toList();
  858. static List<String>? establishmentCryptocoins(dynamic response) =>
  859. (getJsonField(
  860. response,
  861. r'''$[:].cryptocoins''',
  862. true,
  863. ) as List?)
  864. ?.withoutNulls
  865. .map((x) => castToType<String>(x))
  866. .withoutNulls
  867. .toList();
  868. static String? establishmentbezorgtijden(dynamic response) =>
  869. castToType<String>(getJsonField(
  870. response,
  871. r'''$[:].bezorgtijden''',
  872. ));
  873. static String? establishmentMinimaleorder(dynamic response) =>
  874. castToType<String>(getJsonField(
  875. response,
  876. r'''$[:].minimaleorder''',
  877. ));
  878. static String? establshmentTitel(dynamic response) =>
  879. castToType<String>(getJsonField(
  880. response,
  881. r'''$[:].titel''',
  882. ));
  883. static List<String>? establshmentBezorgtin(dynamic response) => (getJsonField(
  884. response,
  885. r'''$[:].bezorgtin''',
  886. true,
  887. ) as List?)
  888. ?.withoutNulls
  889. .map((x) => castToType<String>(x))
  890. .withoutNulls
  891. .toList();
  892. static String? establshmentKvk(dynamic response) =>
  893. castToType<String>(getJsonField(
  894. response,
  895. r'''$[:].kvk''',
  896. ));
  897. static String? establshmentBestellink(dynamic response) =>
  898. castToType<String>(getJsonField(
  899. response,
  900. r'''$[:].bestellink''',
  901. ));
  902. static String? establshmentInhoud(dynamic response) =>
  903. castToType<String>(getJsonField(
  904. response,
  905. r'''$[:].inhoud''',
  906. ));
  907. static String? establshmentOpeningUitzondering(dynamic response) =>
  908. castToType<String>(getJsonField(
  909. response,
  910. r'''$[:].openingstijdenuitzondering''',
  911. ));
  912. static String? establshmentLogo(dynamic response) =>
  913. castToType<String>(getJsonField(
  914. response,
  915. r'''$[:].logo''',
  916. ));
  917. static String? establishmentEntreeprijs(dynamic response) =>
  918. castToType<String>(getJsonField(
  919. response,
  920. r'''$[:].entreeprijs''',
  921. ));
  922. static List<String>? establishmentCategorie(dynamic response) =>
  923. (getJsonField(
  924. response,
  925. r'''$[:].categorie''',
  926. true,
  927. ) as List?)
  928. ?.withoutNulls
  929. .map((x) => castToType<String>(x))
  930. .withoutNulls
  931. .toList();
  932. static String? establishmentEntreeToelichting(dynamic response) =>
  933. castToType<String>(getJsonField(
  934. response,
  935. r'''$[:].toelichtingentree''',
  936. ));
  937. static String? establishmentURL(dynamic response) =>
  938. castToType<String>(getJsonField(
  939. response,
  940. r'''$[:].url''',
  941. ));
  942. }
  943. class HorecagelegenheidEventsCall {
  944. static Future<ApiCallResponse> call({
  945. String? horecanid,
  946. }) async {
  947. horecanid ??= '';
  948. return ApiManager.instance.makeApiCall(
  949. callName: 'HorecagelegenheidEvents',
  950. apiUrl:
  951. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
  952. callType: ApiCallType.GET,
  953. headers: {
  954. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  955. },
  956. params: {
  957. 'horecanid': horecanid,
  958. },
  959. returnBody: true,
  960. encodeBodyUtf8: false,
  961. decodeUtf8: false,
  962. cache: false,
  963. isStreamingApi: false,
  964. alwaysAllowBody: false,
  965. );
  966. }
  967. static String? horecaEventNid(dynamic response) =>
  968. castToType<String>(getJsonField(
  969. response,
  970. r'''$[:].nid''',
  971. ));
  972. static String? horecaEventBody(dynamic response) =>
  973. castToType<String>(getJsonField(
  974. response,
  975. r'''$[:].body''',
  976. ));
  977. static String? horecaEventLogo(dynamic response) =>
  978. castToType<String>(getJsonField(
  979. response,
  980. r'''$[:].logo''',
  981. ));
  982. static String? horecaEventDatum(dynamic response) =>
  983. castToType<String>(getJsonField(
  984. response,
  985. r'''$[:].datum''',
  986. ));
  987. static String? horecaEventTitel(dynamic response) =>
  988. castToType<String>(getJsonField(
  989. response,
  990. r'''$[:].titel''',
  991. ));
  992. static String? horecaEventInhoud(dynamic response) =>
  993. castToType<String>(getJsonField(
  994. response,
  995. r'''$[:].inhoud''',
  996. ));
  997. static List<String>? horecaEventCategorie(dynamic response) => (getJsonField(
  998. response,
  999. r'''$[:].categorie''',
  1000. true,
  1001. ) as List?)
  1002. ?.withoutNulls
  1003. .map((x) => castToType<String>(x))
  1004. .withoutNulls
  1005. .toList();
  1006. }
  1007. class ZzEstablishmentEventsCopyCall {
  1008. static Future<ApiCallResponse> call({
  1009. int? horecanid = 75411,
  1010. }) async {
  1011. return ApiManager.instance.makeApiCall(
  1012. callName: 'zzEstablishmentEvents Copy',
  1013. apiUrl:
  1014. 'https://devbob.uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
  1015. callType: ApiCallType.GET,
  1016. headers: {
  1017. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1018. },
  1019. params: {
  1020. 'horecanid': horecanid,
  1021. },
  1022. returnBody: true,
  1023. encodeBodyUtf8: false,
  1024. decodeUtf8: false,
  1025. cache: false,
  1026. isStreamingApi: false,
  1027. alwaysAllowBody: false,
  1028. );
  1029. }
  1030. static String? estEventNid(dynamic response) =>
  1031. castToType<String>(getJsonField(
  1032. response,
  1033. r'''$[:].nid''',
  1034. ));
  1035. static String? estEventTitle(dynamic response) =>
  1036. castToType<String>(getJsonField(
  1037. response,
  1038. r'''$[:].title''',
  1039. ));
  1040. static String? estEventAdres(dynamic response) =>
  1041. castToType<String>(getJsonField(
  1042. response,
  1043. r'''$[:].adres''',
  1044. ));
  1045. static dynamic estEventEntreeselect(dynamic response) => getJsonField(
  1046. response,
  1047. r'''$[:].entreeselect''',
  1048. );
  1049. static String? estEventBody(dynamic response) =>
  1050. castToType<String>(getJsonField(
  1051. response,
  1052. r'''$[:].body''',
  1053. ));
  1054. static String? estEventEntreeToelichting(dynamic response) =>
  1055. castToType<String>(getJsonField(
  1056. response,
  1057. r'''$[:].entreetoelichting''',
  1058. ));
  1059. static String? estEventTickets(dynamic response) =>
  1060. castToType<String>(getJsonField(
  1061. response,
  1062. r'''$[:].tickets''',
  1063. ));
  1064. static String? estEventWebsite(dynamic response) =>
  1065. castToType<String>(getJsonField(
  1066. response,
  1067. r'''$[:].website''',
  1068. ));
  1069. static String? estEventLogo(dynamic response) =>
  1070. castToType<String>(getJsonField(
  1071. response,
  1072. r'''$[:].logo''',
  1073. ));
  1074. static List<String>? estEventFotoos(dynamic response) => (getJsonField(
  1075. response,
  1076. r'''$[:].fotoos''',
  1077. true,
  1078. ) as List?)
  1079. ?.withoutNulls
  1080. .map((x) => castToType<String>(x))
  1081. .withoutNulls
  1082. .toList();
  1083. static String? estEventCategory(dynamic response) =>
  1084. castToType<String>(getJsonField(
  1085. response,
  1086. r'''$[:].category''',
  1087. ));
  1088. static String? estEventDatum(dynamic response) =>
  1089. castToType<String>(getJsonField(
  1090. response,
  1091. r'''$[:].datum''',
  1092. ));
  1093. }
  1094. class GemeentenCall {
  1095. static Future<ApiCallResponse> call({
  1096. String? provincieid = '',
  1097. }) async {
  1098. return ApiManager.instance.makeApiCall(
  1099. callName: 'gemeenten',
  1100. apiUrl:
  1101. 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
  1102. callType: ApiCallType.GET,
  1103. headers: {
  1104. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1105. },
  1106. params: {
  1107. 'provincieid': provincieid,
  1108. },
  1109. returnBody: true,
  1110. encodeBodyUtf8: false,
  1111. decodeUtf8: false,
  1112. cache: false,
  1113. isStreamingApi: false,
  1114. alwaysAllowBody: false,
  1115. );
  1116. }
  1117. static String? gemeenteId(dynamic response) =>
  1118. castToType<String>(getJsonField(
  1119. response,
  1120. r'''$[:].gemeenteid''',
  1121. ));
  1122. static String? gemeenteName(dynamic response) =>
  1123. castToType<String>(getJsonField(
  1124. response,
  1125. r'''$[:].gemeentename''',
  1126. ));
  1127. }
  1128. class ProvinciesCall {
  1129. static Future<ApiCallResponse> call() async {
  1130. return ApiManager.instance.makeApiCall(
  1131. callName: 'provincies',
  1132. apiUrl:
  1133. 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
  1134. callType: ApiCallType.GET,
  1135. headers: {
  1136. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1137. },
  1138. params: {},
  1139. returnBody: true,
  1140. encodeBodyUtf8: false,
  1141. decodeUtf8: false,
  1142. cache: false,
  1143. isStreamingApi: false,
  1144. alwaysAllowBody: false,
  1145. );
  1146. }
  1147. static String? provincieId(dynamic response) =>
  1148. castToType<String>(getJsonField(
  1149. response,
  1150. r'''$[:].provincieid''',
  1151. ));
  1152. static String? provincieName(dynamic response) =>
  1153. castToType<String>(getJsonField(
  1154. response,
  1155. r'''$[:].provinciename''',
  1156. ));
  1157. static List<String>? provinciedescription(dynamic response) => (getJsonField(
  1158. response,
  1159. r'''$[:].provinciedescription''',
  1160. true,
  1161. ) as List?)
  1162. ?.withoutNulls
  1163. .map((x) => castToType<String>(x))
  1164. .withoutNulls
  1165. .toList();
  1166. }
  1167. class EvenementCall {
  1168. static Future<ApiCallResponse> call({
  1169. String? nid = '0',
  1170. }) async {
  1171. return ApiManager.instance.makeApiCall(
  1172. callName: 'Evenement',
  1173. apiUrl:
  1174. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflow_events.json?display_id=services_1',
  1175. callType: ApiCallType.GET,
  1176. headers: {
  1177. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1178. },
  1179. params: {
  1180. 'nid': nid,
  1181. },
  1182. returnBody: true,
  1183. encodeBodyUtf8: false,
  1184. decodeUtf8: false,
  1185. cache: false,
  1186. isStreamingApi: false,
  1187. alwaysAllowBody: false,
  1188. );
  1189. }
  1190. static String? eventNid(dynamic response) => castToType<String>(getJsonField(
  1191. response,
  1192. r'''$[0].nid''',
  1193. ));
  1194. static String? eventTitle(dynamic response) =>
  1195. castToType<String>(getJsonField(
  1196. response,
  1197. r'''$[0].title''',
  1198. ));
  1199. static String? eventDate(dynamic response) => castToType<String>(getJsonField(
  1200. response,
  1201. r'''$[0].datum''',
  1202. ));
  1203. static String? eventLogog(dynamic response) =>
  1204. castToType<String>(getJsonField(
  1205. response,
  1206. r'''$[0].logo''',
  1207. ));
  1208. static String? eventAdres(dynamic response) =>
  1209. castToType<String>(getJsonField(
  1210. response,
  1211. r'''$[0].adres''',
  1212. ));
  1213. static String? eventPlaats(dynamic response) =>
  1214. castToType<String>(getJsonField(
  1215. response,
  1216. r'''$[0].plaats''',
  1217. ));
  1218. static List<String>? eventCategorie(dynamic response) => (getJsonField(
  1219. response,
  1220. r'''$[0].categorie''',
  1221. true,
  1222. ) as List?)
  1223. ?.withoutNulls
  1224. .map((x) => castToType<String>(x))
  1225. .withoutNulls
  1226. .toList();
  1227. static String? eventBody(dynamic response) => castToType<String>(getJsonField(
  1228. response,
  1229. r'''$[0].body''',
  1230. ));
  1231. static String? eventWebsiteg(dynamic response) =>
  1232. castToType<String>(getJsonField(
  1233. response,
  1234. r'''$[0].website''',
  1235. ));
  1236. static List<String>? eventFotoos(dynamic response) => (getJsonField(
  1237. response,
  1238. r'''$[0].fotos''',
  1239. true,
  1240. ) as List?)
  1241. ?.withoutNulls
  1242. .map((x) => castToType<String>(x))
  1243. .withoutNulls
  1244. .toList();
  1245. static String? eventEntreeprijs(dynamic response) =>
  1246. castToType<String>(getJsonField(
  1247. response,
  1248. r'''$[0].entreeprijs''',
  1249. ));
  1250. static String? eventEntreeToelichting(dynamic response) =>
  1251. castToType<String>(getJsonField(
  1252. response,
  1253. r'''$[0].entreetoelichting''',
  1254. ));
  1255. static String? eventContact(dynamic response) =>
  1256. castToType<String>(getJsonField(
  1257. response,
  1258. r'''$[0].contact''',
  1259. ));
  1260. static String? eventHorecagelegenheidnid(dynamic response) =>
  1261. castToType<String>(getJsonField(
  1262. response,
  1263. r'''$[0].horecagelegenheidnid''',
  1264. ));
  1265. }
  1266. class EstablishmentsCall {
  1267. static Future<ApiCallResponse> call({
  1268. String? horcat,
  1269. String? townid = '',
  1270. String? displayId = 'services_1',
  1271. }) async {
  1272. horcat ??= null!;
  1273. return ApiManager.instance.makeApiCall(
  1274. callName: 'Establishments',
  1275. apiUrl:
  1276. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel_establishments.json',
  1277. callType: ApiCallType.GET,
  1278. headers: {
  1279. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1280. },
  1281. params: {
  1282. 'horcat': horcat,
  1283. 'townid': townid,
  1284. 'display_id': displayId,
  1285. },
  1286. returnBody: true,
  1287. encodeBodyUtf8: false,
  1288. decodeUtf8: false,
  1289. cache: true,
  1290. isStreamingApi: false,
  1291. alwaysAllowBody: false,
  1292. );
  1293. }
  1294. static String? establishmentNid(dynamic response) =>
  1295. castToType<String>(getJsonField(
  1296. response,
  1297. r'''$[:].nid''',
  1298. ));
  1299. static String? establishmentTitel(dynamic response) =>
  1300. castToType<String>(getJsonField(
  1301. response,
  1302. r'''$[:].titel''',
  1303. ));
  1304. static String? establishmentAdres(dynamic response) =>
  1305. castToType<String>(getJsonField(
  1306. response,
  1307. r'''$[:].adres''',
  1308. ));
  1309. static String? establishmentPlaats(dynamic response) =>
  1310. castToType<String>(getJsonField(
  1311. response,
  1312. r'''$[:].plaats''',
  1313. ));
  1314. static String? establishmentLogo(dynamic response) =>
  1315. castToType<String>(getJsonField(
  1316. response,
  1317. r'''$[:].logo''',
  1318. ));
  1319. static List? establishmentCategorie(dynamic response) => getJsonField(
  1320. response,
  1321. r'''$[:].categorie''',
  1322. true,
  1323. ) as List?;
  1324. }
  1325. class QueryCityIdCall {
  1326. static Future<ApiCallResponse> call({
  1327. String? townid = '',
  1328. }) async {
  1329. return ApiManager.instance.makeApiCall(
  1330. callName: 'QueryCityId',
  1331. apiUrl:
  1332. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflow_querytownid.json?display_id=services_1',
  1333. callType: ApiCallType.GET,
  1334. headers: {},
  1335. params: {
  1336. 'townid': townid,
  1337. },
  1338. returnBody: true,
  1339. encodeBodyUtf8: false,
  1340. decodeUtf8: false,
  1341. cache: true,
  1342. isStreamingApi: false,
  1343. alwaysAllowBody: false,
  1344. );
  1345. }
  1346. static String? stadId(dynamic response) => castToType<String>(getJsonField(
  1347. response,
  1348. r'''$[:].id''',
  1349. ));
  1350. static String? stadNaam(dynamic response) => castToType<String>(getJsonField(
  1351. response,
  1352. r'''$[:].name''',
  1353. ));
  1354. static String? provincieId(dynamic response) =>
  1355. castToType<String>(getJsonField(
  1356. response,
  1357. r'''$[:].parentid''',
  1358. ));
  1359. static String? provincieNaam(dynamic response) =>
  1360. castToType<String>(getJsonField(
  1361. response,
  1362. r'''$[:].parentname''',
  1363. ));
  1364. }
  1365. class ApiPagingParams {
  1366. int nextPageNumber = 0;
  1367. int numItems = 0;
  1368. dynamic lastResponse;
  1369. ApiPagingParams({
  1370. required this.nextPageNumber,
  1371. required this.numItems,
  1372. required this.lastResponse,
  1373. });
  1374. @override
  1375. String toString() =>
  1376. 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
  1377. }
  1378. String _toEncodable(dynamic item) {
  1379. return item;
  1380. }
  1381. String _serializeList(List? list) {
  1382. list ??= <String>[];
  1383. try {
  1384. return json.encode(list, toEncodable: _toEncodable);
  1385. } catch (_) {
  1386. if (kDebugMode) {
  1387. print("List serialization failed. Returning empty list.");
  1388. }
  1389. return '[]';
  1390. }
  1391. }
  1392. String _serializeJson(dynamic jsonVar, [bool isList = false]) {
  1393. jsonVar ??= (isList ? [] : {});
  1394. try {
  1395. return json.encode(jsonVar, toEncodable: _toEncodable);
  1396. } catch (_) {
  1397. if (kDebugMode) {
  1398. print("Json serialization failed. Returning empty json.");
  1399. }
  1400. return isList ? '[]' : '{}';
  1401. }
  1402. }
  1403. String? escapeStringForJson(String? input) {
  1404. if (input == null) {
  1405. return null;
  1406. }
  1407. return input
  1408. .replaceAll('\\', '\\\\')
  1409. .replaceAll('"', '\\"')
  1410. .replaceAll('\n', '\\n')
  1411. .replaceAll('\t', '\\t');
  1412. }