public async Task <JourneyResponseModel> GetJourneys(SessionDeviceDataModel sessionDeviceModel, JourneyRequestDataModel journeyModel) => await Execute <JourneyRequestModel, JourneyResponseModel>("journey/getbusjourneys", new JourneyRequestModel { Data = journeyModel, DeviceSession = sessionDeviceModel, Date = DateTime.UtcNow, Language = "tr-TR" });
public async Task <BusLocationResponseModel> GetBusLocations(SessionDeviceDataModel sessionDeviceModel) => await Execute <BusLocationRequestModel, BusLocationResponseModel>("location/getbuslocations", new BusLocationRequestModel { Data = null, Language = "tr-TR", DeviceSession = sessionDeviceModel, Date = DateTime.UtcNow, });
public async Task <SessionDeviceDataModel> GetSessionDeviceData() { SessionDeviceDataModel model = default; var sessionValue = _session.GetString(_deviceDataSessionKey); if (string.IsNullOrWhiteSpace(sessionValue)) { model = (await _mediator.Send(new GetSessionQuery()))?.Data; } else { model = JsonConvert.DeserializeObject <SessionDeviceDataModel>(sessionValue); } return(model); }
public void SetSessionDeviceData(SessionDeviceDataModel model) => _session.SetString(_deviceDataSessionKey, JsonConvert.SerializeObject(model));