api_calls.dart 45 KB

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