api_calls.dart 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560
  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. class LoginCall {
  10. static Future<ApiCallResponse> call({
  11. String? username = '',
  12. String? password = '',
  13. }) async {
  14. final ffApiRequestBody = '''
  15. {
  16. "username": "${escapeStringForJson(username)}",
  17. "password": "${escapeStringForJson(password)}"
  18. }''';
  19. return ApiManager.instance.makeApiCall(
  20. callName: 'login',
  21. apiUrl: 'https://uitgaanskrant.com/en/flutterdrup/user/login.json',
  22. callType: ApiCallType.POST,
  23. headers: {
  24. 'Content-Type': 'application/json',
  25. },
  26. params: {},
  27. body: ffApiRequestBody,
  28. bodyType: BodyType.JSON,
  29. returnBody: true,
  30. encodeBodyUtf8: false,
  31. decodeUtf8: false,
  32. cache: false,
  33. isStreamingApi: false,
  34. alwaysAllowBody: false,
  35. );
  36. }
  37. static String? loginSessionid(dynamic response) =>
  38. castToType<String>(getJsonField(
  39. response,
  40. r'''$.sessid''',
  41. ));
  42. static String? loginSessionsname(dynamic response) =>
  43. castToType<String>(getJsonField(
  44. response,
  45. r'''$.session_name''',
  46. ));
  47. static String? loginToken(dynamic response) =>
  48. castToType<String>(getJsonField(
  49. response,
  50. r'''$.token''',
  51. ));
  52. static String? loginUseruid(dynamic response) =>
  53. castToType<String>(getJsonField(
  54. response,
  55. r'''$.user.uid''',
  56. ));
  57. static String? loginUsername(dynamic response) =>
  58. castToType<String>(getJsonField(
  59. response,
  60. r'''$.user.name''',
  61. ));
  62. static String? loginEmail(dynamic response) =>
  63. castToType<String>(getJsonField(
  64. response,
  65. r'''$.user.mail''',
  66. ));
  67. }
  68. class ZZUserEstablishmentsTESTCall {
  69. static Future<ApiCallResponse> call({
  70. String? sessionname = '',
  71. String? sessionid = '',
  72. String? token = '',
  73. }) async {
  74. return ApiManager.instance.makeApiCall(
  75. callName: 'ZZ userEstablishments TEST',
  76. apiUrl:
  77. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflow_user_establishment.json?display_id=services_1',
  78. callType: ApiCallType.GET,
  79. headers: {
  80. 'Content-Type': 'application/json',
  81. 'Cookie': '${sessionname}=${sessionid}',
  82. },
  83. params: {},
  84. returnBody: true,
  85. encodeBodyUtf8: false,
  86. decodeUtf8: false,
  87. cache: false,
  88. isStreamingApi: false,
  89. alwaysAllowBody: false,
  90. );
  91. }
  92. static String? sessionid(dynamic response) => castToType<String>(getJsonField(
  93. response,
  94. r'''$.sessid''',
  95. ));
  96. static String? sessionname(dynamic response) =>
  97. castToType<String>(getJsonField(
  98. response,
  99. r'''$.session_name''',
  100. ));
  101. static String? token(dynamic response) => castToType<String>(getJsonField(
  102. response,
  103. r'''$.token''',
  104. ));
  105. static String? drupaluserid(dynamic response) =>
  106. castToType<String>(getJsonField(
  107. response,
  108. r'''$.user.uid''',
  109. ));
  110. static List<String>? establishmentTitle(dynamic response) => (getJsonField(
  111. response,
  112. r'''$[:].node_title''',
  113. true,
  114. ) as List?)
  115. ?.withoutNulls
  116. .map((x) => castToType<String>(x))
  117. .withoutNulls
  118. .toList();
  119. static List<String>? establishmentLogo(dynamic response) => (getJsonField(
  120. response,
  121. r'''$[:].logohoreca''',
  122. true,
  123. ) as List?)
  124. ?.withoutNulls
  125. .map((x) => castToType<String>(x))
  126. .withoutNulls
  127. .toList();
  128. static List<String>? establishmentNid(dynamic response) => (getJsonField(
  129. response,
  130. r'''$[:].nid''',
  131. true,
  132. ) as List?)
  133. ?.withoutNulls
  134. .map((x) => castToType<String>(x))
  135. .withoutNulls
  136. .toList();
  137. }
  138. class FavorietenAgendaCall {
  139. static Future<ApiCallResponse> call() async {
  140. return ApiManager.instance.makeApiCall(
  141. callName: 'FavorietenAgenda',
  142. apiUrl:
  143. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterfavorietenagenda.json?display_id=services_1',
  144. callType: ApiCallType.GET,
  145. headers: {
  146. 'Cookie':
  147. 'SSESSfb38a72b665678c06dea69b92d0e88c6=NPHBx1J_vK03xg3ysN3SjaPj3iWjefsIBXxxTWipEtI',
  148. 'Content-Type': 'application/json',
  149. 'Accept': 'application/json',
  150. 'X-CSRF-Token': 'I5pbUCTynNGlUObMFNzlXR0l6TM9bEGW51Fhxan44PY',
  151. 'X-Requested-With': 'XMLHttpRequest',
  152. },
  153. params: {},
  154. returnBody: true,
  155. encodeBodyUtf8: false,
  156. decodeUtf8: false,
  157. cache: false,
  158. isStreamingApi: true,
  159. alwaysAllowBody: false,
  160. );
  161. }
  162. static String? sessionid(dynamic response) => castToType<String>(getJsonField(
  163. response,
  164. r'''$.sessid''',
  165. ));
  166. static String? sessionname(dynamic response) =>
  167. castToType<String>(getJsonField(
  168. response,
  169. r'''$.session_name''',
  170. ));
  171. static String? token(dynamic response) => castToType<String>(getJsonField(
  172. response,
  173. r'''$.token''',
  174. ));
  175. static String? drupaluserid(dynamic response) =>
  176. castToType<String>(getJsonField(
  177. response,
  178. r'''$.user.uid''',
  179. ));
  180. static String? establishmentTitle(dynamic response) =>
  181. castToType<String>(getJsonField(
  182. response,
  183. r'''$[:].node_title''',
  184. ));
  185. static String? establishmentLogo(dynamic response) =>
  186. castToType<String>(getJsonField(
  187. response,
  188. r'''$[:].logohoreca''',
  189. ));
  190. static String? establishmentNid(dynamic response) =>
  191. castToType<String>(getJsonField(
  192. response,
  193. r'''$[:].nid''',
  194. ));
  195. }
  196. class GetcsrfCall {
  197. static Future<ApiCallResponse> call() async {
  198. return ApiManager.instance.makeApiCall(
  199. callName: 'getcsrf',
  200. apiUrl: 'https://uitgaanskrant.com/en/flutterdrup/user/token.json',
  201. callType: ApiCallType.POST,
  202. headers: {},
  203. params: {},
  204. bodyType: BodyType.JSON,
  205. returnBody: true,
  206. encodeBodyUtf8: false,
  207. decodeUtf8: false,
  208. cache: false,
  209. isStreamingApi: false,
  210. alwaysAllowBody: false,
  211. );
  212. }
  213. static String? getCsrfToken(dynamic response) =>
  214. castToType<String>(getJsonField(
  215. response,
  216. r'''$.token''',
  217. ));
  218. }
  219. class ZZZhomeSliderCall {
  220. static Future<ApiCallResponse> call({
  221. String? displayId = 'services_1',
  222. }) async {
  223. return ApiManager.instance.makeApiCall(
  224. callName: 'ZZZhomeSlider',
  225. apiUrl:
  226. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json',
  227. callType: ApiCallType.GET,
  228. headers: {
  229. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  230. },
  231. params: {
  232. 'display_id': displayId,
  233. },
  234. returnBody: true,
  235. encodeBodyUtf8: false,
  236. decodeUtf8: false,
  237. cache: false,
  238. isStreamingApi: false,
  239. alwaysAllowBody: false,
  240. );
  241. }
  242. static String? homesNid(dynamic response) => castToType<String>(getJsonField(
  243. response,
  244. r'''$[:].nid''',
  245. ));
  246. static String? homesAdres(dynamic response) =>
  247. castToType<String>(getJsonField(
  248. response,
  249. r'''$[:].adres''',
  250. ));
  251. static String? homesHoreca(dynamic response) =>
  252. castToType<String>(getJsonField(
  253. response,
  254. r'''$[:].horecagelegenheid''',
  255. ));
  256. static String? homesTown(dynamic response) => castToType<String>(getJsonField(
  257. response,
  258. r'''$[:].plaats''',
  259. ));
  260. static String? homesDatum(dynamic response) =>
  261. castToType<String>(getJsonField(
  262. response,
  263. r'''$[:].datum''',
  264. ));
  265. static List<String>? homesCategorie(dynamic response) => (getJsonField(
  266. response,
  267. r'''$[:].categorie''',
  268. true,
  269. ) as List?)
  270. ?.withoutNulls
  271. .map((x) => castToType<String>(x))
  272. .withoutNulls
  273. .toList();
  274. static String? homesTitel(dynamic response) =>
  275. castToType<String>(getJsonField(
  276. response,
  277. r'''$[:].titel''',
  278. ));
  279. static String? homesLogo(dynamic response) => castToType<String>(getJsonField(
  280. response,
  281. r'''$[:].logo''',
  282. ));
  283. static String? homesInhoud(dynamic response) =>
  284. castToType<String>(getJsonField(
  285. response,
  286. r'''$[:].inhoud''',
  287. ));
  288. static String? homesUrl(dynamic response) => castToType<String>(getJsonField(
  289. response,
  290. r'''$[:].url''',
  291. ));
  292. static String? homesHorecaID(dynamic response) =>
  293. castToType<String>(getJsonField(
  294. response,
  295. r'''$[:].horecagelegenheidid''',
  296. ));
  297. }
  298. class HomeSlidershortDateCall {
  299. static Future<ApiCallResponse> call() async {
  300. return ApiManager.instance.makeApiCall(
  301. callName: 'homeSlidershortDate',
  302. apiUrl:
  303. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_1',
  304. callType: ApiCallType.GET,
  305. headers: {
  306. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  307. },
  308. params: {},
  309. returnBody: true,
  310. encodeBodyUtf8: false,
  311. decodeUtf8: false,
  312. cache: false,
  313. isStreamingApi: false,
  314. alwaysAllowBody: false,
  315. );
  316. }
  317. static String? homesNid(dynamic response) => castToType<String>(getJsonField(
  318. response,
  319. r'''$[:].nid''',
  320. ));
  321. static String? homesAdres(dynamic response) =>
  322. castToType<String>(getJsonField(
  323. response,
  324. r'''$[:].adres''',
  325. ));
  326. static String? homesEstablishment(dynamic response) =>
  327. castToType<String>(getJsonField(
  328. response,
  329. r'''$[:].horecagelegenheid''',
  330. ));
  331. static String? homesTown(dynamic response) => castToType<String>(getJsonField(
  332. response,
  333. r'''$[:].plaats''',
  334. ));
  335. static String? homesDatum(dynamic response) =>
  336. castToType<String>(getJsonField(
  337. response,
  338. r'''$[:].datum''',
  339. ));
  340. static List<String>? homesCategorie(dynamic response) => (getJsonField(
  341. response,
  342. r'''$[:].categorie''',
  343. true,
  344. ) as List?)
  345. ?.withoutNulls
  346. .map((x) => castToType<String>(x))
  347. .withoutNulls
  348. .toList();
  349. static String? homesTitel(dynamic response) =>
  350. castToType<String>(getJsonField(
  351. response,
  352. r'''$[:].titel''',
  353. ));
  354. static String? homesLogo(dynamic response) => castToType<String>(getJsonField(
  355. response,
  356. r'''$[:].logo''',
  357. ));
  358. static String? homesInhoud(dynamic response) =>
  359. castToType<String>(getJsonField(
  360. response,
  361. r'''$[:].inhoud''',
  362. ));
  363. static String? homesUrl(dynamic response) => castToType<String>(getJsonField(
  364. response,
  365. r'''$[:].url''',
  366. ));
  367. }
  368. class HomeTabelCall {
  369. static Future<ApiCallResponse> call({
  370. int? page = 0,
  371. }) async {
  372. return ApiManager.instance.makeApiCall(
  373. callName: 'homeTabel',
  374. apiUrl:
  375. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_2',
  376. callType: ApiCallType.GET,
  377. headers: {
  378. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  379. },
  380. params: {
  381. 'page': page,
  382. },
  383. returnBody: true,
  384. encodeBodyUtf8: false,
  385. decodeUtf8: false,
  386. cache: false,
  387. isStreamingApi: false,
  388. alwaysAllowBody: false,
  389. );
  390. }
  391. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  392. response,
  393. r'''$[:].nid''',
  394. ));
  395. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  396. response,
  397. r'''$[:].adres''',
  398. ));
  399. static String? homeEstablishment(dynamic response) =>
  400. castToType<String>(getJsonField(
  401. response,
  402. r'''$[:].horecagelegenheid''',
  403. ));
  404. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  405. response,
  406. r'''$[:].datum''',
  407. ));
  408. static String? homePlaats(dynamic response) =>
  409. castToType<String>(getJsonField(
  410. response,
  411. r'''$[:].plaats''',
  412. ));
  413. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  414. response,
  415. r'''$[:].categorie''',
  416. true,
  417. ) as List?)
  418. ?.withoutNulls
  419. .map((x) => castToType<String>(x))
  420. .withoutNulls
  421. .toList();
  422. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  423. response,
  424. r'''$[:].titel''',
  425. ));
  426. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  427. response,
  428. r'''$[:].logo''',
  429. ));
  430. static String? homeInhoud(dynamic response) =>
  431. castToType<String>(getJsonField(
  432. response,
  433. r'''$[:].inhoud''',
  434. ));
  435. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  436. response,
  437. r'''$[:].url''',
  438. ));
  439. static String? homeEstablishmentID(dynamic response) =>
  440. castToType<String>(getJsonField(
  441. response,
  442. r'''$[:].horecagelegenheidid''',
  443. ));
  444. }
  445. class ZZhomeUitgaanCall {
  446. static Future<ApiCallResponse> call({
  447. int? page = 0,
  448. }) async {
  449. return ApiManager.instance.makeApiCall(
  450. callName: 'ZZhome uitgaan',
  451. apiUrl:
  452. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  453. callType: ApiCallType.GET,
  454. headers: {
  455. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  456. },
  457. params: {
  458. 'page': page,
  459. },
  460. returnBody: true,
  461. encodeBodyUtf8: false,
  462. decodeUtf8: false,
  463. cache: false,
  464. isStreamingApi: false,
  465. alwaysAllowBody: false,
  466. );
  467. }
  468. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  469. response,
  470. r'''$[:].nid''',
  471. ));
  472. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  473. response,
  474. r'''$[:].adres''',
  475. ));
  476. static String? homeEstablishment(dynamic response) =>
  477. castToType<String>(getJsonField(
  478. response,
  479. r'''$[:].horecagelegenheid''',
  480. ));
  481. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  482. response,
  483. r'''$[:].datum''',
  484. ));
  485. static String? homePlaats(dynamic response) =>
  486. castToType<String>(getJsonField(
  487. response,
  488. r'''$[:].plaats''',
  489. ));
  490. static String? homeCategorie(dynamic response) =>
  491. castToType<String>(getJsonField(
  492. response,
  493. r'''$[:].categorie''',
  494. ));
  495. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  496. response,
  497. r'''$[:].titel''',
  498. ));
  499. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  500. response,
  501. r'''$[:].logo''',
  502. ));
  503. static String? homeInhoud(dynamic response) =>
  504. castToType<String>(getJsonField(
  505. response,
  506. r'''$[:].inhoud''',
  507. ));
  508. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  509. response,
  510. r'''$[:].url''',
  511. ));
  512. }
  513. class HomeSliderCall {
  514. static Future<ApiCallResponse> call({
  515. String? displayId = 'services_1',
  516. }) async {
  517. return ApiManager.instance.makeApiCall(
  518. callName: 'HomeSlider',
  519. apiUrl:
  520. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_1',
  521. callType: ApiCallType.GET,
  522. headers: {
  523. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  524. },
  525. params: {
  526. 'display_id': displayId,
  527. },
  528. returnBody: true,
  529. encodeBodyUtf8: false,
  530. decodeUtf8: false,
  531. cache: false,
  532. isStreamingApi: false,
  533. alwaysAllowBody: false,
  534. );
  535. }
  536. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  537. response,
  538. r'''$[:].nid''',
  539. ));
  540. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  541. response,
  542. r'''$[:].adres''',
  543. ));
  544. static String? tabelHorecagelegenheid(dynamic response) =>
  545. castToType<String>(getJsonField(
  546. response,
  547. r'''$[:].horecagelegenheid''',
  548. ));
  549. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  550. response,
  551. r'''$[:].datum''',
  552. ));
  553. static String? homePlaats(dynamic response) =>
  554. castToType<String>(getJsonField(
  555. response,
  556. r'''$[:].plaats''',
  557. ));
  558. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  559. response,
  560. r'''$[:].categorie''',
  561. true,
  562. ) as List?)
  563. ?.withoutNulls
  564. .map((x) => castToType<String>(x))
  565. .withoutNulls
  566. .toList();
  567. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  568. response,
  569. r'''$[:].titel''',
  570. ));
  571. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  572. response,
  573. r'''$[:].logo''',
  574. ));
  575. static String? homeInhoud(dynamic response) =>
  576. castToType<String>(getJsonField(
  577. response,
  578. r'''$[:].inhoud''',
  579. ));
  580. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  581. response,
  582. r'''$[:].url''',
  583. ));
  584. static String? tabelHorecagelegenheidID(dynamic response) =>
  585. castToType<String>(getJsonField(
  586. response,
  587. r'''$[:].horecagelegenheidid''',
  588. ));
  589. }
  590. class UitgaanstabelCall {
  591. static Future<ApiCallResponse> call({
  592. int? page = 0,
  593. String? townid = '0',
  594. String? displayId,
  595. }) async {
  596. displayId ??= '';
  597. return ApiManager.instance.makeApiCall(
  598. callName: 'Uitgaanstabel',
  599. apiUrl:
  600. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  601. callType: ApiCallType.GET,
  602. headers: {
  603. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  604. },
  605. params: {
  606. 'page': page,
  607. 'townid': townid,
  608. 'display_id': displayId,
  609. },
  610. returnBody: true,
  611. encodeBodyUtf8: false,
  612. decodeUtf8: false,
  613. cache: false,
  614. isStreamingApi: false,
  615. alwaysAllowBody: false,
  616. );
  617. }
  618. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  619. response,
  620. r'''$[:].nid''',
  621. ));
  622. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  623. response,
  624. r'''$[:].adres''',
  625. ));
  626. static String? tabelHorecagelegenheid(dynamic response) =>
  627. castToType<String>(getJsonField(
  628. response,
  629. r'''$[:].horecagelegenheid''',
  630. ));
  631. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  632. response,
  633. r'''$[:].datum''',
  634. ));
  635. static String? homePlaats(dynamic response) =>
  636. castToType<String>(getJsonField(
  637. response,
  638. r'''$[:].plaats''',
  639. ));
  640. static List<String>? homeCategorie(dynamic response) => (getJsonField(
  641. response,
  642. r'''$[:].categorie''',
  643. true,
  644. ) as List?)
  645. ?.withoutNulls
  646. .map((x) => castToType<String>(x))
  647. .withoutNulls
  648. .toList();
  649. static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
  650. response,
  651. r'''$[:].titel''',
  652. ));
  653. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  654. response,
  655. r'''$[:].logo''',
  656. ));
  657. static String? homeInhoud(dynamic response) =>
  658. castToType<String>(getJsonField(
  659. response,
  660. r'''$[:].inhoud''',
  661. ));
  662. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  663. response,
  664. r'''$[:].url''',
  665. ));
  666. static String? tabelHorecagelegenheidID(dynamic response) =>
  667. castToType<String>(getJsonField(
  668. response,
  669. r'''$[:].horecagelegenheidid''',
  670. ));
  671. }
  672. class UitgaanSliderCall {
  673. static Future<ApiCallResponse> call({
  674. int? page = 0,
  675. String? townid = '0',
  676. String? displayId,
  677. }) async {
  678. displayId ??= '';
  679. return ApiManager.instance.makeApiCall(
  680. callName: 'UitgaanSlider',
  681. apiUrl:
  682. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
  683. callType: ApiCallType.GET,
  684. headers: {
  685. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  686. },
  687. params: {
  688. 'page': page,
  689. 'townid': townid,
  690. 'display_id': displayId,
  691. },
  692. returnBody: true,
  693. encodeBodyUtf8: false,
  694. decodeUtf8: false,
  695. cache: false,
  696. isStreamingApi: false,
  697. alwaysAllowBody: false,
  698. );
  699. }
  700. static String? homeNid(dynamic response) => castToType<String>(getJsonField(
  701. response,
  702. r'''$[:].nid''',
  703. ));
  704. static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
  705. response,
  706. r'''$[:].adres''',
  707. ));
  708. static String? tabelHorecagelegenheid(dynamic response) =>
  709. castToType<String>(getJsonField(
  710. response,
  711. r'''$[:].horecagelegenheid''',
  712. ));
  713. static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
  714. response,
  715. r'''$[:].datum''',
  716. ));
  717. static String? homePlaats(dynamic response) =>
  718. castToType<String>(getJsonField(
  719. response,
  720. r'''$[:].plaats''',
  721. ));
  722. static List<String>? homeCategorie(dynamic response) => (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? homeTitel(dynamic response) => castToType<String>(getJsonField(
  732. response,
  733. r'''$[:].titel''',
  734. ));
  735. static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
  736. response,
  737. r'''$[:].logo''',
  738. ));
  739. static String? homeInhoud(dynamic response) =>
  740. castToType<String>(getJsonField(
  741. response,
  742. r'''$[:].inhoud''',
  743. ));
  744. static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
  745. response,
  746. r'''$[:].url''',
  747. ));
  748. static String? tabelHorecagelegenheidID(dynamic response) =>
  749. castToType<String>(getJsonField(
  750. response,
  751. r'''$[:].horecagelegenheidid''',
  752. ));
  753. }
  754. class EstablishmentsNewCall {
  755. static Future<ApiCallResponse> call({
  756. int? townid = 28695,
  757. }) async {
  758. return ApiManager.instance.makeApiCall(
  759. callName: 'EstablishmentsNew',
  760. apiUrl:
  761. 'https://uitgaanskrant.com/en/flutterdrup/views/_flutterflowmobiel_establishment_new.json?display_id=services_1&townid=28695',
  762. callType: ApiCallType.GET,
  763. headers: {
  764. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  765. },
  766. params: {
  767. 'townid': townid,
  768. },
  769. returnBody: true,
  770. encodeBodyUtf8: false,
  771. decodeUtf8: false,
  772. cache: false,
  773. isStreamingApi: false,
  774. alwaysAllowBody: false,
  775. );
  776. }
  777. static String? establishmentNid(dynamic response) =>
  778. castToType<String>(getJsonField(
  779. response,
  780. r'''$[:].nid''',
  781. ));
  782. static String? establishmentAddress(dynamic response) =>
  783. castToType<String>(getJsonField(
  784. response,
  785. r'''$[:].adres''',
  786. ));
  787. static String? establishmentTitel(dynamic response) =>
  788. castToType<String>(getJsonField(
  789. response,
  790. r'''$[:].titel''',
  791. ));
  792. static String? establishmentPlaats(dynamic response) =>
  793. castToType<String>(getJsonField(
  794. response,
  795. r'''$[:].plaats''',
  796. ));
  797. static String? establishmentLogo(dynamic response) =>
  798. castToType<String>(getJsonField(
  799. response,
  800. r'''$[:].logo''',
  801. ));
  802. static String? establishmentCategorie(dynamic response) =>
  803. castToType<String>(getJsonField(
  804. response,
  805. r'''$[:].categorie''',
  806. ));
  807. }
  808. class EstablishmentInfoCall {
  809. static Future<ApiCallResponse> call({
  810. String? nid = '',
  811. }) async {
  812. return ApiManager.instance.makeApiCall(
  813. callName: 'EstablishmentInfo',
  814. apiUrl:
  815. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_info.json?display_id=services_1',
  816. callType: ApiCallType.GET,
  817. headers: {
  818. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  819. },
  820. params: {
  821. 'nid': nid,
  822. },
  823. returnBody: true,
  824. encodeBodyUtf8: false,
  825. decodeUtf8: false,
  826. cache: true,
  827. isStreamingApi: false,
  828. alwaysAllowBody: false,
  829. );
  830. }
  831. static String? establismentNid(dynamic response) =>
  832. castToType<String>(getJsonField(
  833. response,
  834. r'''$[:].nid''',
  835. ));
  836. static String? establishmentBezorgkosten(dynamic response) =>
  837. castToType<String>(getJsonField(
  838. response,
  839. r'''$[:].bezorgkosten''',
  840. ));
  841. static String? establishmentEmail(dynamic response) =>
  842. castToType<String>(getJsonField(
  843. response,
  844. r'''$[:].email''',
  845. ));
  846. static String? establishmentFacebook(dynamic response) =>
  847. castToType<String>(getJsonField(
  848. response,
  849. r'''$[:].facebook''',
  850. ));
  851. static String? establishmentInstagram(dynamic response) =>
  852. castToType<String>(getJsonField(
  853. response,
  854. r'''$[:].instagram''',
  855. ));
  856. static String? establishmentMenukaart(dynamic response) =>
  857. castToType<String>(getJsonField(
  858. response,
  859. r'''$[:].menukaart''',
  860. ));
  861. static String? establishmentOpeningstijden(dynamic response) =>
  862. castToType<String>(getJsonField(
  863. response,
  864. r'''$[:].openingstijden''',
  865. ));
  866. static String? establishmentTelefoonnummer(dynamic response) =>
  867. castToType<String>(getJsonField(
  868. response,
  869. r'''$[:].telefoonnummer''',
  870. ));
  871. static String? establishmentTwitter(dynamic response) =>
  872. castToType<String>(getJsonField(
  873. response,
  874. r'''$[:].twitter''',
  875. ));
  876. static String? establishmentWebsite(dynamic response) =>
  877. castToType<String>(getJsonField(
  878. response,
  879. r'''$[:].website''',
  880. ));
  881. static List<String>? establishmentbezorgbetaalopties(dynamic response) =>
  882. (getJsonField(
  883. response,
  884. r'''$[:].thuisbezorgtbetaalopties''',
  885. true,
  886. ) as List?)
  887. ?.withoutNulls
  888. .map((x) => castToType<String>(x))
  889. .withoutNulls
  890. .toList();
  891. static String? establishmentAdres(dynamic response) =>
  892. castToType<String>(getJsonField(
  893. response,
  894. r'''$[:].adres''',
  895. ));
  896. static List<String>? establishmentAfhaalopties(dynamic response) =>
  897. (getJsonField(
  898. response,
  899. r'''$[:].afhaalopties''',
  900. true,
  901. ) as List?)
  902. ?.withoutNulls
  903. .map((x) => castToType<String>(x))
  904. .withoutNulls
  905. .toList();
  906. static String? establishmentPlaats(dynamic response) =>
  907. castToType<String>(getJsonField(
  908. response,
  909. r'''$[:].plaats''',
  910. ));
  911. static List<String>? establishmentFotoos(dynamic response) => (getJsonField(
  912. response,
  913. r'''$[:].fotoos''',
  914. true,
  915. ) as List?)
  916. ?.withoutNulls
  917. .map((x) => castToType<String>(x))
  918. .withoutNulls
  919. .toList();
  920. static List<String>? establishmentCryptocoins(dynamic response) =>
  921. (getJsonField(
  922. response,
  923. r'''$[:].cryptocoins''',
  924. true,
  925. ) as List?)
  926. ?.withoutNulls
  927. .map((x) => castToType<String>(x))
  928. .withoutNulls
  929. .toList();
  930. static String? establishmentbezorgtijden(dynamic response) =>
  931. castToType<String>(getJsonField(
  932. response,
  933. r'''$[:].bezorgtijden''',
  934. ));
  935. static String? establishmentMinimaleorder(dynamic response) =>
  936. castToType<String>(getJsonField(
  937. response,
  938. r'''$[:].minimaleorder''',
  939. ));
  940. static String? establshmentTitel(dynamic response) =>
  941. castToType<String>(getJsonField(
  942. response,
  943. r'''$[:].titel''',
  944. ));
  945. static List<String>? establshmentBezorgtin(dynamic response) => (getJsonField(
  946. response,
  947. r'''$[:].bezorgtin''',
  948. true,
  949. ) as List?)
  950. ?.withoutNulls
  951. .map((x) => castToType<String>(x))
  952. .withoutNulls
  953. .toList();
  954. static String? establshmentKvk(dynamic response) =>
  955. castToType<String>(getJsonField(
  956. response,
  957. r'''$[:].kvk''',
  958. ));
  959. static String? establshmentBestellink(dynamic response) =>
  960. castToType<String>(getJsonField(
  961. response,
  962. r'''$[:].bestellink''',
  963. ));
  964. static String? establshmentInhoud(dynamic response) =>
  965. castToType<String>(getJsonField(
  966. response,
  967. r'''$[:].inhoud''',
  968. ));
  969. static String? establshmentOpeningUitzondering(dynamic response) =>
  970. castToType<String>(getJsonField(
  971. response,
  972. r'''$[:].openingstijdenuitzondering''',
  973. ));
  974. static String? establshmentLogo(dynamic response) =>
  975. castToType<String>(getJsonField(
  976. response,
  977. r'''$[:].logo''',
  978. ));
  979. static String? establishmentEntreeprijs(dynamic response) =>
  980. castToType<String>(getJsonField(
  981. response,
  982. r'''$[:].entreeprijs''',
  983. ));
  984. static List<String>? establishmentCategorie(dynamic response) =>
  985. (getJsonField(
  986. response,
  987. r'''$[:].categorie''',
  988. true,
  989. ) as List?)
  990. ?.withoutNulls
  991. .map((x) => castToType<String>(x))
  992. .withoutNulls
  993. .toList();
  994. static String? establishmentEntreeToelichting(dynamic response) =>
  995. castToType<String>(getJsonField(
  996. response,
  997. r'''$[:].toelichtingentree''',
  998. ));
  999. static String? establishmentURL(dynamic response) =>
  1000. castToType<String>(getJsonField(
  1001. response,
  1002. r'''$[:].url''',
  1003. ));
  1004. }
  1005. class HorecagelegenheidEventsCall {
  1006. static Future<ApiCallResponse> call({
  1007. String? horecanid,
  1008. }) async {
  1009. horecanid ??= '';
  1010. return ApiManager.instance.makeApiCall(
  1011. callName: 'HorecagelegenheidEvents',
  1012. apiUrl:
  1013. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
  1014. callType: ApiCallType.GET,
  1015. headers: {
  1016. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1017. },
  1018. params: {
  1019. 'horecanid': horecanid,
  1020. },
  1021. returnBody: true,
  1022. encodeBodyUtf8: false,
  1023. decodeUtf8: false,
  1024. cache: false,
  1025. isStreamingApi: false,
  1026. alwaysAllowBody: false,
  1027. );
  1028. }
  1029. static String? horecaEventNid(dynamic response) =>
  1030. castToType<String>(getJsonField(
  1031. response,
  1032. r'''$[:].nid''',
  1033. ));
  1034. static String? horecaEventBody(dynamic response) =>
  1035. castToType<String>(getJsonField(
  1036. response,
  1037. r'''$[:].body''',
  1038. ));
  1039. static String? horecaEventLogo(dynamic response) =>
  1040. castToType<String>(getJsonField(
  1041. response,
  1042. r'''$[:].logo''',
  1043. ));
  1044. static String? horecaEventDatum(dynamic response) =>
  1045. castToType<String>(getJsonField(
  1046. response,
  1047. r'''$[:].datum''',
  1048. ));
  1049. static String? horecaEventTitel(dynamic response) =>
  1050. castToType<String>(getJsonField(
  1051. response,
  1052. r'''$[:].titel''',
  1053. ));
  1054. static String? horecaEventInhoud(dynamic response) =>
  1055. castToType<String>(getJsonField(
  1056. response,
  1057. r'''$[:].inhoud''',
  1058. ));
  1059. static List<String>? horecaEventCategorie(dynamic response) => (getJsonField(
  1060. response,
  1061. r'''$[:].categorie''',
  1062. true,
  1063. ) as List?)
  1064. ?.withoutNulls
  1065. .map((x) => castToType<String>(x))
  1066. .withoutNulls
  1067. .toList();
  1068. }
  1069. class ZzEstablishmentEventsCopyCall {
  1070. static Future<ApiCallResponse> call({
  1071. int? horecanid = 75411,
  1072. }) async {
  1073. return ApiManager.instance.makeApiCall(
  1074. callName: 'zzEstablishmentEvents Copy',
  1075. apiUrl:
  1076. 'https://devbob.uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
  1077. callType: ApiCallType.GET,
  1078. headers: {
  1079. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1080. },
  1081. params: {
  1082. 'horecanid': horecanid,
  1083. },
  1084. returnBody: true,
  1085. encodeBodyUtf8: false,
  1086. decodeUtf8: false,
  1087. cache: false,
  1088. isStreamingApi: false,
  1089. alwaysAllowBody: false,
  1090. );
  1091. }
  1092. static String? estEventNid(dynamic response) =>
  1093. castToType<String>(getJsonField(
  1094. response,
  1095. r'''$[:].nid''',
  1096. ));
  1097. static String? estEventTitle(dynamic response) =>
  1098. castToType<String>(getJsonField(
  1099. response,
  1100. r'''$[:].title''',
  1101. ));
  1102. static String? estEventAdres(dynamic response) =>
  1103. castToType<String>(getJsonField(
  1104. response,
  1105. r'''$[:].adres''',
  1106. ));
  1107. static dynamic estEventEntreeselect(dynamic response) => getJsonField(
  1108. response,
  1109. r'''$[:].entreeselect''',
  1110. );
  1111. static String? estEventBody(dynamic response) =>
  1112. castToType<String>(getJsonField(
  1113. response,
  1114. r'''$[:].body''',
  1115. ));
  1116. static String? estEventEntreeToelichting(dynamic response) =>
  1117. castToType<String>(getJsonField(
  1118. response,
  1119. r'''$[:].entreetoelichting''',
  1120. ));
  1121. static String? estEventTickets(dynamic response) =>
  1122. castToType<String>(getJsonField(
  1123. response,
  1124. r'''$[:].tickets''',
  1125. ));
  1126. static String? estEventWebsite(dynamic response) =>
  1127. castToType<String>(getJsonField(
  1128. response,
  1129. r'''$[:].website''',
  1130. ));
  1131. static String? estEventLogo(dynamic response) =>
  1132. castToType<String>(getJsonField(
  1133. response,
  1134. r'''$[:].logo''',
  1135. ));
  1136. static List<String>? estEventFotoos(dynamic response) => (getJsonField(
  1137. response,
  1138. r'''$[:].fotoos''',
  1139. true,
  1140. ) as List?)
  1141. ?.withoutNulls
  1142. .map((x) => castToType<String>(x))
  1143. .withoutNulls
  1144. .toList();
  1145. static String? estEventCategory(dynamic response) =>
  1146. castToType<String>(getJsonField(
  1147. response,
  1148. r'''$[:].category''',
  1149. ));
  1150. static String? estEventDatum(dynamic response) =>
  1151. castToType<String>(getJsonField(
  1152. response,
  1153. r'''$[:].datum''',
  1154. ));
  1155. }
  1156. class GemeentenCall {
  1157. static Future<ApiCallResponse> call({
  1158. String? provincieid = '',
  1159. }) async {
  1160. return ApiManager.instance.makeApiCall(
  1161. callName: 'gemeenten',
  1162. apiUrl:
  1163. 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
  1164. callType: ApiCallType.GET,
  1165. headers: {
  1166. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1167. },
  1168. params: {
  1169. 'provincieid': provincieid,
  1170. },
  1171. returnBody: true,
  1172. encodeBodyUtf8: false,
  1173. decodeUtf8: false,
  1174. cache: false,
  1175. isStreamingApi: false,
  1176. alwaysAllowBody: false,
  1177. );
  1178. }
  1179. static String? gemeenteId(dynamic response) =>
  1180. castToType<String>(getJsonField(
  1181. response,
  1182. r'''$[:].gemeenteid''',
  1183. ));
  1184. static String? gemeenteName(dynamic response) =>
  1185. castToType<String>(getJsonField(
  1186. response,
  1187. r'''$[:].gemeentename''',
  1188. ));
  1189. }
  1190. class ProvinciesCall {
  1191. static Future<ApiCallResponse> call() async {
  1192. return ApiManager.instance.makeApiCall(
  1193. callName: 'provincies',
  1194. apiUrl:
  1195. 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
  1196. callType: ApiCallType.GET,
  1197. headers: {
  1198. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1199. },
  1200. params: {},
  1201. returnBody: true,
  1202. encodeBodyUtf8: false,
  1203. decodeUtf8: false,
  1204. cache: false,
  1205. isStreamingApi: false,
  1206. alwaysAllowBody: false,
  1207. );
  1208. }
  1209. static String? provincieId(dynamic response) =>
  1210. castToType<String>(getJsonField(
  1211. response,
  1212. r'''$[:].provincieid''',
  1213. ));
  1214. static String? provincieName(dynamic response) =>
  1215. castToType<String>(getJsonField(
  1216. response,
  1217. r'''$[:].provinciename''',
  1218. ));
  1219. static List<String>? provinciedescription(dynamic response) => (getJsonField(
  1220. response,
  1221. r'''$[:].provinciedescription''',
  1222. true,
  1223. ) as List?)
  1224. ?.withoutNulls
  1225. .map((x) => castToType<String>(x))
  1226. .withoutNulls
  1227. .toList();
  1228. }
  1229. class EvenementCall {
  1230. static Future<ApiCallResponse> call({
  1231. String? nid = '0',
  1232. }) async {
  1233. return ApiManager.instance.makeApiCall(
  1234. callName: 'Evenement',
  1235. apiUrl:
  1236. 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflow_events.json?display_id=services_1',
  1237. callType: ApiCallType.GET,
  1238. headers: {
  1239. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1240. },
  1241. params: {
  1242. 'nid': nid,
  1243. },
  1244. returnBody: true,
  1245. encodeBodyUtf8: false,
  1246. decodeUtf8: false,
  1247. cache: false,
  1248. isStreamingApi: false,
  1249. alwaysAllowBody: false,
  1250. );
  1251. }
  1252. static String? eventNid(dynamic response) => castToType<String>(getJsonField(
  1253. response,
  1254. r'''$[0].nid''',
  1255. ));
  1256. static String? eventTitle(dynamic response) =>
  1257. castToType<String>(getJsonField(
  1258. response,
  1259. r'''$[0].title''',
  1260. ));
  1261. static String? eventDate(dynamic response) => castToType<String>(getJsonField(
  1262. response,
  1263. r'''$[0].datum''',
  1264. ));
  1265. static String? eventLogog(dynamic response) =>
  1266. castToType<String>(getJsonField(
  1267. response,
  1268. r'''$[0].logo''',
  1269. ));
  1270. static String? eventAdres(dynamic response) =>
  1271. castToType<String>(getJsonField(
  1272. response,
  1273. r'''$[0].adres''',
  1274. ));
  1275. static String? eventPlaats(dynamic response) =>
  1276. castToType<String>(getJsonField(
  1277. response,
  1278. r'''$[0].plaats''',
  1279. ));
  1280. static List<String>? eventCategorie(dynamic response) => (getJsonField(
  1281. response,
  1282. r'''$[0].categorie''',
  1283. true,
  1284. ) as List?)
  1285. ?.withoutNulls
  1286. .map((x) => castToType<String>(x))
  1287. .withoutNulls
  1288. .toList();
  1289. static String? eventBody(dynamic response) => castToType<String>(getJsonField(
  1290. response,
  1291. r'''$[0].body''',
  1292. ));
  1293. static String? eventWebsiteg(dynamic response) =>
  1294. castToType<String>(getJsonField(
  1295. response,
  1296. r'''$[0].website''',
  1297. ));
  1298. static List<String>? eventFotoos(dynamic response) => (getJsonField(
  1299. response,
  1300. r'''$[0].fotos''',
  1301. true,
  1302. ) as List?)
  1303. ?.withoutNulls
  1304. .map((x) => castToType<String>(x))
  1305. .withoutNulls
  1306. .toList();
  1307. static String? eventEntreeprijs(dynamic response) =>
  1308. castToType<String>(getJsonField(
  1309. response,
  1310. r'''$[0].entreeprijs''',
  1311. ));
  1312. static String? eventEntreeToelichting(dynamic response) =>
  1313. castToType<String>(getJsonField(
  1314. response,
  1315. r'''$[0].entreetoelichting''',
  1316. ));
  1317. static String? eventContact(dynamic response) =>
  1318. castToType<String>(getJsonField(
  1319. response,
  1320. r'''$[0].contact''',
  1321. ));
  1322. static String? eventHorecagelegenheidnid(dynamic response) =>
  1323. castToType<String>(getJsonField(
  1324. response,
  1325. r'''$[0].horecagelegenheidnid''',
  1326. ));
  1327. }
  1328. class EstablishmentsCall {
  1329. static Future<ApiCallResponse> call({
  1330. String? horcat,
  1331. String? townid = '',
  1332. String? displayId = 'services_1',
  1333. }) async {
  1334. horcat ??= null!;
  1335. return ApiManager.instance.makeApiCall(
  1336. callName: 'Establishments',
  1337. apiUrl:
  1338. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel_establishments.json',
  1339. callType: ApiCallType.GET,
  1340. headers: {
  1341. 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
  1342. },
  1343. params: {
  1344. 'horcat': horcat,
  1345. 'townid': townid,
  1346. 'display_id': displayId,
  1347. },
  1348. returnBody: true,
  1349. encodeBodyUtf8: false,
  1350. decodeUtf8: false,
  1351. cache: true,
  1352. isStreamingApi: false,
  1353. alwaysAllowBody: false,
  1354. );
  1355. }
  1356. static String? establishmentNid(dynamic response) =>
  1357. castToType<String>(getJsonField(
  1358. response,
  1359. r'''$[:].nid''',
  1360. ));
  1361. static String? establishmentTitel(dynamic response) =>
  1362. castToType<String>(getJsonField(
  1363. response,
  1364. r'''$[:].titel''',
  1365. ));
  1366. static String? establishmentAdres(dynamic response) =>
  1367. castToType<String>(getJsonField(
  1368. response,
  1369. r'''$[:].adres''',
  1370. ));
  1371. static String? establishmentPlaats(dynamic response) =>
  1372. castToType<String>(getJsonField(
  1373. response,
  1374. r'''$[:].plaats''',
  1375. ));
  1376. static String? establishmentLogo(dynamic response) =>
  1377. castToType<String>(getJsonField(
  1378. response,
  1379. r'''$[:].logo''',
  1380. ));
  1381. static List? establishmentCategorie(dynamic response) => getJsonField(
  1382. response,
  1383. r'''$[:].categorie''',
  1384. true,
  1385. ) as List?;
  1386. }
  1387. class QueryCityIdCall {
  1388. static Future<ApiCallResponse> call({
  1389. String? townid = '',
  1390. }) async {
  1391. return ApiManager.instance.makeApiCall(
  1392. callName: 'QueryCityId',
  1393. apiUrl:
  1394. 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflow_querytownid.json?display_id=services_1',
  1395. callType: ApiCallType.GET,
  1396. headers: {},
  1397. params: {
  1398. 'townid': townid,
  1399. },
  1400. returnBody: true,
  1401. encodeBodyUtf8: false,
  1402. decodeUtf8: false,
  1403. cache: true,
  1404. isStreamingApi: false,
  1405. alwaysAllowBody: false,
  1406. );
  1407. }
  1408. static String? stadId(dynamic response) => castToType<String>(getJsonField(
  1409. response,
  1410. r'''$[:].id''',
  1411. ));
  1412. static String? stadNaam(dynamic response) => castToType<String>(getJsonField(
  1413. response,
  1414. r'''$[:].name''',
  1415. ));
  1416. static String? provincieId(dynamic response) =>
  1417. castToType<String>(getJsonField(
  1418. response,
  1419. r'''$[:].parentid''',
  1420. ));
  1421. static String? provincieNaam(dynamic response) =>
  1422. castToType<String>(getJsonField(
  1423. response,
  1424. r'''$[:].parentname''',
  1425. ));
  1426. }
  1427. class RequestNewPasswordCall {
  1428. static Future<ApiCallResponse> call({
  1429. String? name = '',
  1430. }) async {
  1431. final ffApiRequestBody = '''
  1432. {"name": "[name]"}''';
  1433. return ApiManager.instance.makeApiCall(
  1434. callName: 'requestNewPassword',
  1435. apiUrl:
  1436. 'https://uitgaanskrant.com/en/flutterdrup/user/request_new_password.json',
  1437. callType: ApiCallType.POST,
  1438. headers: {},
  1439. params: {},
  1440. body: ffApiRequestBody,
  1441. bodyType: BodyType.JSON,
  1442. returnBody: true,
  1443. encodeBodyUtf8: false,
  1444. decodeUtf8: false,
  1445. cache: false,
  1446. isStreamingApi: false,
  1447. alwaysAllowBody: false,
  1448. );
  1449. }
  1450. static String? errorMessage(dynamic response) =>
  1451. castToType<String>(getJsonField(
  1452. response,
  1453. r'''$[0]''',
  1454. ));
  1455. }
  1456. class ApiPagingParams {
  1457. int nextPageNumber = 0;
  1458. int numItems = 0;
  1459. dynamic lastResponse;
  1460. ApiPagingParams({
  1461. required this.nextPageNumber,
  1462. required this.numItems,
  1463. required this.lastResponse,
  1464. });
  1465. @override
  1466. String toString() =>
  1467. 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
  1468. }
  1469. String _toEncodable(dynamic item) {
  1470. return item;
  1471. }
  1472. String _serializeList(List? list) {
  1473. list ??= <String>[];
  1474. try {
  1475. return json.encode(list, toEncodable: _toEncodable);
  1476. } catch (_) {
  1477. if (kDebugMode) {
  1478. print("List serialization failed. Returning empty list.");
  1479. }
  1480. return '[]';
  1481. }
  1482. }
  1483. String _serializeJson(dynamic jsonVar, [bool isList = false]) {
  1484. jsonVar ??= (isList ? [] : {});
  1485. try {
  1486. return json.encode(jsonVar, toEncodable: _toEncodable);
  1487. } catch (_) {
  1488. if (kDebugMode) {
  1489. print("Json serialization failed. Returning empty json.");
  1490. }
  1491. return isList ? '[]' : '{}';
  1492. }
  1493. }
  1494. String? escapeStringForJson(String? input) {
  1495. if (input == null) {
  1496. return null;
  1497. }
  1498. return input
  1499. .replaceAll('\\', '\\\\')
  1500. .replaceAll('"', '\\"')
  1501. .replaceAll('\n', '\\n')
  1502. .replaceAll('\t', '\\t');
  1503. }