api_calls.dart 34 KB

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