api_calls.dart 34 KB

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