Ejemplo n.º 1
0
 public static string CistEntityTimetableUrl(TimetableEntityType entity, long entityId, DateTime dateStart, DateTime dateEnd)
 => $"http://cist.nure.ua/ias/app/tt/P_API_EVEN_JSON" +
 $"?type_id={(int)entity}" +
 $"&timetable_id={entityId}" +
 $"&time_from={new DateTimeOffset(dateStart.Date).ToUnixTimeSeconds()}" +
 $"&time_to={new DateTimeOffset(dateEnd.Date.AddDays(1)).ToUnixTimeSeconds()}" +
 $"&idClient={Keys.CistApiKey}";
Ejemplo n.º 2
0
 public static Uri CistApiEntityTimetable(TimetableEntityType entity, long entityId, DateTime dateStart, DateTime dateEnd) =>
Ejemplo n.º 3
0
        Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);     // FileSystem.AppDataDirectory

        public static string SavedTimetable(TimetableEntityType type, long entityId) =>
        Path.Combine(LocalStorage, $"timetable_{(int)type}_{entityId}.json");
Ejemplo n.º 4
0
 public Entity(long id, string name, TimetableEntityType type) => (ID, Name, Type) = (id, name, type);