api_calls.dart 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  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. /// Start productie Group Code
  10. class ProductieGroup {
  11. static String getBaseUrl() => 'https://uitgaanskrant.com';
  12. static Map<String, String> headers = {};
  13. static PlaatsenBijGemeenteCall plaatsenBijGemeenteCall =
  14. PlaatsenBijGemeenteCall();
  15. static EntreeoptiesCall entreeoptiesCall = EntreeoptiesCall();
  16. static CategorieenCall categorieenCall = CategorieenCall();
  17. }
  18. class PlaatsenBijGemeenteCall {
  19. Future<ApiCallResponse> call({
  20. String? gemeenteid = '',
  21. }) async {
  22. final baseUrl = ProductieGroup.getBaseUrl();
  23. return ApiManager.instance.makeApiCall(
  24. callName: 'PlaatsenBijGemeente',
  25. apiUrl: '${baseUrl}/nl/flutterdrup/plaatsen_bij_gemeente.json',
  26. callType: ApiCallType.GET,
  27. headers: {},
  28. params: {
  29. 'gemeenteid': gemeenteid,
  30. },
  31. returnBody: true,
  32. encodeBodyUtf8: false,
  33. decodeUtf8: false,
  34. cache: true,
  35. isStreamingApi: false,
  36. alwaysAllowBody: false,
  37. );
  38. }
  39. List<String>? plaatsId(dynamic response) => (getJsonField(
  40. response,
  41. r'''$[:].plaatsid''',
  42. true,
  43. ) as List?)
  44. ?.withoutNulls
  45. .map((x) => castToType<String>(x))
  46. .withoutNulls
  47. .toList();
  48. List<String>? plaatsName(dynamic response) => (getJsonField(
  49. response,
  50. r'''$[:].plaatsname''',
  51. true,
  52. ) as List?)
  53. ?.withoutNulls
  54. .map((x) => castToType<String>(x))
  55. .withoutNulls
  56. .toList();
  57. }
  58. class EntreeoptiesCall {
  59. Future<ApiCallResponse> call({
  60. String? sessionName = '',
  61. String? sessid = '',
  62. }) async {
  63. final baseUrl = ProductieGroup.getBaseUrl();
  64. return ApiManager.instance.makeApiCall(
  65. callName: 'Entreeopties',
  66. apiUrl: '${baseUrl}/nl/flutterdrup/entreeopties.json',
  67. callType: ApiCallType.GET,
  68. headers: {
  69. 'Cookie': '${sessionName}=${sessid}',
  70. },
  71. params: {},
  72. returnBody: true,
  73. encodeBodyUtf8: false,
  74. decodeUtf8: false,
  75. cache: true,
  76. isStreamingApi: false,
  77. alwaysAllowBody: false,
  78. );
  79. }
  80. }
  81. class CategorieenCall {
  82. Future<ApiCallResponse> call({
  83. String? sessionName = '',
  84. String? sessid = '',
  85. }) async {
  86. final baseUrl = ProductieGroup.getBaseUrl();
  87. return ApiManager.instance.makeApiCall(
  88. callName: 'Categorieen',
  89. apiUrl: '${baseUrl}/nl/flutterdrup/categorieen.json',
  90. callType: ApiCallType.GET,
  91. headers: {
  92. 'Cookie': '${sessionName}=${sessid}',
  93. },
  94. params: {},
  95. returnBody: true,
  96. encodeBodyUtf8: false,
  97. decodeUtf8: false,
  98. cache: true,
  99. isStreamingApi: false,
  100. alwaysAllowBody: false,
  101. );
  102. }
  103. }
  104. /// End productie Group Code
  105. class HomeTabelCall {
  106. static Future<ApiCallResponse> call({
  107. int? page = 0,
  108. String? displayId = 'services_2',
  109. String? datumVan = '',
  110. String? datumTot = '',
  111. String? zoek = '',
  112. }) async {
  113. return ApiManager.instance.makeApiCall(
  114. callName: 'homeTabel',
  115. apiUrl:
  116. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_2',
  117. callType: ApiCallType.GET,
  118. headers: {},
  119. params: {
  120. 'page': page,
  121. 'display_id': displayId,
  122. 'datum_van': datumVan,
  123. 'datum_tot': datumTot,
  124. 'zoek': zoek,
  125. },
  126. returnBody: true,
  127. encodeBodyUtf8: false,
  128. decodeUtf8: true,
  129. cache: true,
  130. isStreamingApi: false,
  131. alwaysAllowBody: false,
  132. );
  133. }
  134. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  135. response,
  136. r'''$[:].nid''',
  137. ));
  138. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  139. response,
  140. r'''$[:].adres''',
  141. ));
  142. static String? homeEstablishment(dynamic response) =>
  143. castToType<String>(getJsonField(
  144. response,
  145. r'''$[:].horecagelegenheid''',
  146. ));
  147. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  148. response,
  149. r'''$[:].datum''',
  150. ));
  151. static String? homePlaats(dynamic response) =>
  152. castToType<String>(getJsonField(
  153. response,
  154. r'''$[:].plaats''',
  155. ));
  156. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  157. response,
  158. r'''$[:].categorie''',
  159. true,
  160. ) as List?)
  161. ?.withoutNulls
  162. .map((x) => castToType<String>(x))
  163. .withoutNulls
  164. .toList();
  165. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  166. response,
  167. r'''$[:].titel''',
  168. ));
  169. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  170. response,
  171. r'''$[:].logo''',
  172. ));
  173. static String? homeInhoud(dynamic response) =>
  174. castToType<String>(getJsonField(
  175. response,
  176. r'''$[:].inhoud''',
  177. ));
  178. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  179. response,
  180. r'''$[:].url''',
  181. ));
  182. static String? homeEstablishmentID(dynamic response) =>
  183. castToType<String>(getJsonField(
  184. response,
  185. r'''$[:].horecagelegenheidid''',
  186. ));
  187. }
  188. class HomeSliderCall {
  189. static Future<ApiCallResponse> call({
  190. String? displayId = 'services_1',
  191. }) async {
  192. return ApiManager.instance.makeApiCall(
  193. callName: 'HomeSlider',
  194. apiUrl:
  195. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_1',
  196. callType: ApiCallType.GET,
  197. headers: {},
  198. params: {
  199. 'display_id': displayId,
  200. },
  201. returnBody: true,
  202. encodeBodyUtf8: false,
  203. decodeUtf8: true,
  204. cache: true,
  205. isStreamingApi: false,
  206. alwaysAllowBody: false,
  207. );
  208. }
  209. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  210. response,
  211. r'''$[:].nid''',
  212. ));
  213. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  214. response,
  215. r'''$[:].adres''',
  216. ));
  217. static String? tabelHorecagelegenheid(dynamic response) =>
  218. castToType<String>(getJsonField(
  219. response,
  220. r'''$[:].horecagelegenheid''',
  221. ));
  222. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  223. response,
  224. r'''$[:].datum''',
  225. ));
  226. static String? homePlaats(dynamic response) =>
  227. castToType<String>(getJsonField(
  228. response,
  229. r'''$[:].plaats''',
  230. ));
  231. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  232. response,
  233. r'''$[:].categorie''',
  234. true,
  235. ) as List?)
  236. ?.withoutNulls
  237. .map((x) => castToType<String>(x))
  238. .withoutNulls
  239. .toList();
  240. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  241. response,
  242. r'''$[:].titel''',
  243. ));
  244. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  245. response,
  246. r'''$[:].logo''',
  247. ));
  248. static String? homeInhoud(dynamic response) =>
  249. castToType<String>(getJsonField(
  250. response,
  251. r'''$[:].inhoud''',
  252. ));
  253. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  254. response,
  255. r'''$[:].url''',
  256. ));
  257. static String? tabelHorecagelegenheidID(dynamic response) =>
  258. castToType<String>(getJsonField(
  259. response,
  260. r'''$[:].horecagelegenheidid''',
  261. ));
  262. static List? items(dynamic response) => getJsonField(
  263. response,
  264. r'''$[:]''',
  265. true,
  266. ) as List?;
  267. }
  268. class UitgaanstabelCall {
  269. static Future<ApiCallResponse> call({
  270. int? page = 0,
  271. String? townid = '0',
  272. String? displayId,
  273. String? datumVan = '',
  274. String? datumTot = '',
  275. String? zoek = '',
  276. }) async {
  277. displayId ??= '';
  278. return ApiManager.instance.makeApiCall(
  279. callName: 'Uitgaanstabel',
  280. apiUrl:
  281. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  282. callType: ApiCallType.GET,
  283. headers: {},
  284. params: {
  285. 'page': page,
  286. 'townid': townid,
  287. 'display_id': displayId,
  288. 'datum_van': datumVan,
  289. 'datum_tot': datumTot,
  290. 'zoek': zoek,
  291. },
  292. returnBody: true,
  293. encodeBodyUtf8: false,
  294. decodeUtf8: true,
  295. cache: true,
  296. isStreamingApi: false,
  297. alwaysAllowBody: false,
  298. );
  299. }
  300. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  301. response,
  302. r'''$[:].nid''',
  303. ));
  304. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  305. response,
  306. r'''$[:].adres''',
  307. ));
  308. static String? tabelHorecagelegenheid(dynamic response) =>
  309. castToType<String>(getJsonField(
  310. response,
  311. r'''$[:].horecagelegenheid''',
  312. ));
  313. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  314. response,
  315. r'''$[:].datum''',
  316. ));
  317. static String? homePlaats(dynamic response) =>
  318. castToType<String>(getJsonField(
  319. response,
  320. r'''$[:].plaats''',
  321. ));
  322. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  323. response,
  324. r'''$[:].categorie''',
  325. true,
  326. ) as List?)
  327. ?.withoutNulls
  328. .map((x) => castToType<String>(x))
  329. .withoutNulls
  330. .toList();
  331. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  332. response,
  333. r'''$[:].titel''',
  334. ));
  335. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  336. response,
  337. r'''$[:].logo''',
  338. ));
  339. static String? homeInhoud(dynamic response) =>
  340. castToType<String>(getJsonField(
  341. response,
  342. r'''$[:].inhoud''',
  343. ));
  344. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  345. response,
  346. r'''$[:].url''',
  347. ));
  348. static String? tabelHorecagelegenheidID(dynamic response) =>
  349. castToType<String>(getJsonField(
  350. response,
  351. r'''$[:].horecagelegenheidid''',
  352. ));
  353. }
  354. class UitgaanSliderCall {
  355. static Future<ApiCallResponse> call({
  356. int? page = 0,
  357. String? townid = '0',
  358. String? displayId = 'services_1',
  359. }) async {
  360. return ApiManager.instance.makeApiCall(
  361. callName: 'UitgaanSlider',
  362. apiUrl:
  363. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  364. callType: ApiCallType.GET,
  365. headers: {},
  366. params: {
  367. 'page': page,
  368. 'townid': townid,
  369. 'display_id': displayId,
  370. },
  371. returnBody: true,
  372. encodeBodyUtf8: false,
  373. decodeUtf8: true,
  374. cache: true,
  375. isStreamingApi: false,
  376. alwaysAllowBody: false,
  377. );
  378. }
  379. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  380. response,
  381. r'''$[:].nid''',
  382. ));
  383. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  384. response,
  385. r'''$[:].adres''',
  386. ));
  387. static String? tabelHorecagelegenheid(dynamic response) =>
  388. castToType<String>(getJsonField(
  389. response,
  390. r'''$[:].horecagelegenheid''',
  391. ));
  392. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  393. response,
  394. r'''$[:].datum''',
  395. ));
  396. static String? homePlaats(dynamic response) =>
  397. castToType<String>(getJsonField(
  398. response,
  399. r'''$[:].plaats''',
  400. ));
  401. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  402. response,
  403. r'''$[:].categorie''',
  404. true,
  405. ) as List?)
  406. ?.withoutNulls
  407. .map((x) => castToType<String>(x))
  408. .withoutNulls
  409. .toList();
  410. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  411. response,
  412. r'''$[:].titel''',
  413. ));
  414. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  415. response,
  416. r'''$[:].logo''',
  417. ));
  418. static String? homeInhoud(dynamic response) =>
  419. castToType<String>(getJsonField(
  420. response,
  421. r'''$[:].inhoud''',
  422. ));
  423. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  424. response,
  425. r'''$[:].url''',
  426. ));
  427. static String? tabelHorecagelegenheidID(dynamic response) =>
  428. castToType<String>(getJsonField(
  429. response,
  430. r'''$[:].horecagelegenheidid''',
  431. ));
  432. static List? items(dynamic response) => getJsonField(
  433. response,
  434. r'''$[:]''',
  435. true,
  436. ) as List?;
  437. }
  438. class EstablishmentInfoCall {
  439. static Future<ApiCallResponse> call({
  440. String? nid = '',
  441. }) async {
  442. return ApiManager.instance.makeApiCall(
  443. callName: 'EstablishmentInfo',
  444. apiUrl:
  445. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel_establishment_info.json?display_id=services_1',
  446. callType: ApiCallType.GET,
  447. headers: {},
  448. params: {
  449. 'nid': nid,
  450. },
  451. returnBody: true,
  452. encodeBodyUtf8: false,
  453. decodeUtf8: true,
  454. cache: true,
  455. isStreamingApi: false,
  456. alwaysAllowBody: false,
  457. );
  458. }
  459. static String? establismentNid(dynamic response) =>
  460. castToType<String>(getJsonField(
  461. response,
  462. r'''$[:].nid''',
  463. ));
  464. static String? establishmentBezorgkosten(dynamic response) =>
  465. castToType<String>(getJsonField(
  466. response,
  467. r'''$[:].bezorgkosten''',
  468. ));
  469. static String? establishmentEmail(dynamic response) =>
  470. castToType<String>(getJsonField(
  471. response,
  472. r'''$[:]['e-mail']''',
  473. ));
  474. static String? establishmentFacebook(dynamic response) =>
  475. castToType<String>(getJsonField(
  476. response,
  477. r'''$[:].facebook''',
  478. ));
  479. static String? establishmentInstagram(dynamic response) =>
  480. castToType<String>(getJsonField(
  481. response,
  482. r'''$[:].instagram''',
  483. ));
  484. static String? establishmentMenukaart(dynamic response) =>
  485. castToType<String>(getJsonField(
  486. response,
  487. r'''$[:].menukaart''',
  488. ));
  489. static String? establishmentOpeningstijden(dynamic response) =>
  490. castToType<String>(getJsonField(
  491. response,
  492. r'''$[:].openingstijden''',
  493. ));
  494. static String? establishmentTelefoonnummer(dynamic response) =>
  495. castToType<String>(getJsonField(
  496. response,
  497. r'''$[:].telefoonnummer''',
  498. ));
  499. static String? establishmentTwitter(dynamic response) =>
  500. castToType<String>(getJsonField(
  501. response,
  502. r'''$[:].twitter''',
  503. ));
  504. static String? establishmentWebsite(dynamic response) =>
  505. castToType<String>(getJsonField(
  506. response,
  507. r'''$[:].website''',
  508. ));
  509. static List<String>? establishmentbezorgbetaalopties(dynamic response) =>
  510. (getJsonField(
  511. response,
  512. r'''$[:].thuisbezorgtbetaalopties''',
  513. true,
  514. ) as List?)
  515. ?.withoutNulls
  516. .map((x) => castToType<String>(x))
  517. .withoutNulls
  518. .toList();
  519. static String? establishmentAdres(dynamic response) =>
  520. castToType<String>(getJsonField(
  521. response,
  522. r'''$[:].adres''',
  523. ));
  524. static List<String>? establishmentAfhaalopties(dynamic response) =>
  525. (getJsonField(
  526. response,
  527. r'''$[:].afhaalopties''',
  528. true,
  529. ) as List?)
  530. ?.withoutNulls
  531. .map((x) => castToType<String>(x))
  532. .withoutNulls
  533. .toList();
  534. static String? establishmentPlaats(dynamic response) =>
  535. castToType<String>(getJsonField(
  536. response,
  537. r'''$[:].plaats''',
  538. ));
  539. static List<String>? establishmentFotoos(dynamic response) => (getJsonField(
  540. response,
  541. r'''$[:].fotoos''',
  542. true,
  543. ) as List?)
  544. ?.withoutNulls
  545. .map((x) => castToType<String>(x))
  546. .withoutNulls
  547. .toList();
  548. static List<String>? establishmentCryptocoins(dynamic response) =>
  549. (getJsonField(
  550. response,
  551. r'''$[:].cryptocoins''',
  552. true,
  553. ) as List?)
  554. ?.withoutNulls
  555. .map((x) => castToType<String>(x))
  556. .withoutNulls
  557. .toList();
  558. static String? establishmentbezorgtijden(dynamic response) =>
  559. castToType<String>(getJsonField(
  560. response,
  561. r'''$[:].bezorgtijden''',
  562. ));
  563. static String? establishmentMinimaleorder(dynamic response) =>
  564. castToType<String>(getJsonField(
  565. response,
  566. r'''$[:].minimaleorder''',
  567. ));
  568. static String? establshmentTitel(dynamic response) =>
  569. castToType<String>(getJsonField(
  570. response,
  571. r'''$[:].titel''',
  572. ));
  573. static List<String>? establshmentBezorgtin(dynamic response) => (getJsonField(
  574. response,
  575. r'''$[:].bezorgtin''',
  576. true,
  577. ) as List?)
  578. ?.withoutNulls
  579. .map((x) => castToType<String>(x))
  580. .withoutNulls
  581. .toList();
  582. static String? establshmentKvk(dynamic response) =>
  583. castToType<String>(getJsonField(
  584. response,
  585. r'''$[:].kvk''',
  586. ));
  587. static String? establshmentBestellink(dynamic response) =>
  588. castToType<String>(getJsonField(
  589. response,
  590. r'''$[:].bestellink''',
  591. ));
  592. static String? establshmentInhoud(dynamic response) =>
  593. castToType<String>(getJsonField(
  594. response,
  595. r'''$[:].inhoud''',
  596. ));
  597. static String? establshmentOpeningUitzondering(dynamic response) =>
  598. castToType<String>(getJsonField(
  599. response,
  600. r'''$[:].openingstijdenuitzondering''',
  601. ));
  602. static String? establshmentLogo(dynamic response) =>
  603. castToType<String>(getJsonField(
  604. response,
  605. r'''$[:].logo''',
  606. ));
  607. static String? establishmentEntreeprijs(dynamic response) =>
  608. castToType<String>(getJsonField(
  609. response,
  610. r'''$[:].entreeprijs''',
  611. ));
  612. static List<String>? establishmentCategorie(dynamic response) =>
  613. (getJsonField(
  614. response,
  615. r'''$[:].categorie''',
  616. true,
  617. ) as List?)
  618. ?.withoutNulls
  619. .map((x) => castToType<String>(x))
  620. .withoutNulls
  621. .toList();
  622. static String? establishmentEntreeToelichting(dynamic response) =>
  623. castToType<String>(getJsonField(
  624. response,
  625. r'''$[:].toelichtingentree''',
  626. ));
  627. static String? establishmentURL(dynamic response) =>
  628. castToType<String>(getJsonField(
  629. response,
  630. r'''$[:].url''',
  631. ));
  632. }
  633. class HorecagelegenheidEventsCall {
  634. static Future<ApiCallResponse> call({
  635. String? horecanid,
  636. }) async {
  637. horecanid ??= '';
  638. return ApiManager.instance.makeApiCall(
  639. callName: 'HorecagelegenheidEvents',
  640. apiUrl:
  641. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
  642. callType: ApiCallType.GET,
  643. headers: {},
  644. params: {
  645. 'horecanid': horecanid,
  646. },
  647. returnBody: true,
  648. encodeBodyUtf8: false,
  649. decodeUtf8: true,
  650. cache: true,
  651. isStreamingApi: false,
  652. alwaysAllowBody: false,
  653. );
  654. }
  655. static String? horecaEventNid(dynamic response) =>
  656. castToType<String>(getJsonField(
  657. response,
  658. r'''$[:].nid''',
  659. ));
  660. static String? horecaEventBody(dynamic response) =>
  661. castToType<String>(getJsonField(
  662. response,
  663. r'''$[:].body''',
  664. ));
  665. static String? horecaEventLogo(dynamic response) =>
  666. castToType<String>(getJsonField(
  667. response,
  668. r'''$[:].logo''',
  669. ));
  670. static String? horecaEventDatum(dynamic response) =>
  671. castToType<String>(getJsonField(
  672. response,
  673. r'''$[:].datum''',
  674. ));
  675. static String? horecaEventTitel(dynamic response) =>
  676. castToType<String>(getJsonField(
  677. response,
  678. r'''$[:].titel''',
  679. ));
  680. static String? horecaEventInhoud(dynamic response) =>
  681. castToType<String>(getJsonField(
  682. response,
  683. r'''$[:].inhoud''',
  684. ));
  685. static List<String>? horecaEventCategorie(dynamic response) => (getJsonField(
  686. response,
  687. r'''$[:].categorie''',
  688. true,
  689. ) as List?)
  690. ?.withoutNulls
  691. .map((x) => castToType<String>(x))
  692. .withoutNulls
  693. .toList();
  694. static List? items(dynamic response) => getJsonField(
  695. response,
  696. r'''$[:]''',
  697. true,
  698. ) as List?;
  699. }
  700. class GemeentenCall {
  701. static Future<ApiCallResponse> call({
  702. String? provincieid = '',
  703. }) async {
  704. return ApiManager.instance.makeApiCall(
  705. callName: 'gemeenten',
  706. apiUrl:
  707. 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
  708. callType: ApiCallType.GET,
  709. headers: {},
  710. params: {
  711. 'provincieid': provincieid,
  712. },
  713. returnBody: true,
  714. encodeBodyUtf8: false,
  715. decodeUtf8: true,
  716. cache: true,
  717. isStreamingApi: false,
  718. alwaysAllowBody: false,
  719. );
  720. }
  721. static String? gemeenteId(dynamic response) =>
  722. castToType<String>(getJsonField(
  723. response,
  724. r'''$[:].gemeenteid''',
  725. ));
  726. static String? gemeenteName(dynamic response) =>
  727. castToType<String>(getJsonField(
  728. response,
  729. r'''$[:].gemeentename''',
  730. ));
  731. }
  732. class ProvinciesCall {
  733. static Future<ApiCallResponse> call() async {
  734. return ApiManager.instance.makeApiCall(
  735. callName: 'provincies',
  736. apiUrl:
  737. 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
  738. callType: ApiCallType.GET,
  739. headers: {},
  740. params: {},
  741. returnBody: true,
  742. encodeBodyUtf8: false,
  743. decodeUtf8: true,
  744. cache: true,
  745. isStreamingApi: false,
  746. alwaysAllowBody: false,
  747. );
  748. }
  749. static List<String>? provincieId(dynamic response) => (getJsonField(
  750. response,
  751. r'''$[:].provincieid''',
  752. true,
  753. ) as List?)
  754. ?.withoutNulls
  755. .map((x) => castToType<String>(x))
  756. .withoutNulls
  757. .toList();
  758. static List<String>? provincieName(dynamic response) => (getJsonField(
  759. response,
  760. r'''$[:].provinciename''',
  761. true,
  762. ) as List?)
  763. ?.withoutNulls
  764. .map((x) => castToType<String>(x))
  765. .withoutNulls
  766. .toList();
  767. static List<String>? provinciedescription(dynamic response) => (getJsonField(
  768. response,
  769. r'''$[:].provinciedescription''',
  770. true,
  771. ) as List?)
  772. ?.withoutNulls
  773. .map((x) => castToType<String>(x))
  774. .withoutNulls
  775. .toList();
  776. }
  777. class EvenementCall {
  778. static Future<ApiCallResponse> call({
  779. String? nid = '0',
  780. }) async {
  781. return ApiManager.instance.makeApiCall(
  782. callName: 'Evenement',
  783. apiUrl:
  784. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflow_events.json?display_id=services_1',
  785. callType: ApiCallType.GET,
  786. headers: {},
  787. params: {
  788. 'nid': nid,
  789. },
  790. returnBody: true,
  791. encodeBodyUtf8: false,
  792. decodeUtf8: true,
  793. cache: true,
  794. isStreamingApi: false,
  795. alwaysAllowBody: false,
  796. );
  797. }
  798. static String? eventNid(dynamic response) => castToType<String>(getJsonField(
  799. response,
  800. r'''$[0].nid''',
  801. ));
  802. static String? eventTitle(dynamic response) =>
  803. castToType<String>(getJsonField(
  804. response,
  805. r'''$[0].title''',
  806. ));
  807. static String? eventDate(dynamic response) => castToType<String>(getJsonField(
  808. response,
  809. r'''$[0].datum''',
  810. ));
  811. static String? eventLogog(dynamic response) =>
  812. castToType<String>(getJsonField(
  813. response,
  814. r'''$[0].logo''',
  815. ));
  816. static String? eventAdres(dynamic response) =>
  817. castToType<String>(getJsonField(
  818. response,
  819. r'''$[0].adres''',
  820. ));
  821. static String? eventPlaats(dynamic response) =>
  822. castToType<String>(getJsonField(
  823. response,
  824. r'''$[0].plaats''',
  825. ));
  826. static List<String>? eventCategorie(dynamic response) => (getJsonField(
  827. response,
  828. r'''$[0].categorie''',
  829. true,
  830. ) as List?)
  831. ?.withoutNulls
  832. .map((x) => castToType<String>(x))
  833. .withoutNulls
  834. .toList();
  835. static String? eventBody(dynamic response) => castToType<String>(getJsonField(
  836. response,
  837. r'''$[0].body''',
  838. ));
  839. static String? eventWebsiteg(dynamic response) =>
  840. castToType<String>(getJsonField(
  841. response,
  842. r'''$[0].website''',
  843. ));
  844. static List<String>? eventFotoos(dynamic response) => (getJsonField(
  845. response,
  846. r'''$[0].fotos''',
  847. true,
  848. ) as List?)
  849. ?.withoutNulls
  850. .map((x) => castToType<String>(x))
  851. .withoutNulls
  852. .toList();
  853. static String? eventEntreeprijs(dynamic response) =>
  854. castToType<String>(getJsonField(
  855. response,
  856. r'''$[0].entreeprijs''',
  857. ));
  858. static String? eventEntreeToelichting(dynamic response) =>
  859. castToType<String>(getJsonField(
  860. response,
  861. r'''$[0].entreetoelichting''',
  862. ));
  863. static String? eventContact(dynamic response) =>
  864. castToType<String>(getJsonField(
  865. response,
  866. r'''$[0].contact''',
  867. ));
  868. static String? eventHorecagelegenheidnid(dynamic response) =>
  869. castToType<String>(getJsonField(
  870. response,
  871. r'''$[0].horecagelegenheidnid''',
  872. ));
  873. static String? eventOrganisator(dynamic response) =>
  874. castToType<String>(getJsonField(
  875. response,
  876. r'''$[0].organisator''',
  877. ));
  878. }
  879. class HorecagelegenheidoverzichtCall {
  880. static Future<ApiCallResponse> call({
  881. String? horcat = '17967',
  882. String? townid = '',
  883. String? displayId = 'services_1',
  884. int? page = 0,
  885. }) async {
  886. return ApiManager.instance.makeApiCall(
  887. callName: 'Horecagelegenheidoverzicht',
  888. apiUrl:
  889. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel_establishments.json',
  890. callType: ApiCallType.GET,
  891. headers: {},
  892. params: {
  893. 'horcat': horcat,
  894. 'townid': townid,
  895. 'display_id': displayId,
  896. 'page': page,
  897. },
  898. returnBody: true,
  899. encodeBodyUtf8: false,
  900. decodeUtf8: true,
  901. cache: true,
  902. isStreamingApi: false,
  903. alwaysAllowBody: false,
  904. );
  905. }
  906. static String? establishmentNid(dynamic response) =>
  907. castToType<String>(getJsonField(
  908. response,
  909. r'''$[:].nid''',
  910. ));
  911. static String? establishmentTitel(dynamic response) =>
  912. castToType<String>(getJsonField(
  913. response,
  914. r'''$[:].titel''',
  915. ));
  916. static String? establishmentAdres(dynamic response) =>
  917. castToType<String>(getJsonField(
  918. response,
  919. r'''$[:].adres''',
  920. ));
  921. static String? establishmentPlaats(dynamic response) =>
  922. castToType<String>(getJsonField(
  923. response,
  924. r'''$[:].plaats''',
  925. ));
  926. static String? establishmentLogo(dynamic response) =>
  927. castToType<String>(getJsonField(
  928. response,
  929. r'''$[:].logo''',
  930. ));
  931. static List? establishmentCategorie(dynamic response) => getJsonField(
  932. response,
  933. r'''$[:].categorie''',
  934. true,
  935. ) as List?;
  936. static List? items(dynamic response) => getJsonField(
  937. response,
  938. r'''$[:]''',
  939. true,
  940. ) as List?;
  941. }
  942. class RequestNewPasswordCall {
  943. static Future<ApiCallResponse> call({
  944. String? name = '',
  945. }) async {
  946. final ffApiRequestBody = '''
  947. {"name": "[name]"}''';
  948. return ApiManager.instance.makeApiCall(
  949. callName: 'requestNewPassword',
  950. apiUrl:
  951. 'https://uitgaanskrant.com/nl/flutterdrup/user/request_new_password.json',
  952. callType: ApiCallType.POST,
  953. headers: {},
  954. params: {},
  955. body: ffApiRequestBody,
  956. bodyType: BodyType.JSON,
  957. returnBody: true,
  958. encodeBodyUtf8: false,
  959. decodeUtf8: true,
  960. cache: false,
  961. isStreamingApi: false,
  962. alwaysAllowBody: false,
  963. );
  964. }
  965. static String? errorMessage(dynamic response) =>
  966. castToType<String>(getJsonField(
  967. response,
  968. r'''$[0]''',
  969. ));
  970. }
  971. class MijnHorecagelegenhedenCall {
  972. static Future<ApiCallResponse> call({
  973. String? sessionName = '',
  974. String? sessid = '',
  975. }) async {
  976. return ApiManager.instance.makeApiCall(
  977. callName: 'MijnHorecagelegenheden',
  978. apiUrl:
  979. 'https://uitgaanskrant.com/nl/flutterdrup/mijn_horecagelegenheden.json',
  980. callType: ApiCallType.GET,
  981. headers: {
  982. 'Cookie': '${sessionName}=${sessid}',
  983. 'Accept': 'application/json',
  984. },
  985. params: {},
  986. returnBody: true,
  987. encodeBodyUtf8: false,
  988. decodeUtf8: false,
  989. cache: false,
  990. isStreamingApi: false,
  991. alwaysAllowBody: false,
  992. );
  993. }
  994. }
  995. class MijnStadsrechtenCall {
  996. static Future<ApiCallResponse> call({
  997. String? sessionName = '',
  998. String? sessid = '',
  999. }) async {
  1000. return ApiManager.instance.makeApiCall(
  1001. callName: 'MijnStadsrechten',
  1002. apiUrl: 'https://uitgaanskrant.com/nl/flutterdrup/mijn_stadsrechten.json',
  1003. callType: ApiCallType.GET,
  1004. headers: {
  1005. 'Cookie': '${sessionName}=${sessid}',
  1006. 'Accept': 'application/json',
  1007. },
  1008. params: {},
  1009. returnBody: true,
  1010. encodeBodyUtf8: false,
  1011. decodeUtf8: false,
  1012. cache: false,
  1013. isStreamingApi: false,
  1014. alwaysAllowBody: false,
  1015. );
  1016. }
  1017. }
  1018. class MijnAanmeldingenCall {
  1019. static Future<ApiCallResponse> call({
  1020. String? sessionName = '',
  1021. String? sessid = '',
  1022. int? page = 0,
  1023. int? limit = 50,
  1024. String? type = '',
  1025. String? komend = '',
  1026. }) async {
  1027. return ApiManager.instance.makeApiCall(
  1028. callName: 'MijnAanmeldingen',
  1029. apiUrl: 'https://uitgaanskrant.com/nl/flutterdrup/mijn_aanmeldingen.json',
  1030. callType: ApiCallType.GET,
  1031. headers: {
  1032. 'Cookie': '${sessionName}=${sessid}',
  1033. },
  1034. params: {
  1035. 'page': page,
  1036. 'limit': limit,
  1037. 'type': type,
  1038. 'komend': komend,
  1039. },
  1040. returnBody: true,
  1041. encodeBodyUtf8: false,
  1042. decodeUtf8: false,
  1043. cache: false,
  1044. isStreamingApi: false,
  1045. alwaysAllowBody: false,
  1046. );
  1047. }
  1048. static List? items(dynamic response) => getJsonField(
  1049. response,
  1050. r'''$[:]''',
  1051. true,
  1052. ) as List?;
  1053. }
  1054. class HorecacategorieenCall {
  1055. static Future<ApiCallResponse> call() async {
  1056. return ApiManager.instance.makeApiCall(
  1057. callName: 'Horecacategorieen',
  1058. apiUrl: 'https://uitgaanskrant.com/nl/flutterdrup/horecacategorieen.json',
  1059. callType: ApiCallType.GET,
  1060. headers: {},
  1061. params: {},
  1062. returnBody: true,
  1063. encodeBodyUtf8: false,
  1064. decodeUtf8: false,
  1065. cache: true,
  1066. isStreamingApi: false,
  1067. alwaysAllowBody: false,
  1068. );
  1069. }
  1070. }
  1071. class AanmeldingKloonbronCall {
  1072. static Future<ApiCallResponse> call({
  1073. String? sessionName = '',
  1074. String? sessid = '',
  1075. String? nid = '',
  1076. }) async {
  1077. return ApiManager.instance.makeApiCall(
  1078. callName: 'AanmeldingKloonbron',
  1079. apiUrl:
  1080. 'https://uitgaanskrant.com/nl/flutterdrup/aanmelding_kloonbron.json',
  1081. callType: ApiCallType.GET,
  1082. headers: {
  1083. 'Cookie': '${sessionName}=${sessid}',
  1084. },
  1085. params: {
  1086. 'nid': nid,
  1087. },
  1088. returnBody: true,
  1089. encodeBodyUtf8: false,
  1090. decodeUtf8: false,
  1091. cache: false,
  1092. isStreamingApi: false,
  1093. alwaysAllowBody: false,
  1094. );
  1095. }
  1096. }
  1097. class NieuwsbrievenCall {
  1098. static Future<ApiCallResponse> call({
  1099. String? sessionName = '',
  1100. String? sessid = '',
  1101. }) async {
  1102. return ApiManager.instance.makeApiCall(
  1103. callName: 'Nieuwsbrieven',
  1104. apiUrl: 'https://uitgaanskrant.com/nl/flutterdrup/nieuwsbrieven.json',
  1105. callType: ApiCallType.GET,
  1106. headers: {
  1107. 'Cookie': '${sessionName}=${sessid}',
  1108. 'Accept': 'application/json',
  1109. },
  1110. params: {},
  1111. returnBody: true,
  1112. encodeBodyUtf8: false,
  1113. decodeUtf8: false,
  1114. cache: false,
  1115. isStreamingApi: false,
  1116. alwaysAllowBody: false,
  1117. );
  1118. }
  1119. static List? items(dynamic response) => getJsonField(
  1120. response,
  1121. r'''$[:]''',
  1122. true,
  1123. ) as List?;
  1124. }
  1125. class ApiPagingParams {
  1126. int nextPageNumber = 0;
  1127. int numItems = 0;
  1128. dynamic lastResponse;
  1129. ApiPagingParams({
  1130. required this.nextPageNumber,
  1131. required this.numItems,
  1132. required this.lastResponse,
  1133. });
  1134. @override
  1135. String toString() =>
  1136. 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
  1137. }
  1138. String _toEncodable(dynamic item) {
  1139. return item;
  1140. }
  1141. String _serializeList(List? list) {
  1142. list ??= <String>[];
  1143. try {
  1144. return json.encode(list, toEncodable: _toEncodable);
  1145. } catch (_) {
  1146. if (kDebugMode) {
  1147. print("List serialization failed. Returning empty list.");
  1148. }
  1149. return '[]';
  1150. }
  1151. }
  1152. String _serializeJson(dynamic jsonVar, [bool isList = false]) {
  1153. jsonVar ??= (isList ? [] : {});
  1154. try {
  1155. return json.encode(jsonVar, toEncodable: _toEncodable);
  1156. } catch (_) {
  1157. if (kDebugMode) {
  1158. print("Json serialization failed. Returning empty json.");
  1159. }
  1160. return isList ? '[]' : '{}';
  1161. }
  1162. }
  1163. String? escapeStringForJson(String? input) {
  1164. if (input == null) {
  1165. return null;
  1166. }
  1167. return input
  1168. .replaceAll('\\', '\\\\')
  1169. .replaceAll('"', '\\"')
  1170. .replaceAll('\n', '\\n')
  1171. .replaceAll('\t', '\\t');
  1172. }