chore(all): run formatting on repo, start work on porting webrequest over to api library
This commit is contained in:
@@ -1,18 +1,25 @@
|
||||
from .schemas.api_types import *
|
||||
from .schemas.api_types import (
|
||||
DNBSchema,
|
||||
HBZSchema,
|
||||
HebisSchema,
|
||||
KOBVSchema,
|
||||
OEVKSchema,
|
||||
SWBSchema,
|
||||
)
|
||||
from .sru import Api as _Api
|
||||
|
||||
__all__ = [
|
||||
"SWB",
|
||||
"DNB",
|
||||
"KOBV",
|
||||
"HEBIS",
|
||||
"OEVK",
|
||||
"HBZ",
|
||||
"HEBIS",
|
||||
"KOBV",
|
||||
"OEVK",
|
||||
"SWB",
|
||||
]
|
||||
|
||||
|
||||
class SWB(_Api):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.site = SWBSchema.NAME.value
|
||||
self.url = SWBSchema.URL.value
|
||||
self.prefix = SWBSchema.ARGSCHEMA.value
|
||||
@@ -21,7 +28,7 @@ class SWB(_Api):
|
||||
|
||||
|
||||
class DNB(_Api):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.site = DNBSchema.NAME.value
|
||||
self.url = DNBSchema.URL.value
|
||||
self.prefix = DNBSchema.ARGSCHEMA.value
|
||||
@@ -29,7 +36,7 @@ class DNB(_Api):
|
||||
|
||||
|
||||
class KOBV(_Api):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.site = KOBVSchema.NAME.value
|
||||
self.url = KOBVSchema.URL.value
|
||||
self.prefix = KOBVSchema.ARGSCHEMA.value
|
||||
@@ -38,7 +45,7 @@ class KOBV(_Api):
|
||||
|
||||
|
||||
class HEBIS(_Api):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.site = HebisSchema.NAME.value
|
||||
self.url = HebisSchema.URL.value
|
||||
self.prefix = HebisSchema.ARGSCHEMA.value
|
||||
@@ -56,7 +63,7 @@ class HEBIS(_Api):
|
||||
|
||||
|
||||
class OEVK(_Api):
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.site = OEVKSchema.NAME.value
|
||||
self.url = OEVKSchema.URL.value
|
||||
self.prefix = OEVKSchema.ARGSCHEMA.value
|
||||
@@ -65,20 +72,22 @@ class OEVK(_Api):
|
||||
|
||||
|
||||
class HBZ(_Api):
|
||||
"""
|
||||
Small wrapper of the SRU API used to retrieve data from the HBZ libraries
|
||||
"""Small wrapper of the SRU API used to retrieve data from the HBZ libraries.
|
||||
|
||||
All fields are available [here](https://eu04.alma.exlibrisgroup.com/view/sru/49HBZ_NETWORK?version=1.2)
|
||||
|
||||
Schema
|
||||
------
|
||||
HBZSchema: <HBZSchema>
|
||||
HBZSchema: "HBZSchema"
|
||||
|
||||
query prefix: alma.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.site = HBZSchema.NAME.value
|
||||
self.url = HBZSchema.URL.value
|
||||
self.prefix = HBZSchema.ARGSCHEMA.value
|
||||
self.library_identifier = HBZSchema.LIBRARY_NAME_LOCATION_FIELD.value
|
||||
super().__init__(self.site, self.url, self.prefix, self.library_identifier)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user