ticketmeister 0.1.2

A lightweight and intuitive library for accessing ticket master api in rust
Documentation

use api_request_utils_rs::serde::{Deserialize,Serialize};

#[derive(Debug)]
#[derive(PartialOrd, Ord, PartialEq, Eq)]
#[derive(Hash)]
#[derive(Serialize, Deserialize)]
#[serde(crate = "api_request_utils_rs::serde")]
pub struct Dma {
    id : u16,
    name: &'static str,
}

impl Dma {
    const fn new(id: u16, name: &'static str) -> Self {
        Self { id, name }
    }

    pub fn id(&self) -> &u16 {
        &self.id
    }

    pub fn name(&self) -> &str {
        &self.name
    }
}

lazy_static::lazy_static! {
    pub static ref DMA : std::collections::HashMap<u16,Dma> = std::collections::HashMap::from([
        (200,Dma::new(200,"All of US")),
        (212,Dma::new(212,"Abilene - Sweetwater")),
        (213,Dma::new(213,"Albany - Schenectady - Troy")),
        (214,Dma::new(214,"Albany, GA")),
        (215,Dma::new(215,"Albuquerque - Santa Fe")),
        (216,Dma::new(216,"Alexandria, LA")),
        (217,Dma::new(217,"Alpena")),
        (218,Dma::new(218,"Amarillo")),
        (219,Dma::new(219,"Anchorage")),
        (220,Dma::new(220,"Atlanta")),
        (221,Dma::new(221,"Augusta")),
        (222,Dma::new(222,"Austin")),
        (223,Dma::new(223,"Bakersfield")),
        (224,Dma::new(224,"Baltimore")),
        (225,Dma::new(225,"Bangor")),
        (226,Dma::new(226,"Baton Rouge")),
        (227,Dma::new(227,"Beaumont - Port Arthur")),
        (228,Dma::new(228,"Bend, OR")),
        (229,Dma::new(229,"Billings")),
        (230,Dma::new(230,"Biloxi - Gulfport")),
        (231,Dma::new(231,"Binghamton")),
        (232,Dma::new(232,"Birmingham (Anniston and Tuscaloosa)")),
        (233,Dma::new(233,"Bluefield - Beckley - Oak Hill")),
        (234,Dma::new(234,"Boise")),
        (235,Dma::new(235,"Boston (Manchester)")),
        (236,Dma::new(236,"Bowling Green")),
        (237,Dma::new(237,"Buffalo")),
        (238,Dma::new(238,"Burlington - Plattsburgh")),
        (239,Dma::new(239,"Butte - Bozeman")),
        (240,Dma::new(240,"Casper - Riverton")),
        (241,Dma::new(241,"Cedar Rapids - Waterloo & Dubuque")),
        (242,Dma::new(242,"Champaign & Springfield - Decatur")),
        (243,Dma::new(243,"Charleston, SC")),
        (244,Dma::new(244,"Charleston-Huntington")),
        (245,Dma::new(245,"Charlotte")),
        (246,Dma::new(246,"Charlottesville")),
        (247,Dma::new(247,"Chattanooga")),
        (248,Dma::new(248,"Cheyenne - Scottsbluff")),
        (249,Dma::new(249,"Chicago")),
        (250,Dma::new(250,"Chico - Redding")),
        (251,Dma::new(251,"Cincinnati")),
        (252,Dma::new(252,"Clarksburg - Weston")),
        (253,Dma::new(253,"Cleveland")),
        (254,Dma::new(254,"Colorado Springs - Pueblo")),
        (255,Dma::new(255,"Columbia - Jefferson City")),
        (256,Dma::new(256,"Columbia, SC")),
        (257,Dma::new(257,"Columbus - Tupelo - West Point")),
        (258,Dma::new(258,"Columbus, GA")),
        (259,Dma::new(259,"Columbus, OH")),
        (260,Dma::new(260,"Corpus Christi")),
        (261,Dma::new(261,"Dallas - Fort Worth")),
        (262,Dma::new(262,"Davenport - Rock Island - Moline")),
        (263,Dma::new(263,"Dayton")),
        (264,Dma::new(264,"Denver")),
        (265,Dma::new(265,"Des Moines - Ames")),
        (266,Dma::new(266,"Detroit")),
        (267,Dma::new(267,"Dothan")),
        (268,Dma::new(268,"Duluth - Superior")),
        (269,Dma::new(269,"El Paso")),
        (270,Dma::new(270,"Elmira")),
        (271,Dma::new(271,"Erie")),
        (272,Dma::new(272,"Eugene")),
        (273,Dma::new(273,"Eureka")),
        (274,Dma::new(274,"Evansville")),
        (275,Dma::new(275,"Fairbanks")),
        (276,Dma::new(276,"Fargo - Valley City")),
        (277,Dma::new(277,"Flint - Saginaw - Bay City")),
        (278,Dma::new(278,"Florence - Myrtle Beach")),
        (279,Dma::new(279,"Fort Myers - Naples")),
        (280,Dma::new(280,"Fort Smith - Fayetteville - Springdale - Rogers")),
        (281,Dma::new(281,"Fort Wayne")),
        (282,Dma::new(282,"Fresno - Visalia")),
        (283,Dma::new(283,"Gainesville")),
        (284,Dma::new(284,"Glendive")),
        (285,Dma::new(285,"Grand Junction - Montrose")),
        (286,Dma::new(286,"Grand Rapids - Kalamazoo - Battle Creek")),
        (287,Dma::new(287,"Great Falls")),
        (288,Dma::new(288,"Green Bay - Appleton")),
        (289,Dma::new(289,"Greensboro - High Point - Winston-Salem")),
        (290,Dma::new(290,"Greenville - New Bern - Washington")),
        (291,Dma::new(291,"Greenville - Spartansburg - Asheville - Anderson")),
        (292,Dma::new(292,"Greenwood - Greenville")),
        (293,Dma::new(293,"Harlingen - Weslaco - Brownsville - McAllen")),
        (294,Dma::new(294,"Harrisburg - Lancaster - Lebanon - York")),
        (295,Dma::new(295,"Harrisonburg")),
        (296,Dma::new(296,"Hartford & New Haven")),
        (297,Dma::new(297,"Hattiesburg - Laurel")),
        (298,Dma::new(298,"Helena")),
        (299,Dma::new(299,"Honolulu")),
        (300,Dma::new(300,"Houston")),
        (301,Dma::new(301,"Huntsville - Decatur (Florence)")),
        (302,Dma::new(302,"Idaho Falls - Pocatello")),
        (303,Dma::new(303,"Indianapolis")),
        (304,Dma::new(304,"Jackson, MS")),
        (305,Dma::new(305,"Jackson, TN")),
        (306,Dma::new(306,"Jacksonville")),
        (307,Dma::new(307,"Johnstown - Altoona")),
        (308,Dma::new(308,"Jonesboro")),
        (309,Dma::new(309,"Joplin - Pittsburg")),
        (310,Dma::new(310,"Juneau")),
        (311,Dma::new(311,"Kansas City")),
        (312,Dma::new(312,"Knoxville")),
        (313,Dma::new(313,"La Crosse - Eau Claire")),
        (314,Dma::new(314,"Lafayette, IN")),
        (315,Dma::new(315,"Lafayette, LA")),
        (316,Dma::new(316,"Lake Charles")),
        (317,Dma::new(317,"Lansing")),
        (318,Dma::new(318,"Laredo")),
        (319,Dma::new(319,"Las Vegas")),
        (320,Dma::new(320,"Lexington")),
        (321,Dma::new(321,"Lima")),
        (322,Dma::new(322,"Lincoln & Hastings - Kearney")),
        (323,Dma::new(323,"Little Rock - Pine Bluff")),
        (324,Dma::new(324,"Los Angeles")),
        (325,Dma::new(325,"Louisville")),
        (326,Dma::new(326,"Lubbock")),
        (327,Dma::new(327,"Macon")),
        (328,Dma::new(328,"Madison")),
        (329,Dma::new(329,"Mankato")),
        (330,Dma::new(330,"Marquette")),
        (331,Dma::new(331,"Medford - Klamath Falls")),
        (332,Dma::new(332,"Memphis")),
        (333,Dma::new(333,"Meridian")),
        (334,Dma::new(334,"Miami - Fort Lauderdale")),
        (335,Dma::new(335,"Milwaukee")),
        (336,Dma::new(336,"Minneapolis - Saint Paul")),
        (337,Dma::new(337,"Minot - Bismarck - Dickinson")),
        (338,Dma::new(338,"Missoula")),
        (339,Dma::new(339,"Mobile - Pensacola (Fort Walton Beach)")),
        (340,Dma::new(340,"Monroe - El Dorado")),
        (341,Dma::new(341,"Monterey - Salinas")),
        (342,Dma::new(342,"Montgomery (Selma)")),
        (343,Dma::new(343,"Nashville")),
        (344,Dma::new(344,"New Orleans")),
        (345,Dma::new(345,"New York")),
        (346,Dma::new(346,"Norfolk - Portsmouth - Newport News")),
        (347,Dma::new(347,"North Platte")),
        (348,Dma::new(348,"Odessa - Midland")),
        (349,Dma::new(349,"Oklahoma City")),
        (350,Dma::new(350,"Omaha")),
        (351,Dma::new(351,"Orlando - Daytona Beach - Melbourne")),
        (352,Dma::new(352,"Ottumwa - Kirksville")),
        (353,Dma::new(353,"Paducah - Cape Girardeau - Harrisburg - Mt Vernon")),
        (354,Dma::new(354,"Palm Springs")),
        (355,Dma::new(355,"Panama City")),
        (356,Dma::new(356,"Parkersburg")),
        (357,Dma::new(357,"Peoria - Bloomington")),
        (358,Dma::new(358,"Philadelphia")),
        (359,Dma::new(359,"Phoenix")),
        (360,Dma::new(360,"Pittsburgh")),
        (361,Dma::new(361,"Portland - Auburn")),
        (362,Dma::new(362,"Portland, OR")),
        (363,Dma::new(363,"Presque Isle")),
        (364,Dma::new(364,"Providence - New Bedford")),
        (365,Dma::new(365,"Quincy - Hannibal - Keokuk")),
        (366,Dma::new(366,"Raleigh - Durham (Fayetteville)")),
        (367,Dma::new(367,"Rapid City")),
        (368,Dma::new(368,"Reno")),
        (369,Dma::new(369,"Richmond - Petersburg")),
        (370,Dma::new(370,"Roanoke - Lynchburg")),
        (371,Dma::new(371,"Rochester - Mason City - Austin")),
        (372,Dma::new(372,"Rochester, NY")),
        (373,Dma::new(373,"Rockford")),
        (374,Dma::new(374,"Sacramento - Stockton - Modesto")),
        (375,Dma::new(375,"Saint Joseph")),
        (376,Dma::new(376,"Saint Louis")),
        (377,Dma::new(377,"Salisbury")),
        (378,Dma::new(378,"Salt Lake City")),
        (379,Dma::new(379,"San Angelo")),
        (380,Dma::new(380,"San Antonio")),
        (381,Dma::new(381,"San Diego")),
        (382,Dma::new(382,"San Francisco - Oakland - San Jose")),
        (383,Dma::new(383,"Santa Barbara - Santa Maria - San Luis Obispo")),
        (384,Dma::new(384,"Savannah")),
        (385,Dma::new(385,"Seattle - Tacoma")),
        (386,Dma::new(386,"Sherman - Ada")),
        (387,Dma::new(387,"Shreveport")),
        (388,Dma::new(388,"Sioux City")),
        (389,Dma::new(389,"Sioux Falls (Mitchell)")),
        (390,Dma::new(390,"South Bend - Elkhart")),
        (391,Dma::new(391,"Spokane")),
        (392,Dma::new(392,"Springfield - Holyoke")),
        (393,Dma::new(393,"Springfield, MO")),
        (394,Dma::new(394,"Syracuse")),
        (395,Dma::new(395,"Tallahassee - Thomasville")),
        (396,Dma::new(396,"Tampa - Saint Petersburg (Sarasota)")),
        (397,Dma::new(397,"Terre Haute")),
        (398,Dma::new(398,"Toledo")),
        (399,Dma::new(399,"Topeka")),
        (400,Dma::new(400,"Traverse City - Cadillac")),
        (401,Dma::new(401,"Tri-Cities, TN-VA")),
        (402,Dma::new(402,"Tucson (Sierra Vista)")),
        (403,Dma::new(403,"Tulsa")),
        (404,Dma::new(404,"Twin Falls")),
        (405,Dma::new(405,"Tyler - Longview (Lufkin & Nacogdoches)")),
        (406,Dma::new(406,"Utica")),
        (407,Dma::new(407,"Victoria")),
        (408,Dma::new(408,"Waco - Temple - Bryan")),
        (409,Dma::new(409,"Washington DC (Hagerstown)")),
        (410,Dma::new(410,"Watertown")),
        (411,Dma::new(411,"Wausau - Rhinelander")),
        (412,Dma::new(412,"West Palm Beach - Fort Pierce")),
        (413,Dma::new(413,"Wheeling - Steubenville")),
        (414,Dma::new(414,"Wichita - Hutchinson")),
        (415,Dma::new(415,"Wichita Falls & Lawton")),
        (416,Dma::new(416,"Wilkes Barre - Scranton")),
        (417,Dma::new(417,"Wilmington")),
        (418,Dma::new(418,"Yakima - Pasco - Richland - Kennewick")),
        (419,Dma::new(419,"Youngstown")),
        (420,Dma::new(420,"Yuma - El Centro")),
        (421,Dma::new(421,"Zanesville")),
        (422,Dma::new(422,"Northern New Jersey")),
        (500,Dma::new(500,"All of Canada")),
        (501,Dma::new(501,"Barrie-Orillia")),
        (502,Dma::new(502,"Belleville-Peterborough")),
        (503,Dma::new(503,"Owen Sound")),
        (504,Dma::new(504,"Burnaby-New Westminster-Surrey")),
        (505,Dma::new(505,"Calgary-Banff")),
        (506,Dma::new(506,"Edmonton")),
        (507,Dma::new(507,"Fraser Valley")),
        (508,Dma::new(508,"Hamilton-Niagara")),
        (509,Dma::new(509,"Kitchener-Waterloo")),
        (510,Dma::new(510,"London-Sarnia")),
        (511,Dma::new(511,"Mississauga-Oakville")),
        (512,Dma::new(512,"Newfoundland")),
        (513,Dma::new(513,"NWT")),
        (514,Dma::new(514,"New Brunswick")),
        (515,Dma::new(515,"Northern Ontario")),
        (516,Dma::new(516,"Nova Scotia")),
        (517,Dma::new(517,"Nunavit")),
        (518,Dma::new(518,"Okanagan-Kootenays")),
        (519,Dma::new(519,"Ottawa-Gatineau")),
        (520,Dma::new(520,"PEI")),
        (521,Dma::new(521,"Prince George-North")),
        (522,Dma::new(522,"Montreal and Surrounding Area")),
        (523,Dma::new(523,"Red Deer")),
        (524,Dma::new(524,"Saskatchewan")),
        (527,Dma::new(527,"Toronto")),
        (528,Dma::new(528,"Vancouver")),
        (529,Dma::new(529,"Sunshine Coast-Islands")),
        (530,Dma::new(530,"Winnipeg-Brandon")),
        (531,Dma::new(531,"Yukon")),
        (601,Dma::new(601,"All of United Kingdom")),
        (602,Dma::new(602,"London")),
        (603,Dma::new(603,"South")),
        (604,Dma::new(604,"Midlands and Central")),
        (605,Dma::new(605,"Wales and North West")),
        (606,Dma::new(606,"North and North East")),
        (607,Dma::new(607,"Scotland")),
        (608,Dma::new(608,"All of Ireland")),
        (609,Dma::new(609,"Northern Ireland")),
        (610,Dma::new(610,"Germany")),
        (611,Dma::new(611,"Netherlands")),
        (612,Dma::new(612,"Sweden")),
        (613,Dma::new(613,"Turkey")),
        (701,Dma::new(701,"All of Australia")),
        (702,Dma::new(702,"New South Wales/Australian Capital Territory")),
        (703,Dma::new(703,"Queensland")),
        (704,Dma::new(704,"Western Australia")),
        (705,Dma::new(705,"Victoria/Tasmania")),
        (750,Dma::new(750,"All of New Zealand")),
        (751,Dma::new(751,"North Island")),
        (752,Dma::new(752,"South Island")),
        (801,Dma::new(801,"All of Mexico")),
        (802,Dma::new(802,"Mexico City and Metropolitan Area")),
        (803,Dma::new(803,"Monterrey")),
        (804,Dma::new(804,"Guadalajara")),
        (901,Dma::new(901,"All of Spain")),
        (902,Dma::new(902,"Barcelona")),
        (903,Dma::new(903,"Madrid")),
    ]);
}