"""
Harvester for the Digital Commons @ CalPoly API for the SHARE project

More information at https://github.com/CenterForOpenScience/SHARE/blob/master/providers/edu.calpoly.md

Example API call: http://digitalcommons.calpoly.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc&from=2014-10-05T00:00:00Z
"""


from __future__ import unicode_literals

from scrapi.base import OAIHarvester


class CalPolyHarvester(OAIHarvester):
    short_name = 'calpoly'
    long_name = 'Digital Commons @ CalPoly'
    url = 'http://digitalcommons.calpoly.edu/'
    base_url = 'http://digitalcommons.calpoly.edu/do/oai/'
    property_list = ['type', 'source', 'format', 'date', 'setSpec']
    approved_sets = [
        'csusymp2009',
        'acct_fac',
        'aerosp',
        'aero_fac',
        'agbsp',
        'agb_fac',
        'agedsp',
        'aged_fac',
        'ascisp',
        'asci_fac',
        'aen_fac',
        'arcesp',
        'arch_fac',
        'art_fac',
        'artsp',
        'bts',
        'bio_fac',
        'biosp',
        'bmed_fac',
        'bmedsp',
        'bae_fac',
        'braesp',
        'ccapc',
        'ari',
        'csq',
        'chem_fac',
        'chemsp',
        'crp_fac',
        'crpsp',
        'cenv_fac',
        'cadrc',
        'comssp',
        'comm_fac',
        'cpesp',
        'cscsp',
        'csse_fac',
        'cmgt_fac',
        'cesp',
        'fpe_rpt',
        'dscisp',
        'dsci_fac',
        'erscsp',
        'econ_fac',
        'eesp',
        'eeng_fac',
        'engl_fac',
        'englsp',
        'ethicsandanimals',
        'eth_fac',
        'essp',
        'fin_fac',
        'focus',
        'fsn_fac',
        'fsnsp',
        'aged_rpt',
        'gse_fac',
        'grcsp',
        'grc_fac',
        'hist_fac',
        'histsp',
        'honors',
        'hcssp',
        'hcs_fac',
        'imesp',
        'ime_fac',
        'it_fac',
        'itsp',
        'ir2008',
        'joursp',
        'jour_fac',
        'kine_fac',
        'kinesp',
        'land_fac',
        'laessp',
        'ls_fac',
        'lib_fac',
        'mgmtsp',
        'mgmt_sp',
        'mkt_fac',
        'theses',
        'matesp',
        'mate_fac',
        'math_fac',
        'mathsp',
        'mesp',
        'meng_fac',
        'mll_fac',
        'mllsp',
        'mus_fac',
        'musp',
        'nrmsp',
        'nrm_fac',
        'pres_schol',
        'phil_fac',
        'philsp',
        'phy_fac',
        'physsp',
        'poli_fac',
        'polssp',
        'bakerforum',
        'psycd_fac',
        'psycdsp',
        'rpta_fac',
        'rptasp',
        'coe_dean',
        'socssp',
        'ssci_fac',
        'statsp',
        'stat_fac',
        'star',
        'susconf',
        'symposium',
        'forum',
        'thdanc_fac',
        'wvi_fac',
        'wvisp'
    ]
