pub fn configure(importers: &mut Vec<Box<dyn Importer>>) {
    let hours = Duration::new(60 * 60, 0);

    importers.push(Box::new(Import {
        source: source::HttpGet::new("https://nightsky.jpl.nasa.gov/js/data/events_json_api.cfm"),
        format: format::Json,
        structure: structure::NightSkyNetwork,
        period: 24 * hours,
    }));

    importers.push(Box::new(Import {
        source: source::HttpGet::new(
            "https://nvdm.org/wp-json/tribe/events/v1/events/?per_page=1000&status=publish",
        ),
        format: format::Json,
        structure: structure::EventsJson(PartnerInfo {
            partner: "82b846de-dda5-5bad-a918-41a2a0648b71".parse().unwrap(),
            partner_name: "Nevada Discovery Museum".to_string(),
            partner_website: Some("https://nvdm.org/".to_string()),
            partner_logo_url: Some(
                "https://nvdm.org/wp-content/themes/discoverypress-site/assets/svgs/discovery-logo.svg".to_string(),
            ),
            domain: Domain::LiveScience,
            descriptor: vec![Descriptor::Community],
            topics: vec![],
            flags: vec![PartnerFlag::Cost],
            address: Some(PartnerAddress {
                name: "The Discovery".to_string(),
                street: "490 S. Center Street".to_string(),
                city: "Reno".to_string(),
                state: "NV".to_string(),
                zip: "89501".to_string(),
                country: "United States of America".to_string(),
            }),
            timezone: Some(chrono_tz::US::Pacific),
        }),
        period: 24 * hours,
    }));

    importers.push(Box::new(Import {
        source: source::EventsQLWithCustom::new("https://www.wisconsinsciencefest.org/graphql"),
        format: format::Json,
        structure: structure::EventsQL(PartnerInfo {
            partner: "f390b07f-5e9b-5d19-bdab-d5e91401b7ff".parse().unwrap(),
            partner_name: "Wisconsin Science Festival".to_string(),
            partner_website: Some("https://www.wisconsinsciencefest.org/".to_string()),
            partner_logo_url: Some(
                "https://www.wisconsinsciencefest.org/wp-content/uploads/2018/10/WSF_Beesly_Flying-01.png".to_string(),
            ),
            domain: Domain::LiveScience,
            descriptor: vec![],
            topics: vec![],
            flags: vec![],
            address: None,
            timezone: Some(chrono_tz::US::Central),
        }),
        period: 24 * hours,
    }));

    importers.push(Box::new(Import {
        source: source::EventsQLWithCustom::new("https://astronomyontap.org/graphql"),
        format: format::Json,
        structure: structure::EventsQL(PartnerInfo {
            partner: "784f3316-bdc0-5855-8a44-2044cbb23788".parse().unwrap(),
            partner_name: "Astronomy On Tap".to_string(),
            partner_website: Some("https://astronomyontap.org/".to_string()),
            partner_logo_url: Some("".to_string()),
            domain: Domain::LiveScience,
            topics: vec![Topic::AstronomyAndSpace],
            descriptor: vec![Descriptor::Community],
            flags: vec![],
            address: None,
            timezone: Some(chrono::Utc),
        }),
        period: 24 * hours,
    }));

    importers.push(Box::new(Import {
        source: source::EventsQL::new("https://mods.org/graphql"),
        format: format::Json,
        structure: structure::EventsQL(PartnerInfo {
            partner: "b1f10e01-ad75-5a84-8efc-04003af9e202".parse().unwrap(),
            partner_name: "Museum of Discovery and Science".to_string(),
            partner_website: Some("https://mods.org/".to_string()),
            partner_logo_url: Some(
                "https://mods.org/wp-content/uploads/2014/11/main_logo.png".to_string(),
            ),
            domain: Domain::LiveScience,
            descriptor: vec![],
            topics: vec![],
            flags: vec![],
            address: Some(PartnerAddress {
                name: "Museum of Discovery and Science".to_string(),
                street: "401 SW Second Street".to_string(),
                city: "Fort Lauderdale".to_string(),
                state: "FL".to_string(),
                zip: "33312".to_string(),
                country: "USA".to_string(),
            }),
            timezone: Some(chrono_tz::US::Eastern),
        }),
        period: 24 * hours,
    }));
}
/// This function is the 'config file' for the importer. Each entry
/// added to th importers vector defines how to grab data from one
/// partner.
This function is the 'config file' for the importer. Each entry
added to th importers vector defines how to grab data from one
partner.
This function is the ' config file ' for the importer . Each entry added to th importers vector defines how to grab data from one partner .
pub fn configure(importers: &mut Vec<Box<dyn Importer>>) {
    let hours = Duration::new(60 * 60, 0);
    importers.push(Box::new(Import {
        source: source::HttpGet::new("https://nightsky.jpl.nasa.gov/js/data/events_json_api.cfm"),
        format: format::Json,
        structure: structure::NightSkyNetwork,
        period: 24 * hours,
    }));
    importers.push(Box::new(Import {
        source: source::HttpGet::new(
            "https://nvdm.org/wp-json/tribe/events/v1/events/?per_page=1000&status=publish",
        ),
        format: format::Json,
        structure: structure::EventsJson(PartnerInfo {
            partner: "82b846de-dda5-5bad-a918-41a2a0648b71".parse().unwrap(),
            partner_name: "Nevada Discovery Museum".to_string(),
            partner_website: Some("https://nvdm.org/".to_string()),
            partner_logo_url: Some(
                "https://nvdm.org/wp-content/themes/discoverypress-site/assets/svgs/discovery-logo.svg".to_string(),
            ),
            domain: Domain::LiveScience,
            descriptor: vec![Descriptor::Community],
            topics: vec![],
            flags: vec![PartnerFlag::Cost],
            address: Some(PartnerAddress {
                name: "The Discovery".to_string(),
                street: "490 S. Center Street".to_string(),
                city: "Reno".to_string(),
                state: "NV".to_string(),
                zip: "89501".to_string(),
                country: "United States of America".to_string(),
            }),
            timezone: Some(chrono_tz::US::Pacific),
        }),
        period: 24 * hours,
    }));
    importers.push(Box::new(Import {
        source: source::EventsQLWithCustom::new("https://www.wisconsinsciencefest.org/graphql"),
        format: format::Json,
        structure: structure::EventsQL(PartnerInfo {
            partner: "f390b07f-5e9b-5d19-bdab-d5e91401b7ff".parse().unwrap(),
            partner_name: "Wisconsin Science Festival".to_string(),
            partner_website: Some("https://www.wisconsinsciencefest.org/".to_string()),
            partner_logo_url: Some(
                "https://www.wisconsinsciencefest.org/wp-content/uploads/2018/10/WSF_Beesly_Flying-01.png".to_string(),
            ),
            domain: Domain::LiveScience,
            descriptor: vec![],
            topics: vec![],
            flags: vec![],
            address: None,
            timezone: Some(chrono_tz::US::Central),
        }),
        period: 24 * hours,
    }));
    importers.push(Box::new(Import {
        source: source::EventsQLWithCustom::new("https://astronomyontap.org/graphql"),
        format: format::Json,
        structure: structure::EventsQL(PartnerInfo {
            partner: "784f3316-bdc0-5855-8a44-2044cbb23788".parse().unwrap(),
            partner_name: "Astronomy On Tap".to_string(),
            partner_website: Some("https://astronomyontap.org/".to_string()),
            partner_logo_url: Some("".to_string()),
            domain: Domain::LiveScience,
            topics: vec![Topic::AstronomyAndSpace],
            descriptor: vec![Descriptor::Community],
            flags: vec![],
            address: None,
            timezone: Some(chrono::Utc),
        }),
        period: 24 * hours,
    }));
    importers.push(Box::new(Import {
        source: source::EventsQL::new("https://mods.org/graphql"),
        format: format::Json,
        structure: structure::EventsQL(PartnerInfo {
            partner: "b1f10e01-ad75-5a84-8efc-04003af9e202".parse().unwrap(),
            partner_name: "Museum of Discovery and Science".to_string(),
            partner_website: Some("https://mods.org/".to_string()),
            partner_logo_url: Some(
                "https://mods.org/wp-content/uploads/2014/11/main_logo.png".to_string(),
            ),
            domain: Domain::LiveScience,
            descriptor: vec![],
            topics: vec![],
            flags: vec![],
            address: Some(PartnerAddress {
                name: "Museum of Discovery and Science".to_string(),
                street: "401 SW Second Street".to_string(),
                city: "Fort Lauderdale".to_string(),
                state: "FL".to_string(),
                zip: "33312".to_string(),
                country: "USA".to_string(),
            }),
            timezone: Some(chrono_tz::US::Eastern),
        }),
        period: 24 * hours,
    }));
}
pub fn configure ( importers : & mut Vec < Box < dyn Importer > > ) { let hours = Duration :: new ( 60 * 60 , 0 ) ; importers . push ( Box :: new ( Import { source : source :: HttpGet :: new ( " " ) , format : format :: Json , structure : structure :: NightSkyNetwork , period : 24 * hours , } ) ) ; importers . push ( Box :: new ( Import { source : source :: HttpGet :: new ( " " , ) , format : format :: Json , structure : structure :: EventsJson ( PartnerInfo { partner : " " . parse ( ) . unwrap ( ) , partner_name : " " . to_string ( ) , partner_website : Some ( " " . to_string ( ) ) , partner_logo_url : Some ( " " . to_string ( ) , ) , domain : Domain :: LiveScience , descriptor : vec ! [ Descriptor Community ] , topics : vec ! [ ] , flags : vec ! [ PartnerFlag Cost ] , address : Some ( PartnerAddress { name : " " . to_string ( ) , street : " " . to_string ( ) , city : " " . to_string ( ) , state : " " . to_string ( ) , zip : " " . to_string ( ) , country : " " . to_string ( ) , } ) , timezone : Some ( chrono_tz :: US :: Pacific ) , } ) , period : 24 * hours , } ) ) ; importers . push ( Box :: new ( Import { source : source :: EventsQLWithCustom :: new ( " " ) , format : format :: Json , structure : structure :: EventsQL ( PartnerInfo { partner : " " . parse ( ) . unwrap ( ) , partner_name : " " . to_string ( ) , partner_website : Some ( " " . to_string ( ) ) , partner_logo_url : Some ( " " . to_string ( ) , ) , domain : Domain :: LiveScience , descriptor : vec ! [ ] , topics : vec ! [ ] , flags : vec ! [ ] , address : None , timezone : Some ( chrono_tz :: US :: Central ) , } ) , period : 24 * hours , } ) ) ; importers . push ( Box :: new ( Import { source : source :: EventsQLWithCustom :: new ( " " ) , format : format :: Json , structure : structure :: EventsQL ( PartnerInfo { partner : " " . parse ( ) . unwrap ( ) , partner_name : " " . to_string ( ) , partner_website : Some ( " " . to_string ( ) ) , partner_logo_url : Some ( " " . to_string ( ) ) , domain : Domain :: LiveScience , topics : vec ! [ Topic AstronomyAndSpace ] , descriptor : vec ! [ Descriptor Community ] , flags : vec ! [ ] , address : None , timezone : Some ( chrono :: Utc ) , } ) , period : 24 * hours , } ) ) ; importers . push ( Box :: new ( Import { source : source :: EventsQL :: new ( " " ) , format : format :: Json , structure : structure :: EventsQL ( PartnerInfo { partner : " " . parse ( ) . unwrap ( ) , partner_name : " " . to_string ( ) , partner_website : Some ( " " . to_string ( ) ) , partner_logo_url : Some ( " " . to_string ( ) , ) , domain : Domain :: LiveScience , descriptor : vec ! [ ] , topics : vec ! [ ] , flags : vec ! [ ] , address : Some ( PartnerAddress { name : " " . to_string ( ) , street : " " . to_string ( ) , city : " " . to_string ( ) , state : " " . to_string ( ) , zip : " " . to_string ( ) , country : " " . to_string ( ) , } ) , timezone : Some ( chrono_tz :: US :: Eastern ) , } ) , period : 24 * hours , } ) ) ; }
This function is the 'config file' for the importer.
This function is the ' config file ' for the importer .
importers
&mut Vec<Box<dyn Importer>>
importers
&mut Vec<Box<dyn Importer>>