'https://web.archive.org/web/20150714025308id_/https://core.telegram.org/bots/api/', self::V110 => 'https://web.archive.org/web/20150812125616id_/https://core.telegram.org/bots/api', self::V140 => 'https://web.archive.org/web/20150909214252id_/https://core.telegram.org/bots/api', self::V150 => 'https://web.archive.org/web/20150921091215id_/https://core.telegram.org/bots/api/', self::V160 => 'https://web.archive.org/web/20151023071257id_/https://core.telegram.org/bots/api', self::V180 => 'https://web.archive.org/web/20160112101045id_/https://core.telegram.org/bots/api', self::V182 => 'https://web.archive.org/web/20160126005312id_/https://core.telegram.org/bots/api', self::V183 => 'https://web.archive.org/web/20160305132243id_/https://core.telegram.org/bots/api', self::V200 => 'https://web.archive.org/web/20160413101342id_/https://core.telegram.org/bots/api', self::V210 => 'https://web.archive.org/web/20160912130321id_/https://core.telegram.org/bots/api', self::V211 => 'https://web.archive.org/web/20160912130321id_/https://core.telegram.org/bots/api', self::V220 => 'https://web.archive.org/web/20161004150232id_/https://core.telegram.org/bots/api', self::V230 => 'https://web.archive.org/web/20161124162115id_/https://core.telegram.org/bots/api', self::V231 => 'https://web.archive.org/web/20161204181811id_/https://core.telegram.org/bots/api', self::V300 => 'https://web.archive.org/web/20170612094628id_/https://core.telegram.org/bots/api', self::V310 => 'https://web.archive.org/web/20170703123052id_/https://core.telegram.org/bots/api', self::V320 => 'https://web.archive.org/web/20170819054238id_/https://core.telegram.org/bots/api', self::V330 => 'https://web.archive.org/web/20170914060628id_/https://core.telegram.org/bots/api', self::V350 => 'https://web.archive.org/web/20171201065426id_/https://core.telegram.org/bots/api', self::V360 => 'https://web.archive.org/web/20180217001114id_/https://core.telegram.org/bots/api', self::V400 => 'https://web.archive.org/web/20180728174553id_/https://core.telegram.org/bots/api', self::V410 => 'https://web.archive.org/web/20180828155646id_/https://core.telegram.org/bots/api', self::V420 => 'https://web.archive.org/web/20190417160652id_/https://core.telegram.org/bots/api', self::V430 => 'https://web.archive.org/web/20190601122107id_/https://core.telegram.org/bots/api', self::V440 => 'https://web.archive.org/web/20190731114703id_/https://core.telegram.org/bots/api', self::V450 => 'https://web.archive.org/web/20200107090812id_/https://core.telegram.org/bots/api', self::V460 => 'https://web.archive.org/web/20200208225346id_/https://core.telegram.org/bots/api', self::V470 => 'https://web.archive.org/web/20200401052001id_/https://core.telegram.org/bots/api', self::V480 => 'https://web.archive.org/web/20200429054924id_/https://core.telegram.org/bots/api', self::V490 => 'https://web.archive.org/web/20200611131321id_/https://core.telegram.org/bots/api', self::V500 => 'https://web.archive.org/web/20201104151640id_/https://core.telegram.org/bots/api', self::V510 => 'https://web.archive.org/web/20210315055600id_/https://core.telegram.org/bots/api', self::V520 => 'https://web.archive.org/web/20210428195636id_/https://core.telegram.org/bots/api', self::V530 => 'https://web.archive.org/web/20210626142851id_/https://core.telegram.org/bots/api', self::V540 => 'https://web.archive.org/web/20211105152638id_/https://core.telegram.org/bots/api', self::V550 => 'https://web.archive.org/web/20211211002657id_/https://core.telegram.org/bots/api', self::V560 => 'https://web.archive.org/web/20220105131529id_/https://core.telegram.org/bots/api', self::V570 => 'https://web.archive.org/web/20220206103922id_/https://core.telegram.org/bots/api', self::V600 => 'https://web.archive.org/web/20220416143511id_/https://core.telegram.org/bots/api', self::V610 => 'https://web.archive.org/web/20220621093855id_/https://core.telegram.org/bots/api', self::V620 => 'https://web.archive.org/web/20220812143250id_/https://core.telegram.org/bots/api', self::V630 => 'https://web.archive.org/web/20221105155229id_/https://core.telegram.org/bots/api', self::V640 => 'https://web.archive.org/web/20221230181046id_/https://core.telegram.org/bots/api', self::V650 => 'https://web.archive.org/web/20230204145800id_/https://core.telegram.org/bots/api', self::V660 => 'https://web.archive.org/web/20230314174834id_/https://core.telegram.org/bots/api', self::V670 => 'https://web.archive.org/web/20230422225636id_/https://core.telegram.org/bots/api', self::V680 => 'https://web.archive.org/web/20230823081042id_/https://core.telegram.org/bots/api', self::V690 => 'https://web.archive.org/web/20230923182249id_/https://core.telegram.org/bots/api', self::V700 => 'https://web.archive.org/web/20240101113402id_/https://core.telegram.org/bots/api', self::LATEST => 'https://core.telegram.org/bots/api' ]; public static function getVersionFromText(string $text): string { $text = str_replace(['.', 'v'], ['', ''], strtolower($text)); $const = sprintf('%s::V%s', self::class, $text); if (defined($const)) { return constant($const); } return self::LATEST; } public static function getUrlFromText(string $text): string { $version = self::getVersionFromText($text); return self::URLS[$version] ?? self::URLS[self::LATEST]; } }