api_calls.dart 34 KB

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