ConsumerApi

<back to all web services

GetSavedSearchesRequest

Consumer
Requires Authentication
Required role:Consumer
The following routes are available for this service:
GET/searches/GetSavedSearches

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 CategoryDto implements IConvertible
{
    String? name;
    String? slug;
    String? absoluteSlug;
    String? imageUrl;
    String? allImageUrl;
    String? iconImageUrl;
    int? position;

    CategoryDto({this.name,this.slug,this.absoluteSlug,this.imageUrl,this.allImageUrl,this.iconImageUrl,this.position});
    CategoryDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        slug = json['slug'];
        absoluteSlug = json['absoluteSlug'];
        imageUrl = json['imageUrl'];
        allImageUrl = json['allImageUrl'];
        iconImageUrl = json['iconImageUrl'];
        position = json['position'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'slug': slug,
        'absoluteSlug': absoluteSlug,
        'imageUrl': imageUrl,
        'allImageUrl': allImageUrl,
        'iconImageUrl': iconImageUrl,
        'position': position
    };

    getTypeName() => "CategoryDto";
    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 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 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 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 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 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;
}

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()),
    'CategoryDto': TypeInfo(TypeOf.Class, create:() => CategoryDto()),
    'BarSpecialityEsDto': TypeInfo(TypeOf.Class, create:() => BarSpecialityEsDto()),
    'BarTypeEsDto': TypeInfo(TypeOf.Class, create:() => BarTypeEsDto()),
    'BrandApiDto': TypeInfo(TypeOf.Class, create:() => BrandApiDto()),
    'CuisineEsDto': TypeInfo(TypeOf.Class, create:() => CuisineEsDto()),
    'MealTypeApiDto': TypeInfo(TypeOf.Class, create:() => MealTypeApiDto()),
    'ParkingApiDto': TypeInfo(TypeOf.Class, create:() => ParkingApiDto()),
    'PaymentOptionApiDto': TypeInfo(TypeOf.Class, create:() => PaymentOptionApiDto()),
    'PriceMainDishApiDto': TypeInfo(TypeOf.Class, create:() => PriceMainDishApiDto()),
    'EatingSuitabilityApiDto': TypeInfo(TypeOf.Class, create:() => EatingSuitabilityApiDto()),
    'TakeAwayApiDto': TypeInfo(TypeOf.Class, create:() => TakeAwayApiDto()),
    'WearPriceProfileEsDto': TypeInfo(TypeOf.Class, create:() => WearPriceProfileEsDto()),
});

Dart GetSavedSearchesRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /searches/GetSavedSearches HTTP/1.1 
Host: unstable-consumer-api.brovs.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"searches":[{"id":0,"name":"String","filter":{"term":"String","placeGuid":"00000000-0000-0000-0000-000000000000","adMessageGuid":"00000000-0000-0000-0000-000000000000","categoryAbsoluteSlugs":["String"],"barSpecialitySlugs":["String"],"barTypeSlugs":["String"],"brandNames":["String"],"cuisineSlugs":["String"],"mealTypeSlugs":["String"],"parking":["StreetParking"],"paymentOptions":["Visa"],"priceMainDishes":["Value"],"eatingSuitabilitySlugs":["String"],"takeAwaySlugs":["String"],"wearPriceProfileSlugs":["String"],"wheelChairAccessible":false,"wifi":false,"outdoorSeating":false,"saveFoodAndMoney":false,"openAt":{"weekDay":"Sunday","hour":0,"minute":0}},"location":{"longitude":0,"latitude":0,"searchRadiusInKm":0},"filterDetails":{"categories":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}],"barSpecialities":[{"slug":"String","title":"String"}],"barTypes":[{"slug":"String","title":"String"}],"brands":[{"name":"String"}],"cuisines":[{"label":"String","slug":"String"}],"mealTypes":[{"label":"String","slug":"String"}],"parking":[{"label":"String","slug":"StreetParking"}],"paymentOptions":[{"label":"String","slug":"Visa"}],"priceMainDishes":[{"title":"String","slug":"Value"}],"eatingSuitability":[{"label":"String","slug":"String"}],"takeAways":[{"label":"String","slug":"String"}],"wearPriceProfiles":[{"slug":"String","label":"String"}],"rootCategories":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}]},"createdAt":"0001-01-01T00:00:00.0000000+00:00","updatedAt":"0001-01-01T00:00:00.0000000+00:00"}]}