api_calls.dart 44 KB

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