1export namespace atsc3 {2 3 export class Service {4 display: string;5 major: number;6 minor: number;7 network: string;8 name: string;9 atsc1Call: string;10 atsc1Display: string;11 12 static createFrom(source: any = {}) {13 return new Service(source);14 }15 16 constructor(source: any = {}) {17 if ('string' === typeof source) source = JSON.parse(source);18 this.display = source["display"];19 this.major = source["major"];20 this.minor = source["minor"];21 this.network = source["network"];22 this.name = source["name"];23 this.atsc1Call = source["atsc1Call"];24 this.atsc1Display = source["atsc1Display"];25 }26 }27 export class Host {28 market: string;29 callSign: string;30 facilityId: number;31 rf: string;32 launched: string;33 simulcast: string;34 services: Service[];35 36 static createFrom(source: any = {}) {37 return new Host(source);38 }39 40 constructor(source: any = {}) {41 if ('string' === typeof source) source = JSON.parse(source);42 this.market = source["market"];43 this.callSign = source["callSign"];44 this.facilityId = source["facilityId"];45 this.rf = source["rf"];46 this.launched = source["launched"];47 this.simulcast = source["simulcast"];48 this.services = this.convertValues(source["services"], Service);49 }50 51 convertValues(a: any, classs: any, asMap: boolean = false): any {52 if (!a) {53 return a;54 }55 if (a.slice && a.map) {56 return (a as any[]).map(elem => this.convertValues(elem, classs));57 } else if ("object" === typeof a) {58 if (asMap) {59 for (const key of Object.keys(a)) {60 a[key] = new classs(a[key]);61 }62 return a;63 }64 return new classs(a);65 }66 return a;67 }68 }6970}7172export namespace dvr {73 74 export class Item {75 id: string;76 key: string;77 ruleId?: string;78 title: string;79 subtitle?: string;80 description?: string;81 image?: string;82 channel: string;83 callSign?: string;84 start: time.Time;85 end: time.Time;86 status: string;87 detail?: string;88 until: time.Time;89 sizeBytes?: number;90 duration?: number;91 position?: number;92 watched?: boolean;93 94 static createFrom(source: any = {}) {95 return new Item(source);96 }97 98 constructor(source: any = {}) {99 if ('string' === typeof source) source = JSON.parse(source);100 this.id = source["id"];101 this.key = source["key"];102 this.ruleId = source["ruleId"];103 this.title = source["title"];104 this.subtitle = source["subtitle"];105 this.description = source["description"];106 this.image = source["image"];107 this.channel = source["channel"];108 this.callSign = source["callSign"];109 this.start = this.convertValues(source["start"], time.Time);110 this.end = this.convertValues(source["end"], time.Time);111 this.status = source["status"];112 this.detail = source["detail"];113 this.until = this.convertValues(source["until"], time.Time);114 this.sizeBytes = source["sizeBytes"];115 this.duration = source["duration"];116 this.position = source["position"];117 this.watched = source["watched"];118 }119 120 convertValues(a: any, classs: any, asMap: boolean = false): any {121 if (!a) {122 return a;123 }124 if (a.slice && a.map) {125 return (a as any[]).map(elem => this.convertValues(elem, classs));126 } else if ("object" === typeof a) {127 if (asMap) {128 for (const key of Object.keys(a)) {129 a[key] = new classs(a[key]);130 }131 return a;132 }133 return new classs(a);134 }135 return a;136 }137 }138 export class Prefs {139 deleteWatchedAfterDays: number;140 141 static createFrom(source: any = {}) {142 return new Prefs(source);143 }144 145 constructor(source: any = {}) {146 if ('string' === typeof source) source = JSON.parse(source);147 this.deleteWatchedAfterDays = source["deleteWatchedAfterDays"];148 }149 }150 export class Request {151 kind: string;152 channel: string;153 callSign: string;154 start: time.Time;155 newOnly: boolean;156 157 static createFrom(source: any = {}) {158 return new Request(source);159 }160 161 constructor(source: any = {}) {162 if ('string' === typeof source) source = JSON.parse(source);163 this.kind = source["kind"];164 this.channel = source["channel"];165 this.callSign = source["callSign"];166 this.start = this.convertValues(source["start"], time.Time);167 this.newOnly = source["newOnly"];168 }169 170 convertValues(a: any, classs: any, asMap: boolean = false): any {171 if (!a) {172 return a;173 }174 if (a.slice && a.map) {175 return (a as any[]).map(elem => this.convertValues(elem, classs));176 } else if ("object" === typeof a) {177 if (asMap) {178 for (const key of Object.keys(a)) {179 a[key] = new classs(a[key]);180 }181 return a;182 }183 return new classs(a);184 }185 return a;186 }187 }188 export class Rule {189 id: string;190 kind: string;191 title: string;192 channel: string;193 callSign: string;194 guideId: string;195 seriesId?: string;196 newOnly?: boolean;197 image?: string;198 created: time.Time;199 start: time.Time;200 end: time.Time;201 subtitle?: string;202 description?: string;203 programId?: string;204 sports?: boolean;205 skip?: string[];206 keep?: number;207 208 static createFrom(source: any = {}) {209 return new Rule(source);210 }211 212 constructor(source: any = {}) {213 if ('string' === typeof source) source = JSON.parse(source);214 this.id = source["id"];215 this.kind = source["kind"];216 this.title = source["title"];217 this.channel = source["channel"];218 this.callSign = source["callSign"];219 this.guideId = source["guideId"];220 this.seriesId = source["seriesId"];221 this.newOnly = source["newOnly"];222 this.image = source["image"];223 this.created = this.convertValues(source["created"], time.Time);224 this.start = this.convertValues(source["start"], time.Time);225 this.end = this.convertValues(source["end"], time.Time);226 this.subtitle = source["subtitle"];227 this.description = source["description"];228 this.programId = source["programId"];229 this.sports = source["sports"];230 this.skip = source["skip"];231 this.keep = source["keep"];232 }233 234 convertValues(a: any, classs: any, asMap: boolean = false): any {235 if (!a) {236 return a;237 }238 if (a.slice && a.map) {239 return (a as any[]).map(elem => this.convertValues(elem, classs));240 } else if ("object" === typeof a) {241 if (asMap) {242 for (const key of Object.keys(a)) {243 a[key] = new classs(a[key]);244 }245 return a;246 }247 return new classs(a);248 }249 return a;250 }251 }252 export class RuleUpdate {253 keep: number;254 newOnly: boolean;255 256 static createFrom(source: any = {}) {257 return new RuleUpdate(source);258 }259 260 constructor(source: any = {}) {261 if ('string' === typeof source) source = JSON.parse(source);262 this.keep = source["keep"];263 this.newOnly = source["newOnly"];264 }265 }266 export class State {267 available: boolean;268 reason?: string;269 rules: Rule[];270 upcoming: Item[];271 recorded: Item[];272 prefs: Prefs;273 274 static createFrom(source: any = {}) {275 return new State(source);276 }277 278 constructor(source: any = {}) {279 if ('string' === typeof source) source = JSON.parse(source);280 this.available = source["available"];281 this.reason = source["reason"];282 this.rules = this.convertValues(source["rules"], Rule);283 this.upcoming = this.convertValues(source["upcoming"], Item);284 this.recorded = this.convertValues(source["recorded"], Item);285 this.prefs = this.convertValues(source["prefs"], Prefs);286 }287 288 convertValues(a: any, classs: any, asMap: boolean = false): any {289 if (!a) {290 return a;291 }292 if (a.slice && a.map) {293 return (a as any[]).map(elem => this.convertValues(elem, classs));294 } else if ("object" === typeof a) {295 if (asMap) {296 for (const key of Object.keys(a)) {297 a[key] = new classs(a[key]);298 }299 return a;300 }301 return new classs(a);302 }303 return a;304 }305 }306307}308309export namespace geo {310 311 export class Point {312 lat: number;313 lon: number;314 315 static createFrom(source: any = {}) {316 return new Point(source);317 }318 319 constructor(source: any = {}) {320 if ('string' === typeof source) source = JSON.parse(source);321 this.lat = source["lat"];322 this.lon = source["lon"];323 }324 }325 export class Place {326 zip: string;327 name: string;328 state: string;329 point: Point;330 331 static createFrom(source: any = {}) {332 return new Place(source);333 }334 335 constructor(source: any = {}) {336 if ('string' === typeof source) source = JSON.parse(source);337 this.zip = source["zip"];338 this.name = source["name"];339 this.state = source["state"];340 this.point = this.convertValues(source["point"], Point);341 }342 343 convertValues(a: any, classs: any, asMap: boolean = false): any {344 if (!a) {345 return a;346 }347 if (a.slice && a.map) {348 return (a as any[]).map(elem => this.convertValues(elem, classs));349 } else if ("object" === typeof a) {350 if (asMap) {351 for (const key of Object.keys(a)) {352 a[key] = new classs(a[key]);353 }354 return a;355 }356 return new classs(a);357 }358 return a;359 }360 }361362}363364export namespace guide {365 366 export class Channel {367 id: string;368 number: string;369 callSign: string;370 network: string;371 logo: string;372 logoDark?: string;373 374 static createFrom(source: any = {}) {375 return new Channel(source);376 }377 378 constructor(source: any = {}) {379 if ('string' === typeof source) source = JSON.parse(source);380 this.id = source["id"];381 this.number = source["number"];382 this.callSign = source["callSign"];383 this.network = source["network"];384 this.logo = source["logo"];385 this.logoDark = source["logoDark"];386 }387 }388 export class Guide {389 lineup: string;390 start: time.Time;391 end: time.Time;392 fetched: time.Time;393 channels: Channel[];394 programs: Record<string, Array<Program>>;395 396 static createFrom(source: any = {}) {397 return new Guide(source);398 }399 400 constructor(source: any = {}) {401 if ('string' === typeof source) source = JSON.parse(source);402 this.lineup = source["lineup"];403 this.start = this.convertValues(source["start"], time.Time);404 this.end = this.convertValues(source["end"], time.Time);405 this.fetched = this.convertValues(source["fetched"], time.Time);406 this.channels = this.convertValues(source["channels"], Channel);407 this.programs = this.convertValues(source["programs"], Array<Program>, true);408 }409 410 convertValues(a: any, classs: any, asMap: boolean = false): any {411 if (!a) {412 return a;413 }414 if (a.slice && a.map) {415 return (a as any[]).map(elem => this.convertValues(elem, classs));416 } else if ("object" === typeof a) {417 if (asMap) {418 for (const key of Object.keys(a)) {419 a[key] = new classs(a[key]);420 }421 return a;422 }423 return new classs(a);424 }425 return a;426 }427 }428 export class Program {429 start: time.Time;430 end: time.Time;431 title: string;432 episodeTitle?: string;433 description?: string;434 season?: string;435 episode?: string;436 rating?: string;437 year?: string;438 flags?: string[];439 tags?: string[];440 genres?: string[];441 image?: string;442 programId?: string;443 seriesId?: string;444 audioLang?: string;445 originalAirDate?: string;446 cast?: string[];447 runtime?: number;448 stars?: number;449 homeTeam?: string;450 awayTeam?: string;451 452 static createFrom(source: any = {}) {453 return new Program(source);454 }455 456 constructor(source: any = {}) {457 if ('string' === typeof source) source = JSON.parse(source);458 this.start = this.convertValues(source["start"], time.Time);459 this.end = this.convertValues(source["end"], time.Time);460 this.title = source["title"];461 this.episodeTitle = source["episodeTitle"];462 this.description = source["description"];463 this.season = source["season"];464 this.episode = source["episode"];465 this.rating = source["rating"];466 this.year = source["year"];467 this.flags = source["flags"];468 this.tags = source["tags"];469 this.genres = source["genres"];470 this.image = source["image"];471 this.programId = source["programId"];472 this.seriesId = source["seriesId"];473 this.audioLang = source["audioLang"];474 this.originalAirDate = source["originalAirDate"];475 this.cast = source["cast"];476 this.runtime = source["runtime"];477 this.stars = source["stars"];478 this.homeTeam = source["homeTeam"];479 this.awayTeam = source["awayTeam"];480 }481 482 convertValues(a: any, classs: any, asMap: boolean = false): any {483 if (!a) {484 return a;485 }486 if (a.slice && a.map) {487 return (a as any[]).map(elem => this.convertValues(elem, classs));488 } else if ("object" === typeof a) {489 if (asMap) {490 for (const key of Object.keys(a)) {491 a[key] = new classs(a[key]);492 }493 return a;494 }495 return new classs(a);496 }497 return a;498 }499 }500501}502503export namespace lineup {504 505 export class Carriage {506 hostCall: string;507 facilityId: number;508 rf: string;509 display: string;510 tier: Record<string, string>;511 512 static createFrom(source: any = {}) {513 return new Carriage(source);514 }515 516 constructor(source: any = {}) {517 if ('string' === typeof source) source = JSON.parse(source);518 this.hostCall = source["hostCall"];519 this.facilityId = source["facilityId"];520 this.rf = source["rf"];521 this.display = source["display"];522 this.tier = source["tier"];523 }524 }525 export class Channel {526 number: string;527 major: number;528 minor: number;529 guideId?: string;530 callSign: string;531 baseCall: string;532 network: string;533 logo?: string;534 facilityId: number;535 via?: string;536 tier: Record<string, string>;537 atsc3?: Carriage;538 atsc3Only?: boolean;539 540 static createFrom(source: any = {}) {541 return new Channel(source);542 }543 544 constructor(source: any = {}) {545 if ('string' === typeof source) source = JSON.parse(source);546 this.number = source["number"];547 this.major = source["major"];548 this.minor = source["minor"];549 this.guideId = source["guideId"];550 this.callSign = source["callSign"];551 this.baseCall = source["baseCall"];552 this.network = source["network"];553 this.logo = source["logo"];554 this.facilityId = source["facilityId"];555 this.via = source["via"];556 this.tier = source["tier"];557 this.atsc3 = this.convertValues(source["atsc3"], Carriage);558 this.atsc3Only = source["atsc3Only"];559 }560 561 convertValues(a: any, classs: any, asMap: boolean = false): any {562 if (!a) {563 return a;564 }565 if (a.slice && a.map) {566 return (a as any[]).map(elem => this.convertValues(elem, classs));567 } else if ("object" === typeof a) {568 if (asMap) {569 for (const key of Object.keys(a)) {570 a[key] = new classs(a[key]);571 }572 return a;573 }574 return new classs(a);575 }576 return a;577 }578 }579 export class Source {580 name: string;581 url: string;582 use: string;583 584 static createFrom(source: any = {}) {585 return new Source(source);586 }587 588 constructor(source: any = {}) {589 if ('string' === typeof source) source = JSON.parse(source);590 this.name = source["name"];591 this.url = source["url"];592 this.use = source["use"];593 }594 }595 export class Station {596 callSign: string;597 baseCall: string;598 service: string;599 rfChannel: number;600 virtualChannel: number;601 status: string;602 city: string;603 state: string;604 facilityId: number;605 licensee: string;606 erpKw: number;607 haatM: number;608 rcamslM: number;609 rcaglM: number;610 directional: boolean;611 point: geo.Point;612 distanceKm: number;613 bearingDeg: number;614 band: string;615 signal?: Record<string, reception.Estimate>;616 atsc3: boolean;617 carries: string[];618 619 static createFrom(source: any = {}) {620 return new Station(source);621 }622 623 constructor(source: any = {}) {624 if ('string' === typeof source) source = JSON.parse(source);625 this.callSign = source["callSign"];626 this.baseCall = source["baseCall"];627 this.service = source["service"];628 this.rfChannel = source["rfChannel"];629 this.virtualChannel = source["virtualChannel"];630 this.status = source["status"];631 this.city = source["city"];632 this.state = source["state"];633 this.facilityId = source["facilityId"];634 this.licensee = source["licensee"];635 this.erpKw = source["erpKw"];636 this.haatM = source["haatM"];637 this.rcamslM = source["rcamslM"];638 this.rcaglM = source["rcaglM"];639 this.directional = source["directional"];640 this.point = this.convertValues(source["point"], geo.Point);641 this.distanceKm = source["distanceKm"];642 this.bearingDeg = source["bearingDeg"];643 this.band = source["band"];644 this.signal = this.convertValues(source["signal"], reception.Estimate, true);645 this.atsc3 = source["atsc3"];646 this.carries = source["carries"];647 }648 649 convertValues(a: any, classs: any, asMap: boolean = false): any {650 if (!a) {651 return a;652 }653 if (a.slice && a.map) {654 return (a as any[]).map(elem => this.convertValues(elem, classs));655 } else if ("object" === typeof a) {656 if (asMap) {657 for (const key of Object.keys(a)) {658 a[key] = new classs(a[key]);659 }660 return a;661 }662 return new classs(a);663 }664 return a;665 }666 }667 export class Report {668 generated: time.Time;669 place: geo.Place;670 point: geo.Point;671 radiusKm: number;672 presets?: reception.Preset[];673 stations: Station[];674 channels: Channel[];675 atsc3: atsc3.Host[];676 sources: Source[];677 warnings: string[];678 679 static createFrom(source: any = {}) {680 return new Report(source);681 }682 683 constructor(source: any = {}) {684 if ('string' === typeof source) source = JSON.parse(source);685 this.generated = this.convertValues(source["generated"], time.Time);686 this.place = this.convertValues(source["place"], geo.Place);687 this.point = this.convertValues(source["point"], geo.Point);688 this.radiusKm = source["radiusKm"];689 this.presets = this.convertValues(source["presets"], reception.Preset);690 this.stations = this.convertValues(source["stations"], Station);691 this.channels = this.convertValues(source["channels"], Channel);692 this.atsc3 = this.convertValues(source["atsc3"], atsc3.Host);693 this.sources = this.convertValues(source["sources"], Source);694 this.warnings = source["warnings"];695 }696 697 convertValues(a: any, classs: any, asMap: boolean = false): any {698 if (!a) {699 return a;700 }701 if (a.slice && a.map) {702 return (a as any[]).map(elem => this.convertValues(elem, classs));703 } else if ("object" === typeof a) {704 if (asMap) {705 for (const key of Object.keys(a)) {706 a[key] = new classs(a[key]);707 }708 return a;709 }710 return new classs(a);711 }712 return a;713 }714 }715 716717}718719export namespace main {720 721 export class Boot {722 settings: store.Settings;723 info: service.Info;724 config: service.Config;725 error?: string;726 serverUrl?: string;727 view: string;728 lite?: string;729 autoScale: number;730 nativeZoom?: boolean;731 version: string;732 platform: string;733 734 static createFrom(source: any = {}) {735 return new Boot(source);736 }737 738 constructor(source: any = {}) {739 if ('string' === typeof source) source = JSON.parse(source);740 this.settings = this.convertValues(source["settings"], store.Settings);741 this.info = this.convertValues(source["info"], service.Info);742 this.config = this.convertValues(source["config"], service.Config);743 this.error = source["error"];744 this.serverUrl = source["serverUrl"];745 this.view = source["view"];746 this.lite = source["lite"];747 this.autoScale = source["autoScale"];748 this.nativeZoom = source["nativeZoom"];749 this.version = source["version"];750 this.platform = source["platform"];751 }752 753 convertValues(a: any, classs: any, asMap: boolean = false): any {754 if (!a) {755 return a;756 }757 if (a.slice && a.map) {758 return (a as any[]).map(elem => this.convertValues(elem, classs));759 } else if ("object" === typeof a) {760 if (asMap) {761 for (const key of Object.keys(a)) {762 a[key] = new classs(a[key]);763 }764 return a;765 }766 return new classs(a);767 }768 return a;769 }770 }771772}773774export namespace phase {775 776 export class Mark {777 name: string;778 ms: number;779 780 static createFrom(source: any = {}) {781 return new Mark(source);782 }783 784 constructor(source: any = {}) {785 if ('string' === typeof source) source = JSON.parse(source);786 this.name = source["name"];787 this.ms = source["ms"];788 }789 }790791}792793export namespace podcast {794 795 export class Episode {796 id: string;797 showId: string;798 title: string;799 description: string;800 published: time.Time;801 duration: number;802 thumbnail: string;803 position: number;804 watched: boolean;805 806 static createFrom(source: any = {}) {807 return new Episode(source);808 }809 810 constructor(source: any = {}) {811 if ('string' === typeof source) source = JSON.parse(source);812 this.id = source["id"];813 this.showId = source["showId"];814 this.title = source["title"];815 this.description = source["description"];816 this.published = this.convertValues(source["published"], time.Time);817 this.duration = source["duration"];818 this.thumbnail = source["thumbnail"];819 this.position = source["position"];820 this.watched = source["watched"];821 }822 823 convertValues(a: any, classs: any, asMap: boolean = false): any {824 if (!a) {825 return a;826 }827 if (a.slice && a.map) {828 return (a as any[]).map(elem => this.convertValues(elem, classs));829 } else if ("object" === typeof a) {830 if (asMap) {831 for (const key of Object.keys(a)) {832 a[key] = new classs(a[key]);833 }834 return a;835 }836 return new classs(a);837 }838 return a;839 }840 }841 export class Found {842 id: string;843 title: string;844 url: string;845 thumbnail: string;846 description: string;847 subscribers: number;848 849 static createFrom(source: any = {}) {850 return new Found(source);851 }852 853 constructor(source: any = {}) {854 if ('string' === typeof source) source = JSON.parse(source);855 this.id = source["id"];856 this.title = source["title"];857 this.url = source["url"];858 this.thumbnail = source["thumbnail"];859 this.description = source["description"];860 this.subscribers = source["subscribers"];861 }862 }863 export class Show {864 id: string;865 title: string;866 url: string;867 thumbnail: string;868 minMinutes: number;869 error?: string;870 episodes: Episode[];871 872 static createFrom(source: any = {}) {873 return new Show(source);874 }875 876 constructor(source: any = {}) {877 if ('string' === typeof source) source = JSON.parse(source);878 this.id = source["id"];879 this.title = source["title"];880 this.url = source["url"];881 this.thumbnail = source["thumbnail"];882 this.minMinutes = source["minMinutes"];883 this.error = source["error"];884 this.episodes = this.convertValues(source["episodes"], Episode);885 }886 887 convertValues(a: any, classs: any, asMap: boolean = false): any {888 if (!a) {889 return a;890 }891 if (a.slice && a.map) {892 return (a as any[]).map(elem => this.convertValues(elem, classs));893 } else if ("object" === typeof a) {894 if (asMap) {895 for (const key of Object.keys(a)) {896 a[key] = new classs(a[key]);897 }898 return a;899 }900 return new classs(a);901 }902 return a;903 }904 }905 export class State {906 shows: Show[];907 updating: boolean;908 listed: time.Time;909 910 static createFrom(source: any = {}) {911 return new State(source);912 }913 914 constructor(source: any = {}) {915 if ('string' === typeof source) source = JSON.parse(source);916 this.shows = this.convertValues(source["shows"], Show);917 this.updating = source["updating"];918 this.listed = this.convertValues(source["listed"], time.Time);919 }920 921 convertValues(a: any, classs: any, asMap: boolean = false): any {922 if (!a) {923 return a;924 }925 if (a.slice && a.map) {926 return (a as any[]).map(elem => this.convertValues(elem, classs));927 } else if ("object" === typeof a) {928 if (asMap) {929 for (const key of Object.keys(a)) {930 a[key] = new classs(a[key]);931 }932 return a;933 }934 return new classs(a);935 }936 return a;937 }938 }939940}941942export namespace reception {943 944 export class Estimate {945 preset: string;946 powerDbm: number;947 noiseMarginDb: number;948 fieldDbuVm: number;949 pathLossDb: number;950 diffractionDb: number;951 lineOfSight: boolean;952 tier: string;953 954 static createFrom(source: any = {}) {955 return new Estimate(source);956 }957 958 constructor(source: any = {}) {959 if ('string' === typeof source) source = JSON.parse(source);960 this.preset = source["preset"];961 this.powerDbm = source["powerDbm"];962 this.noiseMarginDb = source["noiseMarginDb"];963 this.fieldDbuVm = source["fieldDbuVm"];964 this.pathLossDb = source["pathLossDb"];965 this.diffractionDb = source["diffractionDb"];966 this.lineOfSight = source["lineOfSight"];967 this.tier = source["tier"];968 }969 }970 export class Preset {971 name: string;972 label: string;973 heightM: number;974 gainDbi: Record<string, number>;975 lossDb: number;976 977 static createFrom(source: any = {}) {978 return new Preset(source);979 }980 981 constructor(source: any = {}) {982 if ('string' === typeof source) source = JSON.parse(source);983 this.name = source["name"];984 this.label = source["label"];985 this.heightM = source["heightM"];986 this.gainDbi = source["gainDbi"];987 this.lossDb = source["lossDb"];988 }989 }990991}992993export namespace service {994 995 export class SweepStatus {996 running: boolean;997 startedAt?: time.Time;998 finishedAt?: time.Time;999 total: number;1000 found: number;1001 done: number;1002 rf?: number;1003 note?: string;1004 1005 static createFrom(source: any = {}) {1006 return new SweepStatus(source);1007 }1008 1009 constructor(source: any = {}) {1010 if ('string' === typeof source) source = JSON.parse(source);1011 this.running = source["running"];1012 this.startedAt = this.convertValues(source["startedAt"], time.Time);1013 this.finishedAt = this.convertValues(source["finishedAt"], time.Time);1014 this.total = source["total"];1015 this.found = source["found"];1016 this.done = source["done"];1017 this.rf = source["rf"];1018 this.note = source["note"];1019 }1020 1021 convertValues(a: any, classs: any, asMap: boolean = false): any {1022 if (!a) {1023 return a;1024 }1025 if (a.slice && a.map) {1026 return (a as any[]).map(elem => this.convertValues(elem, classs));1027 } else if ("object" === typeof a) {1028 if (asMap) {1029 for (const key of Object.keys(a)) {1030 a[key] = new classs(a[key]);1031 }1032 return a;1033 }1034 return new classs(a);1035 }1036 return a;1037 }1038 }1039 export class MuxStation {1040 facilityId: number;1041 callSign: string;1042 virtualChannel: number;1043 service: string;1044 city: string;1045 state: string;1046 distanceKm: number;1047 bearingDeg: number;1048 erpKw: number;1049 haatM: number;1050 atsc3: boolean;1051 1052 static createFrom(source: any = {}) {1053 return new MuxStation(source);1054 }1055 1056 constructor(source: any = {}) {1057 if ('string' === typeof source) source = JSON.parse(source);1058 this.facilityId = source["facilityId"];1059 this.callSign = source["callSign"];1060 this.virtualChannel = source["virtualChannel"];1061 this.service = source["service"];1062 this.city = source["city"];1063 this.state = source["state"];1064 this.distanceKm = source["distanceKm"];1065 this.bearingDeg = source["bearingDeg"];1066 this.erpKw = source["erpKw"];1067 this.haatM = source["haatM"];1068 this.atsc3 = source["atsc3"];1069 }1070 }1071 export class MuxSignal {1072 rf: number;1073 frequencyMhz: number;1074 band: string;1075 tuned: boolean;1076 channels: string[];1077 stations: MuxStation[];1078 signal?: signal.Reading;1079 history?: signal.History;1080 1081 static createFrom(source: any = {}) {1082 return new MuxSignal(source);1083 }1084 1085 constructor(source: any = {}) {1086 if ('string' === typeof source) source = JSON.parse(source);1087 this.rf = source["rf"];1088 this.frequencyMhz = source["frequencyMhz"];1089 this.band = source["band"];1090 this.tuned = source["tuned"];1091 this.channels = source["channels"];1092 this.stations = this.convertValues(source["stations"], MuxStation);1093 this.signal = this.convertValues(source["signal"], signal.Reading);1094 this.history = this.convertValues(source["history"], signal.History);1095 }1096 1097 convertValues(a: any, classs: any, asMap: boolean = false): any {1098 if (!a) {1099 return a;1100 }1101 if (a.slice && a.map) {1102 return (a as any[]).map(elem => this.convertValues(elem, classs));1103 } else if ("object" === typeof a) {1104 if (asMap) {1105 for (const key of Object.keys(a)) {1106 a[key] = new classs(a[key]);1107 }1108 return a;1109 }1110 return new classs(a);1111 }1112 return a;1113 }1114 }1115 export class AntennaChannel {1116 number: string;1117 major: number;1118 minor: number;1119 name: string;1120 callSign: string;1121 baseCall: string;1122 guideId?: string;1123 guideCallSign?: string;1124 network: string;1125 logo?: string;1126 logoDark?: string;1127 rf: number;1128 facilityId: number;1129 transmitter?: string;1130 via?: string;1131 // Go type: lineup1132 atsc3?: any;1133 signal?: signal.Reading;1134 recent?: signal.Period;1135 1136 static createFrom(source: any = {}) {1137 return new AntennaChannel(source);1138 }1139 1140 constructor(source: any = {}) {1141 if ('string' === typeof source) source = JSON.parse(source);1142 this.number = source["number"];1143 this.major = source["major"];1144 this.minor = source["minor"];1145 this.name = source["name"];1146 this.callSign = source["callSign"];1147 this.baseCall = source["baseCall"];1148 this.guideId = source["guideId"];1149 this.guideCallSign = source["guideCallSign"];1150 this.network = source["network"];1151 this.logo = source["logo"];1152 this.logoDark = source["logoDark"];1153 this.rf = source["rf"];1154 this.facilityId = source["facilityId"];1155 this.transmitter = source["transmitter"];1156 this.via = source["via"];1157 this.atsc3 = this.convertValues(source["atsc3"], null);1158 this.signal = this.convertValues(source["signal"], signal.Reading);1159 this.recent = this.convertValues(source["recent"], signal.Period);1160 }1161 1162 convertValues(a: any, classs: any, asMap: boolean = false): any {1163 if (!a) {1164 return a;1165 }1166 if (a.slice && a.map) {1167 return (a as any[]).map(elem => this.convertValues(elem, classs));1168 } else if ("object" === typeof a) {1169 if (asMap) {1170 for (const key of Object.keys(a)) {1171 a[key] = new classs(a[key]);1172 }1173 return a;1174 }1175 return new classs(a);1176 }1177 return a;1178 }1179 }1180 export class TunerInfo {1181 ready: boolean;1182 reason?: string;1183 name?: string;1184 model?: string;1185 tuners: number;1186 inUse: number;1187 standards: string[];1188 atsc3: boolean;1189 scanning: boolean;1190 1191 static createFrom(source: any = {}) {1192 return new TunerInfo(source);1193 }1194 1195 constructor(source: any = {}) {1196 if ('string' === typeof source) source = JSON.parse(source);1197 this.ready = source["ready"];1198 this.reason = source["reason"];1199 this.name = source["name"];1200 this.model = source["model"];1201 this.tuners = source["tuners"];1202 this.inUse = source["inUse"];1203 this.standards = source["standards"];1204 this.atsc3 = source["atsc3"];1205 this.scanning = source["scanning"];1206 }1207 }1208 export class Antenna {1209 tuner: TunerInfo;1210 channels: AntennaChannel[];1211 muxes: MuxSignal[];1212 sweep: SweepStatus;1213 1214 static createFrom(source: any = {}) {1215 return new Antenna(source);1216 }1217 1218 constructor(source: any = {}) {1219 if ('string' === typeof source) source = JSON.parse(source);1220 this.tuner = this.convertValues(source["tuner"], TunerInfo);1221 this.channels = this.convertValues(source["channels"], AntennaChannel);1222 this.muxes = this.convertValues(source["muxes"], MuxSignal);1223 this.sweep = this.convertValues(source["sweep"], SweepStatus);1224 }1225 1226 convertValues(a: any, classs: any, asMap: boolean = false): any {1227 if (!a) {1228 return a;1229 }1230 if (a.slice && a.map) {1231 return (a as any[]).map(elem => this.convertValues(elem, classs));1232 } else if ("object" === typeof a) {1233 if (asMap) {1234 for (const key of Object.keys(a)) {1235 a[key] = new classs(a[key]);1236 }1237 return a;1238 }1239 return new classs(a);1240 }1241 return a;1242 }1243 }1244 1245 export class ChannelSignal {1246 number: string;1247 rf: number;1248 signal?: signal.Reading;1249 recent?: signal.Period;1250 1251 static createFrom(source: any = {}) {1252 return new ChannelSignal(source);1253 }1254 1255 constructor(source: any = {}) {1256 if ('string' === typeof source) source = JSON.parse(source);1257 this.number = source["number"];1258 this.rf = source["rf"];1259 this.signal = this.convertValues(source["signal"], signal.Reading);1260 this.recent = this.convertValues(source["recent"], signal.Period);1261 }1262 1263 convertValues(a: any, classs: any, asMap: boolean = false): any {1264 if (!a) {1265 return a;1266 }1267 if (a.slice && a.map) {1268 return (a as any[]).map(elem => this.convertValues(elem, classs));1269 } else if ("object" === typeof a) {1270 if (asMap) {1271 for (const key of Object.keys(a)) {1272 a[key] = new classs(a[key]);1273 }1274 return a;1275 }1276 return new classs(a);1277 }1278 return a;1279 }1280 }1281 export class Config {1282 zip: string;1283 lat: number;1284 lon: number;1285 radiusKm: number;1286 guideHours: number;1287 1288 static createFrom(source: any = {}) {1289 return new Config(source);1290 }1291 1292 constructor(source: any = {}) {1293 if ('string' === typeof source) source = JSON.parse(source);1294 this.zip = source["zip"];1295 this.lat = source["lat"];1296 this.lon = source["lon"];1297 this.radiusKm = source["radiusKm"];1298 this.guideHours = source["guideHours"];1299 }1300 }1301 export class CustomChannel {1302 number: string;1303 name: string;1304 kind: string;1305 callSign?: string;1306 category: string;1307 description?: string;1308 logo?: string;1309 programs: guide.Program[];1310 1311 static createFrom(source: any = {}) {1312 return new CustomChannel(source);1313 }1314 1315 constructor(source: any = {}) {1316 if ('string' === typeof source) source = JSON.parse(source);1317 this.number = source["number"];1318 this.name = source["name"];1319 this.kind = source["kind"];1320 this.callSign = source["callSign"];1321 this.category = source["category"];1322 this.description = source["description"];1323 this.logo = source["logo"];1324 this.programs = this.convertValues(source["programs"], guide.Program);1325 }1326 1327 convertValues(a: any, classs: any, asMap: boolean = false): any {1328 if (!a) {1329 return a;1330 }1331 if (a.slice && a.map) {1332 return (a as any[]).map(elem => this.convertValues(elem, classs));1333 } else if ("object" === typeof a) {1334 if (asMap) {1335 for (const key of Object.keys(a)) {1336 a[key] = new classs(a[key]);1337 }1338 return a;1339 }1340 return new classs(a);1341 }1342 return a;1343 }1344 }1345 export class Info {1346 name: string;1347 mode: string;1348 version: string;1349 tuner: tuner.Device;1350 dvr: boolean;1351 playback?: string;1352 weatherStar?: boolean;1353 antenna: boolean;1354 podcasts: boolean;1355 1356 static createFrom(source: any = {}) {1357 return new Info(source);1358 }1359 1360 constructor(source: any = {}) {1361 if ('string' === typeof source) source = JSON.parse(source);1362 this.name = source["name"];1363 this.mode = source["mode"];1364 this.version = source["version"];1365 this.tuner = this.convertValues(source["tuner"], tuner.Device);1366 this.dvr = source["dvr"];1367 this.playback = source["playback"];1368 this.weatherStar = source["weatherStar"];1369 this.antenna = source["antenna"];1370 this.podcasts = source["podcasts"];1371 }1372 1373 convertValues(a: any, classs: any, asMap: boolean = false): any {1374 if (!a) {1375 return a;1376 }1377 if (a.slice && a.map) {1378 return (a as any[]).map(elem => this.convertValues(elem, classs));1379 } else if ("object" === typeof a) {1380 if (asMap) {1381 for (const key of Object.keys(a)) {1382 a[key] = new classs(a[key]);1383 }1384 return a;1385 }1386 return new classs(a);1387 }1388 return a;1389 }1390 }1391 1392 1393 export class SignalReport {1394 tuner: TunerInfo;1395 channels: ChannelSignal[];1396 muxes: MuxSignal[];1397 sweep: SweepStatus;1398 1399 static createFrom(source: any = {}) {1400 return new SignalReport(source);1401 }1402 1403 constructor(source: any = {}) {1404 if ('string' === typeof source) source = JSON.parse(source);1405 this.tuner = this.convertValues(source["tuner"], TunerInfo);1406 this.channels = this.convertValues(source["channels"], ChannelSignal);1407 this.muxes = this.convertValues(source["muxes"], MuxSignal);1408 this.sweep = this.convertValues(source["sweep"], SweepStatus);1409 }1410 1411 convertValues(a: any, classs: any, asMap: boolean = false): any {1412 if (!a) {1413 return a;1414 }1415 if (a.slice && a.map) {1416 return (a as any[]).map(elem => this.convertValues(elem, classs));1417 } else if ("object" === typeof a) {1418 if (asMap) {1419 for (const key of Object.keys(a)) {1420 a[key] = new classs(a[key]);1421 }1422 return a;1423 }1424 return new classs(a);1425 }1426 return a;1427 }1428 }1429 export class Snapshot {1430 report?: lineup.Report;1431 guide?: guide.Guide;1432 custom: CustomChannel[];1433 antenna?: Antenna;1434 1435 static createFrom(source: any = {}) {1436 return new Snapshot(source);1437 }1438 1439 constructor(source: any = {}) {1440 if ('string' === typeof source) source = JSON.parse(source);1441 this.report = this.convertValues(source["report"], lineup.Report);1442 this.guide = this.convertValues(source["guide"], guide.Guide);1443 this.custom = this.convertValues(source["custom"], CustomChannel);1444 this.antenna = this.convertValues(source["antenna"], Antenna);1445 }1446 1447 convertValues(a: any, classs: any, asMap: boolean = false): any {1448 if (!a) {1449 return a;1450 }1451 if (a.slice && a.map) {1452 return (a as any[]).map(elem => this.convertValues(elem, classs));1453 } else if ("object" === typeof a) {1454 if (asMap) {1455 for (const key of Object.keys(a)) {1456 a[key] = new classs(a[key]);1457 }1458 return a;1459 }1460 return new classs(a);1461 }1462 return a;1463 }1464 }1465 14661467}14681469export namespace signal {1470 1471 export class Period {1472 from: time.Time;1473 to: time.Time;1474 source?: string;1475 samples: number;1476 lockedPct: number;1477 strengthPct?: Range;1478 qualityPct?: Range;1479 symbolPct?: Range;1480 1481 static createFrom(source: any = {}) {1482 return new Period(source);1483 }1484 1485 constructor(source: any = {}) {1486 if ('string' === typeof source) source = JSON.parse(source);1487 this.from = this.convertValues(source["from"], time.Time);1488 this.to = this.convertValues(source["to"], time.Time);1489 this.source = source["source"];1490 this.samples = source["samples"];1491 this.lockedPct = source["lockedPct"];1492 this.strengthPct = this.convertValues(source["strengthPct"], Range);1493 this.qualityPct = this.convertValues(source["qualityPct"], Range);1494 this.symbolPct = this.convertValues(source["symbolPct"], Range);1495 }1496 1497 convertValues(a: any, classs: any, asMap: boolean = false): any {1498 if (!a) {1499 return a;1500 }1501 if (a.slice && a.map) {1502 return (a as any[]).map(elem => this.convertValues(elem, classs));1503 } else if ("object" === typeof a) {1504 if (asMap) {1505 for (const key of Object.keys(a)) {1506 a[key] = new classs(a[key]);1507 }1508 return a;1509 }1510 return new classs(a);1511 }1512 return a;1513 }1514 }1515 export class Range {1516 min: number;1517 avg: number;1518 max: number;1519 1520 static createFrom(source: any = {}) {1521 return new Range(source);1522 }1523 1524 constructor(source: any = {}) {1525 if ('string' === typeof source) source = JSON.parse(source);1526 this.min = source["min"];1527 this.avg = source["avg"];1528 this.max = source["max"];1529 }1530 }1531 export class History {1532 from: time.Time;1533 to: time.Time;1534 source?: string;1535 samples: number;1536 lockedPct: number;1537 strengthPct?: Range;1538 qualityPct?: Range;1539 symbolPct?: Range;1540 windows: Period[];1541 1542 static createFrom(source: any = {}) {1543 return new History(source);1544 }1545 1546 constructor(source: any = {}) {1547 if ('string' === typeof source) source = JSON.parse(source);1548 this.from = this.convertValues(source["from"], time.Time);1549 this.to = this.convertValues(source["to"], time.Time);1550 this.source = source["source"];1551 this.samples = source["samples"];1552 this.lockedPct = source["lockedPct"];1553 this.strengthPct = this.convertValues(source["strengthPct"], Range);1554 this.qualityPct = this.convertValues(source["qualityPct"], Range);1555 this.symbolPct = this.convertValues(source["symbolPct"], Range);1556 this.windows = this.convertValues(source["windows"], Period);1557 }1558 1559 convertValues(a: any, classs: any, asMap: boolean = false): any {1560 if (!a) {1561 return a;1562 }1563 if (a.slice && a.map) {1564 return (a as any[]).map(elem => this.convertValues(elem, classs));1565 } else if ("object" === typeof a) {1566 if (asMap) {1567 for (const key of Object.keys(a)) {1568 a[key] = new classs(a[key]);1569 }1570 return a;1571 }1572 return new classs(a);1573 }1574 return a;1575 }1576 }1577 1578 1579 export class Reading {1580 at: time.Time;1581 source: string;1582 lock: boolean;1583 strengthPct?: number;1584 qualityPct?: number;1585 symbolPct?: number;1586 errorsPerSec?: number;1587 1588 static createFrom(source: any = {}) {1589 return new Reading(source);1590 }1591 1592 constructor(source: any = {}) {1593 if ('string' === typeof source) source = JSON.parse(source);1594 this.at = this.convertValues(source["at"], time.Time);1595 this.source = source["source"];1596 this.lock = source["lock"];1597 this.strengthPct = source["strengthPct"];1598 this.qualityPct = source["qualityPct"];1599 this.symbolPct = source["symbolPct"];1600 this.errorsPerSec = source["errorsPerSec"];1601 }1602 1603 convertValues(a: any, classs: any, asMap: boolean = false): any {1604 if (!a) {1605 return a;1606 }1607 if (a.slice && a.map) {1608 return (a as any[]).map(elem => this.convertValues(elem, classs));1609 } else if ("object" === typeof a) {1610 if (asMap) {1611 for (const key of Object.keys(a)) {1612 a[key] = new classs(a[key]);1613 }1614 return a;1615 }1616 return new classs(a);1617 }1618 return a;1619 }1620 }16211622}16231624export namespace store {1625 1626 export class Settings {1627 server: string;1628 token: string;1629 clientId: string;1630 lastChannel: string;1631 favorites?: string[];1632 hidden?: string[];1633 captions: boolean;1634 audioLang?: string;1635 scale?: number;1636 1637 static createFrom(source: any = {}) {1638 return new Settings(source);1639 }1640 1641 constructor(source: any = {}) {1642 if ('string' === typeof source) source = JSON.parse(source);1643 this.server = source["server"];1644 this.token = source["token"];1645 this.clientId = source["clientId"];1646 this.lastChannel = source["lastChannel"];1647 this.favorites = source["favorites"];1648 this.hidden = source["hidden"];1649 this.captions = source["captions"];1650 this.audioLang = source["audioLang"];1651 this.scale = source["scale"];1652 }1653 }16541655}16561657export namespace stream {1658 1659 export class Playback {1660 id: string;1661 url: string;1662 path: string;1663 note?: string;1664 offset?: number;1665 timing?: phase.Mark[];1666 1667 static createFrom(source: any = {}) {1668 return new Playback(source);1669 }1670 1671 constructor(source: any = {}) {1672 if ('string' === typeof source) source = JSON.parse(source);1673 this.id = source["id"];1674 this.url = source["url"];1675 this.path = source["path"];1676 this.note = source["note"];1677 this.offset = source["offset"];1678 this.timing = this.convertValues(source["timing"], phase.Mark);1679 }1680 1681 convertValues(a: any, classs: any, asMap: boolean = false): any {1682 if (!a) {1683 return a;1684 }1685 if (a.slice && a.map) {1686 return (a as any[]).map(elem => this.convertValues(elem, classs));1687 } else if ("object" === typeof a) {1688 if (asMap) {1689 for (const key of Object.keys(a)) {1690 a[key] = new classs(a[key]);1691 }1692 return a;1693 }1694 return new classs(a);1695 }1696 return a;1697 }1698 }16991700}17011702export namespace time {1703 1704 export class Time {1705 1706 1707 static createFrom(source: any = {}) {1708 return new Time(source);1709 }1710 1711 constructor(source: any = {}) {1712 if ('string' === typeof source) source = JSON.parse(source);1713 1714 }1715 }17161717}17181719export namespace tuner {1720 1721 export class Device {1722 id: string;1723 name: string;1724 kind: string;1725 model?: string;1726 tuners?: number;1727 detail?: string;1728 standards?: string[];1729 atsc3: boolean;1730 1731 static createFrom(source: any = {}) {1732 return new Device(source);1733 }1734 1735 constructor(source: any = {}) {1736 if ('string' === typeof source) source = JSON.parse(source);1737 this.id = source["id"];1738 this.name = source["name"];1739 this.kind = source["kind"];1740 this.model = source["model"];1741 this.tuners = source["tuners"];1742 this.detail = source["detail"];1743 this.standards = source["standards"];1744 this.atsc3 = source["atsc3"];1745 }1746 }17471748}17491750export namespace weather {1751 1752 export class Air {1753 aqi: number;1754 category: string;1755 pm25: number;1756 ozone: number;1757 1758 static createFrom(source: any = {}) {1759 return new Air(source);1760 }1761 1762 constructor(source: any = {}) {1763 if ('string' === typeof source) source = JSON.parse(source);1764 this.aqi = source["aqi"];1765 this.category = source["category"];1766 this.pm25 = source["pm25"];1767 this.ozone = source["ozone"];1768 }1769 }1770 export class Alert {1771 event: string;1772 headline: string;1773 severity: string;1774 urgency: string;1775 onset: time.Time;1776 ends: time.Time;1777 description: string;1778 instruction: string;1779 1780 static createFrom(source: any = {}) {1781 return new Alert(source);1782 }1783 1784 constructor(source: any = {}) {1785 if ('string' === typeof source) source = JSON.parse(source);1786 this.event = source["event"];1787 this.headline = source["headline"];1788 this.severity = source["severity"];1789 this.urgency = source["urgency"];1790 this.onset = this.convertValues(source["onset"], time.Time);1791 this.ends = this.convertValues(source["ends"], time.Time);1792 this.description = source["description"];1793 this.instruction = source["instruction"];1794 }1795 1796 convertValues(a: any, classs: any, asMap: boolean = false): any {1797 if (!a) {1798 return a;1799 }1800 if (a.slice && a.map) {1801 return (a as any[]).map(elem => this.convertValues(elem, classs));1802 } else if ("object" === typeof a) {1803 if (asMap) {1804 for (const key of Object.keys(a)) {1805 a[key] = new classs(a[key]);1806 }1807 return a;1808 }1809 return new classs(a);1810 }1811 return a;1812 }1813 }1814 export class Hour {1815 start: time.Time;1816 tempF: number;1817 precip: number;1818 short: string;1819 wind: string;1820 isDay: boolean;1821 1822 static createFrom(source: any = {}) {1823 return new Hour(source);1824 }1825 1826 constructor(source: any = {}) {1827 if ('string' === typeof source) source = JSON.parse(source);1828 this.start = this.convertValues(source["start"], time.Time);1829 this.tempF = source["tempF"];1830 this.precip = source["precip"];1831 this.short = source["short"];1832 this.wind = source["wind"];1833 this.isDay = source["isDay"];1834 }1835 1836 convertValues(a: any, classs: any, asMap: boolean = false): any {1837 if (!a) {1838 return a;1839 }1840 if (a.slice && a.map) {1841 return (a as any[]).map(elem => this.convertValues(elem, classs));1842 } else if ("object" === typeof a) {1843 if (asMap) {1844 for (const key of Object.keys(a)) {1845 a[key] = new classs(a[key]);1846 }1847 return a;1848 }1849 return new classs(a);1850 }1851 return a;1852 }1853 }1854 export class Now {1855 station: string;1856 observed: time.Time;1857 description: string;1858 tempF?: number;1859 feelsLikeF?: number;1860 dewpointF?: number;1861 humidity?: number;1862 windMph?: number;1863 gustMph?: number;1864 windDir: string;1865 pressureInHg?: number;1866 visibilityMi?: number;1867 1868 static createFrom(source: any = {}) {1869 return new Now(source);1870 }1871 1872 constructor(source: any = {}) {1873 if ('string' === typeof source) source = JSON.parse(source);1874 this.station = source["station"];1875 this.observed = this.convertValues(source["observed"], time.Time);1876 this.description = source["description"];1877 this.tempF = source["tempF"];1878 this.feelsLikeF = source["feelsLikeF"];1879 this.dewpointF = source["dewpointF"];1880 this.humidity = source["humidity"];1881 this.windMph = source["windMph"];1882 this.gustMph = source["gustMph"];1883 this.windDir = source["windDir"];1884 this.pressureInHg = source["pressureInHg"];1885 this.visibilityMi = source["visibilityMi"];1886 }1887 1888 convertValues(a: any, classs: any, asMap: boolean = false): any {1889 if (!a) {1890 return a;1891 }1892 if (a.slice && a.map) {1893 return (a as any[]).map(elem => this.convertValues(elem, classs));1894 } else if ("object" === typeof a) {1895 if (asMap) {1896 for (const key of Object.keys(a)) {1897 a[key] = new classs(a[key]);1898 }1899 return a;1900 }1901 return new classs(a);1902 }1903 return a;1904 }1905 }1906 export class Period {1907 name: string;1908 start: time.Time;1909 isDay: boolean;1910 tempF: number;1911 short: string;1912 detailed: string;1913 precip: number;1914 wind: string;1915 1916 static createFrom(source: any = {}) {1917 return new Period(source);1918 }1919 1920 constructor(source: any = {}) {1921 if ('string' === typeof source) source = JSON.parse(source);1922 this.name = source["name"];1923 this.start = this.convertValues(source["start"], time.Time);1924 this.isDay = source["isDay"];1925 this.tempF = source["tempF"];1926 this.short = source["short"];1927 this.detailed = source["detailed"];1928 this.precip = source["precip"];1929 this.wind = source["wind"];1930 }1931 1932 convertValues(a: any, classs: any, asMap: boolean = false): any {1933 if (!a) {1934 return a;1935 }1936 if (a.slice && a.map) {1937 return (a as any[]).map(elem => this.convertValues(elem, classs));1938 } else if ("object" === typeof a) {1939 if (asMap) {1940 for (const key of Object.keys(a)) {1941 a[key] = new classs(a[key]);1942 }1943 return a;1944 }1945 return new classs(a);1946 }1947 return a;1948 }1949 }1950 export class Sun {1951 rise: time.Time;1952 set: time.Time;1953 1954 static createFrom(source: any = {}) {1955 return new Sun(source);1956 }1957 1958 constructor(source: any = {}) {1959 if ('string' === typeof source) source = JSON.parse(source);1960 this.rise = this.convertValues(source["rise"], time.Time);1961 this.set = this.convertValues(source["set"], time.Time);1962 }1963 1964 convertValues(a: any, classs: any, asMap: boolean = false): any {1965 if (!a) {1966 return a;1967 }1968 if (a.slice && a.map) {1969 return (a as any[]).map(elem => this.convertValues(elem, classs));1970 } else if ("object" === typeof a) {1971 if (asMap) {1972 for (const key of Object.keys(a)) {1973 a[key] = new classs(a[key]);1974 }1975 return a;1976 }1977 return new classs(a);1978 }1979 return a;1980 }1981 }1982 export class Report {1983 updated: time.Time;1984 now?: Now;1985 periods: Period[];1986 hourly: Hour[];1987 alerts: Alert[];1988 air?: Air;1989 sun?: Sun;1990 radar?: string;1991 satellite?: string;1992 errors?: string[];1993 1994 static createFrom(source: any = {}) {1995 return new Report(source);1996 }1997 1998 constructor(source: any = {}) {1999 if ('string' === typeof source) source = JSON.parse(source);2000 this.updated = this.convertValues(source["updated"], time.Time);2001 this.now = this.convertValues(source["now"], Now);2002 this.periods = this.convertValues(source["periods"], Period);2003 this.hourly = this.convertValues(source["hourly"], Hour);2004 this.alerts = this.convertValues(source["alerts"], Alert);2005 this.air = this.convertValues(source["air"], Air);2006 this.sun = this.convertValues(source["sun"], Sun);2007 this.radar = source["radar"];2008 this.satellite = source["satellite"];2009 this.errors = source["errors"];2010 }2011 2012 convertValues(a: any, classs: any, asMap: boolean = false): any {2013 if (!a) {2014 return a;2015 }2016 if (a.slice && a.map) {2017 return (a as any[]).map(elem => this.convertValues(elem, classs));2018 } else if ("object" === typeof a) {2019 if (asMap) {2020 for (const key of Object.keys(a)) {2021 a[key] = new classs(a[key]);2022 }2023 return a;2024 }2025 return new classs(a);2026 }2027 return a;2028 }2029 }20302031}2032