api_calls.dart 33 KB

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