|
|
@@ -0,0 +1,1302 @@
|
|
|
+import 'dart:convert';
|
|
|
+import 'dart:typed_data';
|
|
|
+import '../schema/structs/index.dart';
|
|
|
+
|
|
|
+import 'package:flutter/foundation.dart';
|
|
|
+
|
|
|
+import '/flutter_flow/flutter_flow_util.dart';
|
|
|
+import 'api_manager.dart';
|
|
|
+
|
|
|
+export 'api_manager.dart' show ApiCallResponse;
|
|
|
+
|
|
|
+const _kPrivateApiFunctionName = 'ffPrivateApiCall';
|
|
|
+
|
|
|
+class LoginCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? username = '',
|
|
|
+ String? password = '',
|
|
|
+ }) async {
|
|
|
+ final ffApiRequestBody = '''
|
|
|
+{
|
|
|
+ "username": "${escapeStringForJson(username)}",
|
|
|
+ "password": "${escapeStringForJson(password)}"
|
|
|
+}''';
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'login',
|
|
|
+ apiUrl: 'https://uitgaanskrant.com/en/flutterdrup/user/login.json',
|
|
|
+ callType: ApiCallType.POST,
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ },
|
|
|
+ params: {},
|
|
|
+ body: ffApiRequestBody,
|
|
|
+ bodyType: BodyType.JSON,
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? loginSessionid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.sessid''',
|
|
|
+ ));
|
|
|
+ static String? loginSessionsname(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.session_name''',
|
|
|
+ ));
|
|
|
+ static String? loginToken(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.token''',
|
|
|
+ ));
|
|
|
+ static String? loginUseruid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.user.uid''',
|
|
|
+ ));
|
|
|
+ static String? loginUsername(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.user.name''',
|
|
|
+ ));
|
|
|
+ static String? loginEmail(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.user.mail''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class ZZUserEstablishmentsTESTCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? sessionname = '',
|
|
|
+ String? sessionid = '',
|
|
|
+ String? token = '',
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'ZZ userEstablishments TEST',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflow_user_establishment.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'Cookie': '${sessionname}=${sessionid}',
|
|
|
+ },
|
|
|
+ params: {},
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? sessionid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.sessid''',
|
|
|
+ ));
|
|
|
+ static String? sessionname(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.session_name''',
|
|
|
+ ));
|
|
|
+ static String? token(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.token''',
|
|
|
+ ));
|
|
|
+ static String? drupaluserid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.user.uid''',
|
|
|
+ ));
|
|
|
+ static List<String>? establishmentTitle(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].node_title''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static List<String>? establishmentLogo(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logohoreca''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static List<String>? establishmentNid(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+}
|
|
|
+
|
|
|
+class GetcsrfCall {
|
|
|
+ static Future<ApiCallResponse> call() async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'getcsrf',
|
|
|
+ apiUrl: 'https://uitgaanskrant.com/en/flutterdrup/user/token.json',
|
|
|
+ callType: ApiCallType.POST,
|
|
|
+ headers: {},
|
|
|
+ params: {},
|
|
|
+ bodyType: BodyType.JSON,
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? getCsrfToken(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$.token''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class HomeSliderCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? displayId = 'services_1',
|
|
|
+ String? townid = '1212',
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'homeSlider',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'display_id': displayId,
|
|
|
+ 'townid': townid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? homesNid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? homesAdres(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? homesHoreca(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheid''',
|
|
|
+ ));
|
|
|
+ static String? homesTown(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static String? homesDatum(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+ static List<String>? homesCategorie(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? homesTitel(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? homesLogo(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? homesInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static String? homesUrl(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].url''',
|
|
|
+ ));
|
|
|
+ static String? homesHorecaID(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheidid''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class HomeSlidershortDateCall {
|
|
|
+ static Future<ApiCallResponse> call() async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'homeSlidershortDate',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {},
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? homesNid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? homesAdres(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? homesEstablishment(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheid''',
|
|
|
+ ));
|
|
|
+ static String? homesTown(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static String? homesDatum(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+ static List<String>? homesCategorie(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? homesTitel(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? homesLogo(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? homesInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static String? homesUrl(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].url''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class HomeTabelCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ int? page = 0,
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'homeTabel',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_2',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'page': page,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? homeNid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? homeEstablishment(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheid''',
|
|
|
+ ));
|
|
|
+ static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+ static String? homePlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static List<String>? homeCategorie(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? homeInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].url''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class HomeUitgaanCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ int? page = 0,
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'home uitgaan',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'page': page,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? homeNid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? homeEstablishment(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheid''',
|
|
|
+ ));
|
|
|
+ static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+ static String? homePlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static String? homeCategorie(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ ));
|
|
|
+ static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? homeInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].url''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class UitgaanstabelCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ int? page = 0,
|
|
|
+ String? townid = '0',
|
|
|
+ String? displayId,
|
|
|
+ }) async {
|
|
|
+ displayId ??= '';
|
|
|
+
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'Uitgaanstabel',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel1.json?display_id=services_3',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'page': page,
|
|
|
+ 'townid': townid,
|
|
|
+ 'display_id': displayId,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? homeNid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? homeAdres(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? tabelHorecagelegenheid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheid''',
|
|
|
+ ));
|
|
|
+ static String? homeDatum(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+ static String? homePlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static List<String>? homeCategorie(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? homeTitel(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? homoLogo(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? homeInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static String? homeUrl(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].url''',
|
|
|
+ ));
|
|
|
+ static String? tabelHorecagelegenheidID(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].horecagelegenheidid''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class EstablishmentsNewCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ int? townid = 28695,
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'EstablishmentsNew',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/en/flutterdrup/views/_flutterflowmobiel_establishment_new.json?display_id=services_1&townid=28695',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'townid': townid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? establishmentNid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? establishmentAddress(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? establishmentTitel(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? establishmentPlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static String? establishmentLogo(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? establishmentCategorie(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class EstablishmentInfoCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? nid = '',
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'EstablishmentInfo',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_info.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'nid': nid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: true,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? establismentNid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? establishmentBezorgkosten(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].bezorgkosten''',
|
|
|
+ ));
|
|
|
+ static String? establishmentEmail(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].email''',
|
|
|
+ ));
|
|
|
+ static String? establishmentFacebook(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].facebook''',
|
|
|
+ ));
|
|
|
+ static String? establishmentInstagram(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].instagram''',
|
|
|
+ ));
|
|
|
+ static String? establishmentMenukaart(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].menukaart''',
|
|
|
+ ));
|
|
|
+ static String? establishmentOpeningstijden(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].openingstijden''',
|
|
|
+ ));
|
|
|
+ static String? establishmentTelefoonnummer(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].telefoonnummer''',
|
|
|
+ ));
|
|
|
+ static String? establishmentTwitter(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].twitter''',
|
|
|
+ ));
|
|
|
+ static String? establishmentWebsite(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].website''',
|
|
|
+ ));
|
|
|
+ static List<String>? establishmentbezorgbetaalopties(dynamic response) =>
|
|
|
+ (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].thuisbezorgtbetaalopties''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? establishmentAdres(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static List<String>? establishmentAfhaalopties(dynamic response) =>
|
|
|
+ (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].afhaalopties''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? establishmentPlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static List<String>? establishmentFotoos(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].fotoos''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static List<String>? establishmentCryptocoins(dynamic response) =>
|
|
|
+ (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].cryptocoins''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? establishmentbezorgtijden(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].bezorgtijden''',
|
|
|
+ ));
|
|
|
+ static String? establishmentMinimaleorder(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].minimaleorder''',
|
|
|
+ ));
|
|
|
+ static String? establshmentTitel(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static List<String>? establshmentBezorgtin(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].bezorgtin''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? establshmentKvk(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].kvk''',
|
|
|
+ ));
|
|
|
+ static String? establshmentBestellink(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].bestellink''',
|
|
|
+ ));
|
|
|
+ static String? establshmentInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static String? establshmentOpeningUitzondering(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].openingstijdenuitzondering''',
|
|
|
+ ));
|
|
|
+ static String? establshmentLogo(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? establishmentEntreeprijs(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].entreeprijs''',
|
|
|
+ ));
|
|
|
+ static List<String>? establishmentCategorie(dynamic response) =>
|
|
|
+ (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? establishmentEntreeToelichting(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].toelichtingentree''',
|
|
|
+ ));
|
|
|
+ static String? establishmentURL(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].url''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class HorecagelegenheidEventsCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? horecanid,
|
|
|
+ }) async {
|
|
|
+ horecanid ??= '';
|
|
|
+
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'HorecagelegenheidEvents',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'horecanid': horecanid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? horecaEventNid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? horecaEventBody(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].body''',
|
|
|
+ ));
|
|
|
+ static String? horecaEventLogo(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static String? horecaEventDatum(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+ static String? horecaEventTitel(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? horecaEventInhoud(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].inhoud''',
|
|
|
+ ));
|
|
|
+ static List<String>? horecaEventCategorie(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+}
|
|
|
+
|
|
|
+class ZzEstablishmentEventsCopyCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ int? horecanid = 75411,
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'zzEstablishmentEvents Copy',
|
|
|
+ apiUrl:
|
|
|
+ 'https://devbob.uitgaanskrant.com/en/flutterdrup/views/flutterflowmobiel_establishment_events.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'horecanid': horecanid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? estEventNid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? estEventTitle(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].title''',
|
|
|
+ ));
|
|
|
+ static String? estEventAdres(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static dynamic estEventEntreeselect(dynamic response) => getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].entreeselect''',
|
|
|
+ );
|
|
|
+ static String? estEventBody(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].body''',
|
|
|
+ ));
|
|
|
+ static String? estEventEntreeToelichting(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].entreetoelichting''',
|
|
|
+ ));
|
|
|
+ static String? estEventTickets(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].tickets''',
|
|
|
+ ));
|
|
|
+ static String? estEventWebsite(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].website''',
|
|
|
+ ));
|
|
|
+ static String? estEventLogo(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static List<String>? estEventFotoos(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].fotoos''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? estEventCategory(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].category''',
|
|
|
+ ));
|
|
|
+ static String? estEventDatum(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].datum''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class GemeentenCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? provincieid = '',
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'gemeenten',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'provincieid': provincieid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? gemeenteId(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].gemeenteid''',
|
|
|
+ ));
|
|
|
+ static String? gemeenteName(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].gemeentename''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class ProvinciesCall {
|
|
|
+ static Future<ApiCallResponse> call() async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'provincies',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/plaatsen.json?limit_levels=2',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {},
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? provincieId(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].provincieid''',
|
|
|
+ ));
|
|
|
+ static String? provincieName(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].provinciename''',
|
|
|
+ ));
|
|
|
+ static List<String>? provinciedescription(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].provinciedescription''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+}
|
|
|
+
|
|
|
+class EvenementCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? nid = '0',
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'Evenement',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/en/flutterdrup/views/flutterflow_events.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'nid': nid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: false,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? eventNid(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].nid''',
|
|
|
+ ));
|
|
|
+ static String? eventTitle(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].title''',
|
|
|
+ ));
|
|
|
+ static String? eventDate(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].datum''',
|
|
|
+ ));
|
|
|
+ static String? eventLogog(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].logo''',
|
|
|
+ ));
|
|
|
+ static String? eventAdres(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].adres''',
|
|
|
+ ));
|
|
|
+ static String? eventPlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].plaats''',
|
|
|
+ ));
|
|
|
+ static List<String>? eventCategorie(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? eventBody(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].body''',
|
|
|
+ ));
|
|
|
+ static String? eventWebsiteg(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].website''',
|
|
|
+ ));
|
|
|
+ static List<String>? eventFotoos(dynamic response) => (getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].fotos''',
|
|
|
+ true,
|
|
|
+ ) as List?)
|
|
|
+ ?.withoutNulls
|
|
|
+ .map((x) => castToType<String>(x))
|
|
|
+ .withoutNulls
|
|
|
+ .toList();
|
|
|
+ static String? eventEntreeprijs(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].entreeprijs''',
|
|
|
+ ));
|
|
|
+ static String? eventEntreeToelichting(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].entreetoelichting''',
|
|
|
+ ));
|
|
|
+ static String? eventContact(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].contact''',
|
|
|
+ ));
|
|
|
+ static String? eventHorecagelegenheidnid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[0].horecagelegenheidnid''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class EstablishmentsCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? horcat,
|
|
|
+ String? townid = '',
|
|
|
+ String? displayId = 'services_1',
|
|
|
+ }) async {
|
|
|
+ horcat ??= null!;
|
|
|
+
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'Establishments',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflowmobiel_establishments.json',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Basic Ym9iOnNlcmhpaQ==',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ 'horcat': horcat,
|
|
|
+ 'townid': townid,
|
|
|
+ 'display_id': displayId,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: true,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? establishmentNid(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].nid''',
|
|
|
+ ));
|
|
|
+ static String? establishmentTitel(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].titel''',
|
|
|
+ ));
|
|
|
+ static String? establishmentAdres(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].adres''',
|
|
|
+ ));
|
|
|
+ static String? establishmentPlaats(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].plaats''',
|
|
|
+ ));
|
|
|
+ static String? establishmentLogo(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].logo''',
|
|
|
+ ));
|
|
|
+ static List? establishmentCategorie(dynamic response) => getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].categorie''',
|
|
|
+ true,
|
|
|
+ ) as List?;
|
|
|
+}
|
|
|
+
|
|
|
+class QueryCityIdCall {
|
|
|
+ static Future<ApiCallResponse> call({
|
|
|
+ String? townid = '',
|
|
|
+ }) async {
|
|
|
+ return ApiManager.instance.makeApiCall(
|
|
|
+ callName: 'QueryCityId',
|
|
|
+ apiUrl:
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterflow_querytownid.json?display_id=services_1',
|
|
|
+ callType: ApiCallType.GET,
|
|
|
+ headers: {},
|
|
|
+ params: {
|
|
|
+ 'townid': townid,
|
|
|
+ },
|
|
|
+ returnBody: true,
|
|
|
+ encodeBodyUtf8: false,
|
|
|
+ decodeUtf8: false,
|
|
|
+ cache: true,
|
|
|
+ isStreamingApi: false,
|
|
|
+ alwaysAllowBody: false,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ static String? stadId(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].id''',
|
|
|
+ ));
|
|
|
+ static String? stadNaam(dynamic response) => castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].name''',
|
|
|
+ ));
|
|
|
+ static String? provincieId(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].parentid''',
|
|
|
+ ));
|
|
|
+ static String? provincieNaam(dynamic response) =>
|
|
|
+ castToType<String>(getJsonField(
|
|
|
+ response,
|
|
|
+ r'''$[:].parentname''',
|
|
|
+ ));
|
|
|
+}
|
|
|
+
|
|
|
+class ApiPagingParams {
|
|
|
+ int nextPageNumber = 0;
|
|
|
+ int numItems = 0;
|
|
|
+ dynamic lastResponse;
|
|
|
+
|
|
|
+ ApiPagingParams({
|
|
|
+ required this.nextPageNumber,
|
|
|
+ required this.numItems,
|
|
|
+ required this.lastResponse,
|
|
|
+ });
|
|
|
+
|
|
|
+ @override
|
|
|
+ String toString() =>
|
|
|
+ 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
|
|
|
+}
|
|
|
+
|
|
|
+String _toEncodable(dynamic item) {
|
|
|
+ return item;
|
|
|
+}
|
|
|
+
|
|
|
+String _serializeList(List? list) {
|
|
|
+ list ??= <String>[];
|
|
|
+ try {
|
|
|
+ return json.encode(list, toEncodable: _toEncodable);
|
|
|
+ } catch (_) {
|
|
|
+ if (kDebugMode) {
|
|
|
+ print("List serialization failed. Returning empty list.");
|
|
|
+ }
|
|
|
+ return '[]';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+String _serializeJson(dynamic jsonVar, [bool isList = false]) {
|
|
|
+ jsonVar ??= (isList ? [] : {});
|
|
|
+ try {
|
|
|
+ return json.encode(jsonVar, toEncodable: _toEncodable);
|
|
|
+ } catch (_) {
|
|
|
+ if (kDebugMode) {
|
|
|
+ print("Json serialization failed. Returning empty json.");
|
|
|
+ }
|
|
|
+ return isList ? '[]' : '{}';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+String? escapeStringForJson(String? input) {
|
|
|
+ if (input == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return input
|
|
|
+ .replaceAll('\\', '\\\\')
|
|
|
+ .replaceAll('"', '\\"')
|
|
|
+ .replaceAll('\n', '\\n')
|
|
|
+ .replaceAll('\t', '\\t');
|
|
|
+}
|