def getClient(self): if self.format == 'citeproc': return FakeOaiClientForCrossref() registry = MetadataRegistry() client = Client(self.url, registry) client.get_method = self.get_method client._day_granularity = self.day_granularity return client
def get_proxy_client(): registry = MetadataRegistry() registry.registerReader('oai_dc', my_oai_dc_reader) client = Client(PROXY_ENDPOINT, registry) client._day_granularity = PROXY_DAY_GRANULARITY return client
def getClient(self): registry = MetadataRegistry() client = Client(self.url, registry) client.get_method = self.get_method client._day_granularity = self.day_granularity return client