| Requires the role: | 3rdPartySearch | Required permission: | EventsSearch |
| GET | /EventsWithLocation | ||
|---|---|---|---|
| POST/GET | /EventsWithLocation/MaxDays/{MaxDays} |
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Status:
status_code: Optional[int] = None
status_message: Optional[str] = None
status_details: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventWithLocation:
id: Optional[int] = None
name: Optional[str] = None
description: Optional[str] = None
time_of_event: Optional[datetime.datetime] = None
event_active: Optional[bool] = None
event_series_active: Optional[bool] = None
event_location_name: Optional[str] = None
latitude: Optional[Decimal] = None
longitude: Optional[Decimal] = None
address_name: Optional[str] = None
address_line: Optional[str] = None
zip: Optional[str] = None
city: Optional[str] = None
country_code: Optional[str] = None
post_poned_no_date: Optional[bool] = None
end_of_event: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventsWithLocationResult:
status: Optional[Status] = None
data: Optional[List[EventWithLocation]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventsWithLocationRequest:
max_days: Optional[int] = None
Python EventsWithLocationRequest 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 /EventsWithLocation HTTP/1.1 Host: stubbur-app.azurewebsites.net Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
status:
{
statusCode: 0,
statusMessage: String,
statusDetails: String
},
data:
[
{
id: 0,
name: String,
description: String,
timeOfEvent: 0001-01-01,
eventActive: False,
eventSeriesActive: False,
eventLocationName: String,
latitude: 0,
longitude: 0,
addressName: String,
addressLine: String,
zip: String,
city: String,
countryCode: String,
postPonedNoDate: False,
endOfEvent: 0001-01-01
}
]
}