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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetSavedSearchesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ConsumerApi.Dto">
  <Searches>
    <SavedSearchDto>
      <CreatedAt xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </CreatedAt>
      <Filter>
        <AdMessageGuid>00000000-0000-0000-0000-000000000000</AdMessageGuid>
        <BarSpecialitySlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </BarSpecialitySlugs>
        <BarTypeSlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </BarTypeSlugs>
        <BrandNames xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </BrandNames>
        <CategoryAbsoluteSlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </CategoryAbsoluteSlugs>
        <CuisineSlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </CuisineSlugs>
        <EatingSuitabilitySlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </EatingSuitabilitySlugs>
        <MealTypeSlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </MealTypeSlugs>
        <OpenAt xmlns:d5p1="http://schemas.datacontract.org/2004/07/Entities.Common">
          <d5p1:Hour>0</d5p1:Hour>
          <d5p1:Minute>0</d5p1:Minute>
          <d5p1:WeekDay>Sunday</d5p1:WeekDay>
        </OpenAt>
        <OutdoorSeating>false</OutdoorSeating>
        <Parking xmlns:d5p1="http://schemas.datacontract.org/2004/07/Entities.Database">
          <d5p1:Parking>StreetParking</d5p1:Parking>
        </Parking>
        <PaymentOptions xmlns:d5p1="http://schemas.datacontract.org/2004/07/Entities.Database">
          <d5p1:PaymentOption>Visa</d5p1:PaymentOption>
        </PaymentOptions>
        <PlaceGuid>00000000-0000-0000-0000-000000000000</PlaceGuid>
        <PriceMainDishes xmlns:d5p1="http://schemas.datacontract.org/2004/07/Entities.Database">
          <d5p1:PriceMainDish>Value</d5p1:PriceMainDish>
        </PriceMainDishes>
        <SaveFoodAndMoney>false</SaveFoodAndMoney>
        <TakeAwaySlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </TakeAwaySlugs>
        <Term>String</Term>
        <WearPriceProfileSlugs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </WearPriceProfileSlugs>
        <WheelChairAccessible>false</WheelChairAccessible>
        <Wifi>false</Wifi>
      </Filter>
      <FilterDetails>
        <BarSpecialities xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:BarSpecialityEsDto>
            <d5p1:Slug>String</d5p1:Slug>
            <d5p1:Title>String</d5p1:Title>
          </d5p1:BarSpecialityEsDto>
        </BarSpecialities>
        <BarTypes xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:BarTypeEsDto>
            <d5p1:Slug>String</d5p1:Slug>
            <d5p1:Title>String</d5p1:Title>
          </d5p1:BarTypeEsDto>
        </BarTypes>
        <Brands xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:BrandApiDto>
            <d5p1:Name>String</d5p1:Name>
          </d5p1:BrandApiDto>
        </Brands>
        <Categories xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:CategoryDto>
            <d5p1:AbsoluteSlug>String</d5p1:AbsoluteSlug>
            <d5p1:AllImageUrl>String</d5p1:AllImageUrl>
            <d5p1:IconImageUrl>String</d5p1:IconImageUrl>
            <d5p1:ImageUrl>String</d5p1:ImageUrl>
            <d5p1:Name>String</d5p1:Name>
            <d5p1:Position>0</d5p1:Position>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:CategoryDto>
        </Categories>
        <Cuisines xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:CuisineEsDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:CuisineEsDto>
        </Cuisines>
        <EatingSuitability xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:EatingSuitabilityApiDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:EatingSuitabilityApiDto>
        </EatingSuitability>
        <MealTypes xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:MealTypeApiDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:MealTypeApiDto>
        </MealTypes>
        <Parking xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:ParkingApiDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>StreetParking</d5p1:Slug>
          </d5p1:ParkingApiDto>
        </Parking>
        <PaymentOptions xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:PaymentOptionApiDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>Visa</d5p1:Slug>
          </d5p1:PaymentOptionApiDto>
        </PaymentOptions>
        <PriceMainDishes xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:PriceMainDishApiDto>
            <d5p1:Slug>Value</d5p1:Slug>
            <d5p1:Title>String</d5p1:Title>
          </d5p1:PriceMainDishApiDto>
        </PriceMainDishes>
        <RootCategories xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:CategoryDto>
            <d5p1:AbsoluteSlug>String</d5p1:AbsoluteSlug>
            <d5p1:AllImageUrl>String</d5p1:AllImageUrl>
            <d5p1:IconImageUrl>String</d5p1:IconImageUrl>
            <d5p1:ImageUrl>String</d5p1:ImageUrl>
            <d5p1:Name>String</d5p1:Name>
            <d5p1:Position>0</d5p1:Position>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:CategoryDto>
        </RootCategories>
        <TakeAways xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:TakeAwayApiDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:TakeAwayApiDto>
        </TakeAways>
        <WearPriceProfiles xmlns:d5p1="http://schemas.datacontract.org/2004/07/Api.Dto">
          <d5p1:WearPriceProfileEsDto>
            <d5p1:Label>String</d5p1:Label>
            <d5p1:Slug>String</d5p1:Slug>
          </d5p1:WearPriceProfileEsDto>
        </WearPriceProfiles>
      </FilterDetails>
      <Id>0</Id>
      <Location>
        <Latitude>0</Latitude>
        <Longitude>0</Longitude>
        <SearchRadiusInKm>0</SearchRadiusInKm>
      </Location>
      <Name>String</Name>
      <UpdatedAt xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </UpdatedAt>
    </SavedSearchDto>
  </Searches>
</GetSavedSearchesResponse>