api_calls.dart 45 KB

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