api_calls.dart 44 KB

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