| Required role: | Consumer |
| GET | /searches/GetSavedSearches |
|---|
<?php namespace ConsumerApi;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
enum Parking : string
{
case StreetParking = 'StreetParking';
case ParkingGarageNearby = 'ParkingGarageNearby';
}
enum PaymentOption : string
{
case Visa = 'Visa';
case MasterCard = 'MasterCard';
case AmericanExpress = 'AmericanExpress';
case Diners = 'Diners';
case Vipps = 'Vipps';
}
enum PriceMainDish : string
{
case Value = 'Value';
case Medium = 'Medium';
case High = 'High';
case FineDining = 'FineDining';
}
enum DayOfWeek : string
{
case Sunday = 'Sunday';
case Monday = 'Monday';
case Tuesday = 'Tuesday';
case Wednesday = 'Wednesday';
case Thursday = 'Thursday';
case Friday = 'Friday';
case Saturday = 'Saturday';
}
class OpenAtTimeDto implements JsonSerializable
{
public function __construct(
/** @var DayOfWeek|null */
public ?DayOfWeek $weekDay=null,
/** @var int */
public int $hour=0,
/** @var int */
public int $minute=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['weekDay'])) $this->weekDay = JsonConverters::from('DayOfWeek', $o['weekDay']);
if (isset($o['hour'])) $this->hour = $o['hour'];
if (isset($o['minute'])) $this->minute = $o['minute'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->weekDay)) $o['weekDay'] = JsonConverters::to('DayOfWeek', $this->weekDay);
if (isset($this->hour)) $o['hour'] = $this->hour;
if (isset($this->minute)) $o['minute'] = $this->minute;
return empty($o) ? new class(){} : $o;
}
}
class CategoryDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $name='',
/** @var string */
public string $slug='',
/** @var string */
public string $absoluteSlug='',
/** @var string|null */
public ?string $imageUrl=null,
/** @var string|null */
public ?string $allImageUrl=null,
/** @var string|null */
public ?string $iconImageUrl=null,
/** @var int */
public int $position=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['absoluteSlug'])) $this->absoluteSlug = $o['absoluteSlug'];
if (isset($o['imageUrl'])) $this->imageUrl = $o['imageUrl'];
if (isset($o['allImageUrl'])) $this->allImageUrl = $o['allImageUrl'];
if (isset($o['iconImageUrl'])) $this->iconImageUrl = $o['iconImageUrl'];
if (isset($o['position'])) $this->position = $o['position'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->absoluteSlug)) $o['absoluteSlug'] = $this->absoluteSlug;
if (isset($this->imageUrl)) $o['imageUrl'] = $this->imageUrl;
if (isset($this->allImageUrl)) $o['allImageUrl'] = $this->allImageUrl;
if (isset($this->iconImageUrl)) $o['iconImageUrl'] = $this->iconImageUrl;
if (isset($this->position)) $o['position'] = $this->position;
return empty($o) ? new class(){} : $o;
}
}
class BarSpecialityEsDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $slug='',
/** @var string */
public string $title=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['title'])) $this->title = $o['title'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->title)) $o['title'] = $this->title;
return empty($o) ? new class(){} : $o;
}
}
class BarTypeEsDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $slug='',
/** @var string */
public string $title=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['title'])) $this->title = $o['title'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->title)) $o['title'] = $this->title;
return empty($o) ? new class(){} : $o;
}
}
class BrandApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $name=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['name'])) $this->name = $o['name'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->name)) $o['name'] = $this->name;
return empty($o) ? new class(){} : $o;
}
}
class CuisineEsDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $label='',
/** @var string */
public string $slug=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['label'])) $this->label = $o['label'];
if (isset($o['slug'])) $this->slug = $o['slug'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->label)) $o['label'] = $this->label;
if (isset($this->slug)) $o['slug'] = $this->slug;
return empty($o) ? new class(){} : $o;
}
}
class MealTypeApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $label='',
/** @var string */
public string $slug=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['label'])) $this->label = $o['label'];
if (isset($o['slug'])) $this->slug = $o['slug'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->label)) $o['label'] = $this->label;
if (isset($this->slug)) $o['slug'] = $this->slug;
return empty($o) ? new class(){} : $o;
}
}
class ParkingApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $label='',
/** @var Parking|null */
public ?Parking $slug=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['label'])) $this->label = $o['label'];
if (isset($o['slug'])) $this->slug = JsonConverters::from('Parking', $o['slug']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->label)) $o['label'] = $this->label;
if (isset($this->slug)) $o['slug'] = JsonConverters::to('Parking', $this->slug);
return empty($o) ? new class(){} : $o;
}
}
class PaymentOptionApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $label='',
/** @var PaymentOption|null */
public ?PaymentOption $slug=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['label'])) $this->label = $o['label'];
if (isset($o['slug'])) $this->slug = JsonConverters::from('PaymentOption', $o['slug']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->label)) $o['label'] = $this->label;
if (isset($this->slug)) $o['slug'] = JsonConverters::to('PaymentOption', $this->slug);
return empty($o) ? new class(){} : $o;
}
}
class PriceMainDishApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $title='',
/** @var PriceMainDish|null */
public ?PriceMainDish $slug=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['slug'])) $this->slug = JsonConverters::from('PriceMainDish', $o['slug']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->slug)) $o['slug'] = JsonConverters::to('PriceMainDish', $this->slug);
return empty($o) ? new class(){} : $o;
}
}
class EatingSuitabilityApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $label='',
/** @var string */
public string $slug=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['label'])) $this->label = $o['label'];
if (isset($o['slug'])) $this->slug = $o['slug'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->label)) $o['label'] = $this->label;
if (isset($this->slug)) $o['slug'] = $this->slug;
return empty($o) ? new class(){} : $o;
}
}
class TakeAwayApiDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $label='',
/** @var string */
public string $slug=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['label'])) $this->label = $o['label'];
if (isset($o['slug'])) $this->slug = $o['slug'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->label)) $o['label'] = $this->label;
if (isset($this->slug)) $o['slug'] = $this->slug;
return empty($o) ? new class(){} : $o;
}
}
class WearPriceProfileEsDto implements JsonSerializable
{
public function __construct(
/** @var string */
public string $slug='',
/** @var string */
public string $label=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['slug'])) $this->slug = $o['slug'];
if (isset($o['label'])) $this->label = $o['label'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->slug)) $o['slug'] = $this->slug;
if (isset($this->label)) $o['label'] = $this->label;
return empty($o) ? new class(){} : $o;
}
}
PHP GetSavedSearchesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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: 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>