api_calls.dart 33 KB

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