api_calls.dart 41 KB

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