api_calls.dart 34 KB

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