Required role: | Consumer |
GET | /find/filtering |
---|
library ConsumerApi;
import 'package:servicestack/servicestack.dart';
enum Parking
{
StreetParking,
ParkingGarageNearby,
}
enum PaymentOption
{
Visa,
MasterCard,
AmericanExpress,
Diners,
Vipps,
}
enum PriceMainDish
{
Value,
Medium,
High,
FineDining,
}
enum DayOfWeek
{
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
}
class OpenAtTimeDto implements IConvertible
{
DayOfWeek? weekDay;
int? hour;
int? minute;
OpenAtTimeDto({this.weekDay,this.hour,this.minute});
OpenAtTimeDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
weekDay = JsonConverters.fromJson(json['weekDay'],'DayOfWeek',context!);
hour = json['hour'];
minute = json['minute'];
return this;
}
Map<String, dynamic> toJson() => {
'weekDay': JsonConverters.toJson(weekDay,'DayOfWeek',context!),
'hour': hour,
'minute': minute
};
getTypeName() => "OpenAtTimeDto";
TypeContext? context = _ctx;
}
class BarTypeEsDto implements IConvertible
{
String? slug;
String? title;
BarTypeEsDto({this.slug,this.title});
BarTypeEsDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
slug = json['slug'];
title = json['title'];
return this;
}
Map<String, dynamic> toJson() => {
'slug': slug,
'title': title
};
getTypeName() => "BarTypeEsDto";
TypeContext? context = _ctx;
}
class BarSpecialityEsDto implements IConvertible
{
String? slug;
String? title;
BarSpecialityEsDto({this.slug,this.title});
BarSpecialityEsDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
slug = json['slug'];
title = json['title'];
return this;
}
Map<String, dynamic> toJson() => {
'slug': slug,
'title': title
};
getTypeName() => "BarSpecialityEsDto";
TypeContext? context = _ctx;
}
class BrandApiDto implements IConvertible
{
String? name;
BrandApiDto({this.name});
BrandApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name
};
getTypeName() => "BrandApiDto";
TypeContext? context = _ctx;
}
class CuisineEsDto implements IConvertible
{
String? label;
String? slug;
CuisineEsDto({this.label,this.slug});
CuisineEsDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
label = json['label'];
slug = json['slug'];
return this;
}
Map<String, dynamic> toJson() => {
'label': label,
'slug': slug
};
getTypeName() => "CuisineEsDto";
TypeContext? context = _ctx;
}
class MealTypeApiDto implements IConvertible
{
String? label;
String? slug;
MealTypeApiDto({this.label,this.slug});
MealTypeApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
label = json['label'];
slug = json['slug'];
return this;
}
Map<String, dynamic> toJson() => {
'label': label,
'slug': slug
};
getTypeName() => "MealTypeApiDto";
TypeContext? context = _ctx;
}
class EatingSuitabilityApiDto implements IConvertible
{
String? label;
String? slug;
EatingSuitabilityApiDto({this.label,this.slug});
EatingSuitabilityApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
label = json['label'];
slug = json['slug'];
return this;
}
Map<String, dynamic> toJson() => {
'label': label,
'slug': slug
};
getTypeName() => "EatingSuitabilityApiDto";
TypeContext? context = _ctx;
}
class ParkingApiDto implements IConvertible
{
String? label;
Parking? slug;
ParkingApiDto({this.label,this.slug});
ParkingApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
label = json['label'];
slug = JsonConverters.fromJson(json['slug'],'Parking',context!);
return this;
}
Map<String, dynamic> toJson() => {
'label': label,
'slug': JsonConverters.toJson(slug,'Parking',context!)
};
getTypeName() => "ParkingApiDto";
TypeContext? context = _ctx;
}
class PaymentOptionApiDto implements IConvertible
{
String? label;
PaymentOption? slug;
PaymentOptionApiDto({this.label,this.slug});
PaymentOptionApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
label = json['label'];
slug = JsonConverters.fromJson(json['slug'],'PaymentOption',context!);
return this;
}
Map<String, dynamic> toJson() => {
'label': label,
'slug': JsonConverters.toJson(slug,'PaymentOption',context!)
};
getTypeName() => "PaymentOptionApiDto";
TypeContext? context = _ctx;
}
class PriceMainDishApiDto implements IConvertible
{
String? title;
PriceMainDish? slug;
PriceMainDishApiDto({this.title,this.slug});
PriceMainDishApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
title = json['title'];
slug = JsonConverters.fromJson(json['slug'],'PriceMainDish',context!);
return this;
}
Map<String, dynamic> toJson() => {
'title': title,
'slug': JsonConverters.toJson(slug,'PriceMainDish',context!)
};
getTypeName() => "PriceMainDishApiDto";
TypeContext? context = _ctx;
}
class TakeAwayApiDto implements IConvertible
{
String? label;
String? slug;
TakeAwayApiDto({this.label,this.slug});
TakeAwayApiDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
label = json['label'];
slug = json['slug'];
return this;
}
Map<String, dynamic> toJson() => {
'label': label,
'slug': slug
};
getTypeName() => "TakeAwayApiDto";
TypeContext? context = _ctx;
}
class WearPriceProfileEsDto implements IConvertible
{
String? slug;
String? label;
WearPriceProfileEsDto({this.slug,this.label});
WearPriceProfileEsDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
slug = json['slug'];
label = json['label'];
return this;
}
Map<String, dynamic> toJson() => {
'slug': slug,
'label': label
};
getTypeName() => "WearPriceProfileEsDto";
TypeContext? context = _ctx;
}
enum FeatureType
{
BarSpeciality,
BarType,
Cuisine,
SaveFoodAndMoney,
MealType,
Menu,
OutdoorSeating,
Parking,
PaymentOptions,
PriceMainDish,
SubCategories,
SubCategoriesAndBrands,
EatingSuitabilities,
TakeAway,
WearPriceProfile,
WheelChairAccessible,
Wifi,
WebShop,
Filtering,
}
TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: <String, TypeInfo> {
'Parking': TypeInfo(TypeOf.Enum, enumValues:Parking.values),
'PaymentOption': TypeInfo(TypeOf.Enum, enumValues:PaymentOption.values),
'PriceMainDish': TypeInfo(TypeOf.Enum, enumValues:PriceMainDish.values),
'DayOfWeek': TypeInfo(TypeOf.Enum, enumValues:DayOfWeek.values),
'OpenAtTimeDto': TypeInfo(TypeOf.Class, create:() => OpenAtTimeDto()),
'BarTypeEsDto': TypeInfo(TypeOf.Class, create:() => BarTypeEsDto()),
'BarSpecialityEsDto': TypeInfo(TypeOf.Class, create:() => BarSpecialityEsDto()),
'BrandApiDto': TypeInfo(TypeOf.Class, create:() => BrandApiDto()),
'CuisineEsDto': TypeInfo(TypeOf.Class, create:() => CuisineEsDto()),
'MealTypeApiDto': TypeInfo(TypeOf.Class, create:() => MealTypeApiDto()),
'EatingSuitabilityApiDto': TypeInfo(TypeOf.Class, create:() => EatingSuitabilityApiDto()),
'ParkingApiDto': TypeInfo(TypeOf.Class, create:() => ParkingApiDto()),
'PaymentOptionApiDto': TypeInfo(TypeOf.Class, create:() => PaymentOptionApiDto()),
'PriceMainDishApiDto': TypeInfo(TypeOf.Class, create:() => PriceMainDishApiDto()),
'TakeAwayApiDto': TypeInfo(TypeOf.Class, create:() => TakeAwayApiDto()),
'WearPriceProfileEsDto': TypeInfo(TypeOf.Class, create:() => WearPriceProfileEsDto()),
'FeatureType': TypeInfo(TypeOf.Enum, enumValues:FeatureType.values),
});
Dart FindAvailableFilterRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /find/filtering HTTP/1.1 Host: unstable-consumer-api.brovs.com Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { barTypes: [ { count: 0, slug: String, title: String } ], barSpecialities: [ { count: 0, slug: String, title: String } ], brands: [ { count: 0, name: String } ], cuisines: [ { count: 0, label: String, slug: String } ], mealType: [ { count: 0, label: String, slug: String } ], eatingSuitabilities: [ { count: 0, label: String, slug: String } ], parkings: [ { count: 0, label: String, slug: StreetParking } ], paymentOptions: [ { count: 0, label: String, slug: Visa } ], priceMainDishes: [ { count: 0, title: String, slug: Value } ], takeAways: [ { count: 0, label: String, slug: String } ], wearPriceProfiles: [ { count: 0, slug: String, label: String } ], categories: [ { name: String, slug: String, absoluteSlug: String, featureTypes: [ BarSpeciality ], type: Parent, count: 0, imageUrl: String, allImageUrl: String, iconImageUrl: String, position: 0, children: [ { name: String, slug: String, absoluteSlug: String, featureTypes: [ BarSpeciality ], type: Parent, count: 0, imageUrl: String, allImageUrl: String, iconImageUrl: String, position: 0, children: [ { name: String, slug: String, absoluteSlug: String, featureTypes: [ BarSpeciality ], type: Parent, count: 0, imageUrl: String, allImageUrl: String, iconImageUrl: String, position: 0 } ] } ] } ] }