api_calls.dart 34 KB

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